/**
 * Selling Partner API for Orders
 * The Selling Partner API for Orders helps you programmatically retrieve order information. These APIs let you develop fast, flexible, custom applications in areas like order synchronization, order research, and demand-based decision support tools.
 *
 * The version of the OpenAPI document: v0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */ import { Configuration } from './configuration' ; import globalAxios , { AxiosPromise , AxiosInstance } from 'axios' ; import { DUMMY_BASE_URL , assertParamExists , setApiKeyToObject , setBasicAuthToObject , setBearerAuthToObject , setOAuthToObject , setSearchParams , serializeDataIfNeeded , toPathString , createRequestFunction } from './common' ; import { BASE_PATH , COLLECTION_FORMATS , RequestArgs , BaseAPI , RequiredError } from './base' ; export interface export interface Address { type { string } memberof Name : string ; type { string } memberof AddressLine1 ? : string ; type { string } memberof AddressLine2 ? : string ; type { string } memberof AddressLine3 ? : string ; type { string } memberof City ? : string ; type { string } memberof County ? : string ; type { string } memberof District ? : string ; type { string } memberof StateOrRegion ? : string ; type { string } memberof Municipality ? : string ; type { string } memberof PostalCode ? : string ; type { string } memberof CountryCode ? : string ; type { string } memberof Phone ? : string ; type { string } memberof AddressType ? : AddressAddressTypeEnum | 'Residential' | 'Commercial' ; } export enum { string } export enum AddressAddressTypeEnum { Residential = 'Residential' , Commercial = 'Commercial' } export interface export interface AutomatedShippingSettings { type { boolean } memberof HasAutomatedShippingSettings ? : boolean ; type { string } memberof AutomatedCarrier ? : string ; type { string } memberof AutomatedShipMethod ? : string ; } export interface export interface BuyerCustomizedInfoDetail { type { string } memberof CustomizedURL ? : string ; } export interface export interface BuyerInfo { type { string } memberof BuyerEmail ? : string ; type { string } memberof BuyerName ? : string ; type { string } memberof BuyerCounty ? : string ; type { BuyerTaxInfo } memberof BuyerTaxInfo ? : BuyerTaxInfo ; type { string } memberof PurchaseOrderNumber ? : string ; } export interface export interface BuyerTaxInfo { type { string } memberof CompanyLegalName ? : string ; type { string } memberof TaxingRegion ? : string ; type { Array < TaxClassification > } memberof TaxClassifications ? : Array < TaxClassification > ; } export interface export interface BuyerTaxInformation { type { string } memberof BuyerLegalCompanyName ? : string ; type { string } memberof BuyerBusinessAddress ? : string ; type { string } memberof BuyerTaxRegistrationId ? : string ; type { string } memberof BuyerTaxOffice ? : string ; } export interface export interface FulfillmentInstruction { type { string } memberof FulfillmentSupplySourceId ? : string ; } export interface export interface GetOrderAddressResponse { type { OrderAddress } memberof payload ? : OrderAddress ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetOrderBuyerInfoResponse { type { OrderBuyerInfo } memberof payload ? : OrderBuyerInfo ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetOrderItemsBuyerInfoResponse { type { OrderItemsBuyerInfoList } memberof payload ? : OrderItemsBuyerInfoList ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetOrderItemsResponse { type { OrderItemsList } memberof payload ? : OrderItemsList ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetOrderResponse { type { Order } memberof payload ? : Order ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetOrdersResponse { type { OrdersList } memberof payload ? : OrdersList ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface ItemBuyerInfo { type { BuyerCustomizedInfoDetail } memberof BuyerCustomizedInfo ? : BuyerCustomizedInfoDetail ; type { Money } memberof GiftWrapPrice ? : Money ; type { Money } memberof GiftWrapTax ? : Money ; type { string } memberof GiftMessageText ? : string ; type { string } memberof GiftWrapLevel ? : string ; } export interface export interface MarketplaceTaxInfo { type { Array < TaxClassification > } memberof TaxClassifications ? : Array < TaxClassification > ; } export interface export interface ModelError { type { string } memberof code : string ; type { string } memberof message : string ; type { string } memberof details ? : string ; } export interface export interface Money { type { string } memberof CurrencyCode ? : string ; type { string } memberof Amount ? : string ; } export interface export interface Order { type { string } memberof AmazonOrderId : string ; type { string } memberof SellerOrderId ? : string ; type { string } memberof PurchaseDate : string ; type { string } memberof LastUpdateDate : string ; type { string } memberof OrderStatus : OrderOrderStatusEnum | 'Pending' | 'Unshipped' | 'PartiallyShipped' | 'Shipped' | 'Canceled' | 'Unfulfillable' | 'InvoiceUnconfirmed' | 'PendingAvailability' ; type { string } memberof FulfillmentChannel ? : OrderFulfillmentChannelEnum | 'MFN' | 'AFN' ; type { string } memberof SalesChannel ? : string ; type { string } memberof OrderChannel ? : string ; type { string } memberof ShipServiceLevel ? : string ; type { Money } memberof OrderTotal ? : Money ; type { number } memberof NumberOfItemsShipped ? : number ; type { number } memberof NumberOfItemsUnshipped ? : number ; type { Array < PaymentExecutionDetailItem > } memberof PaymentExecutionDetail ? : Array < PaymentExecutionDetailItem > ; type { string } memberof PaymentMethod ? : OrderPaymentMethodEnum | 'COD' | 'CVS' | 'Other' ; type { Array < string > } memberof PaymentMethodDetails ? : Array < string > ; type { string } memberof MarketplaceId ? : string ; type { string } memberof ShipmentServiceLevelCategory ? : string ; type { string } memberof EasyShipShipmentStatus ? : string ; type { string } memberof CbaDisplayableShippingLabel ? : string ; type { string } memberof OrderType ? : OrderOrderTypeEnum | 'StandardOrder' | 'LongLeadTimeOrder' | 'Preorder' | 'BackOrder' | 'SourcingOnDemandOrder' ; type { string } memberof EarliestShipDate ? : string ; type { string } memberof LatestShipDate ? : string ; type { string } memberof EarliestDeliveryDate ? : string ; type { string } memberof LatestDeliveryDate ? : string ; type { boolean } memberof IsBusinessOrder ? : boolean ; type { boolean } memberof IsPrime ? : boolean ; type { boolean } memberof IsPremiumOrder ? : boolean ; type { boolean } memberof IsGlobalExpressEnabled ? : boolean ; type { string } memberof ReplacedOrderId ? : string ; type { boolean } memberof IsReplacementOrder ? : boolean ; type { string } memberof PromiseResponseDueDate ? : string ; type { boolean } memberof IsEstimatedShipDateSet ? : boolean ; type { boolean } memberof IsSoldByAB ? : boolean ; type { Address } memberof DefaultShipFromLocationAddress ? : Address ; type { string } memberof BuyerInvoicePreference ? : OrderBuyerInvoicePreferenceEnum | 'INDIVIDUAL' | 'BUSINESS' ; type { BuyerTaxInformation } memberof BuyerTaxInformation ? : BuyerTaxInformation ; type { FulfillmentInstruction } memberof FulfillmentInstruction ? : FulfillmentInstruction ; type { boolean } memberof IsISPU ? : boolean ; type { MarketplaceTaxInfo } memberof MarketplaceTaxInfo ? : MarketplaceTaxInfo ; type { string } memberof SellerDisplayName ? : string ; type { Address } memberof ShippingAddress ? : Address ; type { BuyerInfo } memberof BuyerInfo ? : BuyerInfo ; type { AutomatedShippingSettings } memberof AutomatedShippingSettings ? : AutomatedShippingSettings ; } export enum { string } export enum OrderOrderStatusEnum { Pending = 'Pending' , Unshipped = 'Unshipped' , PartiallyShipped = 'PartiallyShipped' , Shipped = 'Shipped' , Canceled = 'Canceled' , Unfulfillable = 'Unfulfillable' , InvoiceUnconfirmed = 'InvoiceUnconfirmed' , PendingAvailability = 'PendingAvailability' } export enum { string } export enum OrderFulfillmentChannelEnum { Mfn = 'MFN' , Afn = 'AFN' } export enum { string } export enum OrderPaymentMethodEnum { Cod = 'COD' , Cvs = 'CVS' , Other = 'Other' } export enum { string } export enum OrderOrderTypeEnum { StandardOrder = 'StandardOrder' , LongLeadTimeOrder = 'LongLeadTimeOrder' , Preorder = 'Preorder' , BackOrder = 'BackOrder' , SourcingOnDemandOrder = 'SourcingOnDemandOrder' } export enum { string } export enum OrderBuyerInvoicePreferenceEnum { Individual = 'INDIVIDUAL' , Business = 'BUSINESS' } export interface export interface OrderAddress { type { string } memberof AmazonOrderId : string ; type { Address } memberof ShippingAddress ? : Address ; } export interface export interface OrderBuyerInfo { type { string } memberof AmazonOrderId : string ; type { string } memberof BuyerEmail ? : string ; type { string } memberof BuyerName ? : string ; type { string } memberof BuyerCounty ? : string ; type { BuyerTaxInfo } memberof BuyerTaxInfo ? : BuyerTaxInfo ; type { string } memberof PurchaseOrderNumber ? : string ; } export interface export interface OrderItem { type { string } memberof ASIN : string ; type { string } memberof SellerSKU ? : string ; type { string } memberof OrderItemId : string ; type { string } memberof Title ? : string ; type { number } memberof QuantityOrdered : number ; type { number } memberof QuantityShipped ? : number ; type { ProductInfoDetail } memberof ProductInfo ? : ProductInfoDetail ; type { PointsGrantedDetail } memberof PointsGranted ? : PointsGrantedDetail ; type { Money } memberof ItemPrice ? : Money ; type { Money } memberof ShippingPrice ? : Money ; type { Money } memberof ItemTax ? : Money ; type { Money } memberof ShippingTax ? : Money ; type { Money } memberof ShippingDiscount ? : Money ; type { Money } memberof ShippingDiscountTax ? : Money ; type { Money } memberof PromotionDiscount ? : Money ; type { Money } memberof PromotionDiscountTax ? : Money ; type { Array < string > } memberof PromotionIds ? : Array < string > ; type { Money } memberof CODFee ? : Money ; type { Money } memberof CODFeeDiscount ? : Money ; type { boolean } memberof IsGift ? : boolean ; type { string } memberof ConditionNote ? : string ; type { string } memberof ConditionId ? : string ; type { string } memberof ConditionSubtypeId ? : string ; type { string } memberof ScheduledDeliveryStartDate ? : string ; type { string } memberof ScheduledDeliveryEndDate ? : string ; type { string } memberof PriceDesignation ? : string ; type { TaxCollection } memberof TaxCollection ? : TaxCollection ; type { boolean } memberof SerialNumberRequired ? : boolean ; type { boolean } memberof IsTransparency ? : boolean ; type { string } memberof IossNumber ? : string ; type { string } memberof StoreChainStoreId ? : string ; type { string } memberof DeemedResellerCategory ? : OrderItemDeemedResellerCategoryEnum | 'IOSS' | 'UOSS' ; type { ItemBuyerInfo } memberof BuyerInfo ? : ItemBuyerInfo ; } export enum { string } export enum OrderItemDeemedResellerCategoryEnum { Ioss = 'IOSS' , Uoss = 'UOSS' } export interface export interface OrderItemBuyerInfo { type { string } memberof OrderItemId : string ; type { BuyerCustomizedInfoDetail } memberof BuyerCustomizedInfo ? : BuyerCustomizedInfoDetail ; type { Money } memberof GiftWrapPrice ? : Money ; type { Money } memberof GiftWrapTax ? : Money ; type { string } memberof GiftMessageText ? : string ; type { string } memberof GiftWrapLevel ? : string ; } export interface export interface OrderItemsBuyerInfoList { type { Array < OrderItemBuyerInfo > } memberof OrderItems : Array < OrderItemBuyerInfo > ; type { string } memberof NextToken ? : string ; type { string } memberof AmazonOrderId : string ; } export interface export interface OrderItemsList { type { Array < OrderItem > } memberof OrderItems : Array < OrderItem > ; type { string } memberof NextToken ? : string ; type { string } memberof AmazonOrderId : string ; } export interface export interface OrdersList { type { Array < Order > } memberof Orders : Array < Order > ; type { string } memberof NextToken ? : string ; type { string } memberof LastUpdatedBefore ? : string ; type { string } memberof CreatedBefore ? : string ; } export interface export interface PaymentExecutionDetailItem { type { Money } memberof Payment : Money ; type { string } memberof PaymentMethod : string ; } export interface export interface PointsGrantedDetail { type { number } memberof PointsNumber ? : number ; type { Money } memberof PointsMonetaryValue ? : Money ; } export interface export interface ProductInfoDetail { type { number } memberof NumberOfItems ? : number ; } export enum { string } export enum ShipmentStatus { ReadyForPickup = 'ReadyForPickup' , PickedUp = 'PickedUp' , RefusedPickup = 'RefusedPickup' } export interface export interface TaxClassification { type { string } memberof Name ? : string ; type { string } memberof Value ? : string ; } export interface export interface TaxCollection { type { string } memberof Model ? : TaxCollectionModelEnum | 'MarketplaceFacilitator' ; type { string } memberof ResponsibleParty ? : TaxCollectionResponsiblePartyEnum | 'Amazon Services, Inc.' ; } export enum { string } export enum TaxCollectionModelEnum { MarketplaceFacilitator = 'MarketplaceFacilitator' } export enum { string } export enum TaxCollectionResponsiblePartyEnum { AmazonServicesInc = 'Amazon Services, Inc.' } export interface export interface UpdateShipmentStatusErrorResponse { type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface UpdateShipmentStatusRequest { type { string } memberof marketplaceId : string ; type { ShipmentStatus } memberof shipmentStatus : ShipmentStatus | 'ReadyForPickup' | 'PickedUp' | 'RefusedPickup' ; type { Array < object > } memberof orderItems ? : Array < object > ; } export export const OrdersV0ApiAxiosParamCreator = function ( configuration ? ) { return { param { string } orderId param { * } options throws getOrder : async ( orderId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getOrder' , 'orderId' , orderId ) ; const localVarPath = `/orders/v0/orders/{orderId}` . replace ( `{${ "orderId" }}` , encodeURIComponent ( String ( orderId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { string } orderId param { * } options throws getOrderAddress : async ( orderId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getOrderAddress' , 'orderId' , orderId ) ; const localVarPath = `/orders/v0/orders/{orderId}/address` . replace ( `{${ "orderId" }}` , encodeURIComponent ( String ( orderId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { string } orderId param { * } options throws getOrderBuyerInfo : async ( orderId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getOrderBuyerInfo' , 'orderId' , orderId ) ; const localVarPath = `/orders/v0/orders/{orderId}/buyerInfo` . replace ( `{${ "orderId" }}` , encodeURIComponent ( String ( orderId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { string } orderId param { string } nextToken param { * } options throws getOrderItems : async ( orderId , nextToken ? , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getOrderItems' , 'orderId' , orderId ) ; const localVarPath = `/orders/v0/orders/{orderId}/orderItems` . replace ( `{${ "orderId" }}` , encodeURIComponent ( String ( orderId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; if ( nextToken !== undefined ) { localVarQueryParameter [ 'NextToken' ] = nextToken ; } setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { string } orderId param { string } nextToken param { * } options throws getOrderItemsBuyerInfo : async ( orderId , nextToken ? , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getOrderItemsBuyerInfo' , 'orderId' , orderId ) ; const localVarPath = `/orders/v0/orders/{orderId}/orderItems/buyerInfo` . replace ( `{${ "orderId" }}` , encodeURIComponent ( String ( orderId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; if ( nextToken !== undefined ) { localVarQueryParameter [ 'NextToken' ] = nextToken ; } setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { Array < string > } marketplaceIds param { string } createdAfter param { string } createdBefore param { string } lastUpdatedAfter param { string } lastUpdatedBefore param { Array < string > } orderStatuses param { Array < string > } fulfillmentChannels param { Array < string > } paymentMethods param { string } buyerEmail param { string } sellerOrderId param { number } maxResultsPerPage param { Array < string > } easyShipShipmentStatuses param { string } nextToken param { Array < string > } amazonOrderIds param { string } actualFulfillmentSupplySourceId param { boolean } isISPU param { string } storeChainStoreId param { * } options throws getOrders : async ( marketplaceIds , createdAfter ? , createdBefore ? , lastUpdatedAfter ? , lastUpdatedBefore ? , orderStatuses ? , fulfillmentChannels ? , paymentMethods ? , buyerEmail ? , sellerOrderId ? , maxResultsPerPage ? , easyShipShipmentStatuses ? , nextToken ? , amazonOrderIds ? , actualFulfillmentSupplySourceId ? , isISPU ? , storeChainStoreId ? , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getOrders' , 'marketplaceIds' , marketplaceIds ) ; const localVarPath = `/orders/v0/orders` ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; if ( createdAfter !== undefined ) { localVarQueryParameter [ 'CreatedAfter' ] = createdAfter ; } if ( createdBefore !== undefined ) { localVarQueryParameter [ 'CreatedBefore' ] = createdBefore ; } if ( lastUpdatedAfter !== undefined ) { localVarQueryParameter [ 'LastUpdatedAfter' ] = lastUpdatedAfter ; } if ( lastUpdatedBefore !== undefined ) { localVarQueryParameter [ 'LastUpdatedBefore' ] = lastUpdatedBefore ; } if ( orderStatuses ) { localVarQueryParameter [ 'OrderStatuses' ] = orderStatuses . join ( COLLECTION_FORMATS . csv ) ; } if ( marketplaceIds ) { localVarQueryParameter [ 'MarketplaceIds' ] = marketplaceIds . join ( COLLECTION_FORMATS . csv ) ; } if ( fulfillmentChannels ) { localVarQueryParameter [ 'FulfillmentChannels' ] = fulfillmentChannels . join ( COLLECTION_FORMATS . csv ) ; } if ( paymentMethods ) { localVarQueryParameter [ 'PaymentMethods' ] = paymentMethods . join ( COLLECTION_FORMATS . csv ) ; } if ( buyerEmail !== undefined ) { localVarQueryParameter [ 'BuyerEmail' ] = buyerEmail ; } if ( sellerOrderId !== undefined ) { localVarQueryParameter [ 'SellerOrderId' ] = sellerOrderId ; } if ( maxResultsPerPage !== undefined ) { localVarQueryParameter [ 'MaxResultsPerPage' ] = maxResultsPerPage ; } if ( easyShipShipmentStatuses ) { localVarQueryParameter [ 'EasyShipShipmentStatuses' ] = easyShipShipmentStatuses . join ( COLLECTION_FORMATS . csv ) ; } if ( nextToken !== undefined ) { localVarQueryParameter [ 'NextToken' ] = nextToken ; } if ( amazonOrderIds ) { localVarQueryParameter [ 'AmazonOrderIds' ] = amazonOrderIds . join ( COLLECTION_FORMATS . csv ) ; } if ( actualFulfillmentSupplySourceId !== undefined ) { localVarQueryParameter [ 'ActualFulfillmentSupplySourceId' ] = actualFulfillmentSupplySourceId ; } if ( isISPU !== undefined ) { localVarQueryParameter [ 'IsISPU' ] = isISPU ; } if ( storeChainStoreId !== undefined ) { localVarQueryParameter [ 'StoreChainStoreId' ] = storeChainStoreId ; } setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , } ; } ; export export const OrdersV0ApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = OrdersV0ApiAxiosParamCreator ( configuration ) ; return { param { string } orderId param { * } options throws async getOrder ( orderId , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getOrder ( orderId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } orderId param { * } options throws async getOrderAddress ( orderId , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getOrderAddress ( orderId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } orderId param { * } options throws async getOrderBuyerInfo ( orderId , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getOrderBuyerInfo ( orderId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } orderId param { string } nextToken param { * } options throws async getOrderItems ( orderId , nextToken ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getOrderItems ( orderId , nextToken , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } orderId param { string } nextToken param { * } options throws async getOrderItemsBuyerInfo ( orderId , nextToken ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getOrderItemsBuyerInfo ( orderId , nextToken , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { Array < string > } marketplaceIds param { string } createdAfter param { string } createdBefore param { string } lastUpdatedAfter param { string } lastUpdatedBefore param { Array < string > } orderStatuses param { Array < string > } fulfillmentChannels param { Array < string > } paymentMethods param { string } buyerEmail param { string } sellerOrderId param { number } maxResultsPerPage param { Array < string > } easyShipShipmentStatuses param { string } nextToken param { Array < string > } amazonOrderIds param { string } actualFulfillmentSupplySourceId param { boolean } isISPU param { string } storeChainStoreId param { * } options throws async getOrders ( marketplaceIds , createdAfter ? , createdBefore ? , lastUpdatedAfter ? , lastUpdatedBefore ? , orderStatuses ? , fulfillmentChannels ? , paymentMethods ? , buyerEmail ? , sellerOrderId ? , maxResultsPerPage ? , easyShipShipmentStatuses ? , nextToken ? , amazonOrderIds ? , actualFulfillmentSupplySourceId ? , isISPU ? , storeChainStoreId ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getOrders ( marketplaceIds , createdAfter , createdBefore , lastUpdatedAfter , lastUpdatedBefore , orderStatuses , fulfillmentChannels , paymentMethods , buyerEmail , sellerOrderId , maxResultsPerPage , easyShipShipmentStatuses , nextToken , amazonOrderIds , actualFulfillmentSupplySourceId , isISPU , storeChainStoreId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const OrdersV0ApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = OrdersV0ApiFp ( configuration ) ; return { param { string } orderId param { * } options throws getOrder ( orderId , options ? ) { return localVarFp . getOrder ( orderId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } orderId param { * } options throws getOrderAddress ( orderId , options ? ) { return localVarFp . getOrderAddress ( orderId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } orderId param { * } options throws getOrderBuyerInfo ( orderId , options ? ) { return localVarFp . getOrderBuyerInfo ( orderId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } orderId param { string } nextToken param { * } options throws getOrderItems ( orderId , nextToken ? , options ? ) { return localVarFp . getOrderItems ( orderId , nextToken , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } orderId param { string } nextToken param { * } options throws getOrderItemsBuyerInfo ( orderId , nextToken ? , options ? ) { return localVarFp . getOrderItemsBuyerInfo ( orderId , nextToken , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { Array < string > } marketplaceIds param { string } createdAfter param { string } createdBefore param { string } lastUpdatedAfter param { string } lastUpdatedBefore param { Array < string > } orderStatuses param { Array < string > } fulfillmentChannels param { Array < string > } paymentMethods param { string } buyerEmail param { string } sellerOrderId param { number } maxResultsPerPage param { Array < string > } easyShipShipmentStatuses param { string } nextToken param { Array < string > } amazonOrderIds param { string } actualFulfillmentSupplySourceId param { boolean } isISPU param { string } storeChainStoreId param { * } options throws getOrders ( marketplaceIds , createdAfter ? , createdBefore ? , lastUpdatedAfter ? , lastUpdatedBefore ? , orderStatuses ? , fulfillmentChannels ? , paymentMethods ? , buyerEmail ? , sellerOrderId ? , maxResultsPerPage ? , easyShipShipmentStatuses ? , nextToken ? , amazonOrderIds ? , actualFulfillmentSupplySourceId ? , isISPU ? , storeChainStoreId ? , options ? ) { return localVarFp . getOrders ( marketplaceIds , createdAfter , createdBefore , lastUpdatedAfter , lastUpdatedBefore , orderStatuses , fulfillmentChannels , paymentMethods , buyerEmail , sellerOrderId , maxResultsPerPage , easyShipShipmentStatuses , nextToken , amazonOrderIds , actualFulfillmentSupplySourceId , isISPU , storeChainStoreId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface OrdersV0ApiGetOrderRequest { type { string } memberof readonly orderId : string ; } export interface export interface OrdersV0ApiGetOrderAddressRequest { type { string } memberof readonly orderId : string ; } export interface export interface OrdersV0ApiGetOrderBuyerInfoRequest { type { string } memberof readonly orderId : string ; } export interface export interface OrdersV0ApiGetOrderItemsRequest { type { string } memberof readonly orderId : string ; type { string } memberof readonly nextToken ? : string ; } export interface export interface OrdersV0ApiGetOrderItemsBuyerInfoRequest { type { string } memberof readonly orderId : string ; type { string } memberof readonly nextToken ? : string ; } export interface export interface OrdersV0ApiGetOrdersRequest { type { Array < string > } memberof readonly marketplaceIds : Array < string > ; type { string } memberof readonly createdAfter ? : string ; type { string } memberof readonly createdBefore ? : string ; type { string } memberof readonly lastUpdatedAfter ? : string ; type { string } memberof readonly lastUpdatedBefore ? : string ; type { Array < string > } memberof readonly orderStatuses ? : Array < string > ; type { Array < string > } memberof readonly fulfillmentChannels ? : Array < string > ; type { Array < string > } memberof readonly paymentMethods ? : Array < string > ; type { string } memberof readonly buyerEmail ? : string ; type { string } memberof readonly sellerOrderId ? : string ; type { number } memberof readonly maxResultsPerPage ? : number ; type { Array < string > } memberof readonly easyShipShipmentStatuses ? : Array < string > ; type { string } memberof readonly nextToken ? : string ; type { Array < string > } memberof readonly amazonOrderIds ? : Array < string > ; type { string } memberof readonly actualFulfillmentSupplySourceId ? : string ; type { boolean } memberof readonly isISPU ? : boolean ; type { string } memberof readonly storeChainStoreId ? : string ; } export class extends BaseAPI export class OrdersV0Api extends BaseAPI { param { OrdersV0ApiGetOrderRequest } requestParameters param { * } options throws memberof public getOrder ( requestParameters , options ? ) { return OrdersV0ApiFp ( this . configuration ) . getOrder ( requestParameters . orderId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { OrdersV0ApiGetOrderAddressRequest } requestParameters param { * } options throws memberof public getOrderAddress ( requestParameters , options ? ) { return OrdersV0ApiFp ( this . configuration ) . getOrderAddress ( requestParameters . orderId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { OrdersV0ApiGetOrderBuyerInfoRequest } requestParameters param { * } options throws memberof public getOrderBuyerInfo ( requestParameters , options ? ) { return OrdersV0ApiFp ( this . configuration ) . getOrderBuyerInfo ( requestParameters . orderId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { OrdersV0ApiGetOrderItemsRequest } requestParameters param { * } options throws memberof public getOrderItems ( requestParameters , options ? ) { return OrdersV0ApiFp ( this . configuration ) . getOrderItems ( requestParameters . orderId , requestParameters . nextToken , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { OrdersV0ApiGetOrderItemsBuyerInfoRequest } requestParameters param { * } options throws memberof public getOrderItemsBuyerInfo ( requestParameters , options ? ) { return OrdersV0ApiFp ( this . configuration ) . getOrderItemsBuyerInfo ( requestParameters . orderId , requestParameters . nextToken , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { OrdersV0ApiGetOrdersRequest } requestParameters param { * } options throws memberof public getOrders ( requestParameters , options ? ) { return OrdersV0ApiFp ( this . configuration ) . getOrders ( requestParameters . marketplaceIds , requestParameters . createdAfter , requestParameters . createdBefore , requestParameters . lastUpdatedAfter , requestParameters . lastUpdatedBefore , requestParameters . orderStatuses , requestParameters . fulfillmentChannels , requestParameters . paymentMethods , requestParameters . buyerEmail , requestParameters . sellerOrderId , requestParameters . maxResultsPerPage , requestParameters . easyShipShipmentStatuses , requestParameters . nextToken , requestParameters . amazonOrderIds , requestParameters . actualFulfillmentSupplySourceId , requestParameters . isISPU , requestParameters . storeChainStoreId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } } export export const ShipmentApiAxiosParamCreator = function ( configuration ? ) { return { param { string } orderId param { UpdateShipmentStatusRequest } payload param { * } options throws updateShipmentStatus : async ( orderId , payload , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'updateShipmentStatus' , 'orderId' , orderId ) ; assertParamExists ( 'updateShipmentStatus' , 'payload' , payload ) ; const localVarPath = `/orders/v0/orders/{orderId}/shipment` . replace ( `{${ "orderId" }}` , encodeURIComponent ( String ( orderId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'POST' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; localVarHeaderParameter [ 'Content-Type' ] = 'application/json' ; setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; localVarRequestOptions . data = serializeDataIfNeeded ( payload , localVarRequestOptions , configuration ) ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , } ; } ; export export const ShipmentApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = ShipmentApiAxiosParamCreator ( configuration ) ; return { param { string } orderId param { UpdateShipmentStatusRequest } payload param { * } options throws async updateShipmentStatus ( orderId , payload , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . updateShipmentStatus ( orderId , payload , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const ShipmentApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = ShipmentApiFp ( configuration ) ; return { param { string } orderId param { UpdateShipmentStatusRequest } payload param { * } options throws updateShipmentStatus ( orderId , payload , options ? ) { return localVarFp . updateShipmentStatus ( orderId , payload , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface ShipmentApiUpdateShipmentStatusRequest { type { string } memberof readonly orderId : string ; type { UpdateShipmentStatusRequest } memberof readonly payload : UpdateShipmentStatusRequest ; } export class extends BaseAPI export class ShipmentApi extends BaseAPI { param { ShipmentApiUpdateShipmentStatusRequest } requestParameters param { * } options throws memberof public updateShipmentStatus ( requestParameters , options ? ) { return ShipmentApiFp ( this . configuration ) . updateShipmentStatus ( requestParameters . orderId , requestParameters . payload , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }