/**
 * Selling Partner API for Merchant Fulfillment
 * The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.
 *
 * 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 AdditionalInputs { type { string } memberof AdditionalInputFieldName ? : string ; type { SellerInputDefinition } memberof SellerInputDefinition ? : SellerInputDefinition ; } export interface export interface AdditionalSellerInput { type { string } memberof DataType ? : string ; type { string } memberof ValueAsString ? : string ; type { boolean } memberof ValueAsBoolean ? : boolean ; type { number } memberof ValueAsInteger ? : number ; type { string } memberof ValueAsTimestamp ? : string ; type { Address } memberof ValueAsAddress ? : Address ; type { Weight } memberof ValueAsWeight ? : Weight ; type { Length } memberof ValueAsDimension ? : Length ; type { CurrencyAmount } memberof ValueAsCurrency ? : CurrencyAmount ; } export interface export interface AdditionalSellerInputs { type { string } memberof AdditionalInputFieldName : string ; type { AdditionalSellerInput } memberof AdditionalSellerInput : AdditionalSellerInput ; } 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 DistrictOrCounty ? : string ; type { string } memberof Email : string ; type { string } memberof City : string ; type { string } memberof StateOrProvinceCode ? : string ; type { string } memberof PostalCode : string ; type { string } memberof CountryCode : string ; type { string } memberof Phone : string ; } export interface export interface AvailableCarrierWillPickUpOption { type { CarrierWillPickUpOption } memberof CarrierWillPickUpOption : CarrierWillPickUpOption | 'CarrierWillPickUp' | 'ShipperWillDropOff' | 'NoPreference' ; type { CurrencyAmount } memberof Charge : CurrencyAmount ; } export interface export interface AvailableDeliveryExperienceOption { type { DeliveryExperienceOption } memberof DeliveryExperienceOption : DeliveryExperienceOption | 'DeliveryConfirmationWithAdultSignature' | 'DeliveryConfirmationWithSignature' | 'DeliveryConfirmationWithoutSignature' | 'NoTracking' | 'NoPreference' ; type { CurrencyAmount } memberof Charge : CurrencyAmount ; } export interface export interface AvailableShippingServiceOptions { type { Array < AvailableCarrierWillPickUpOption > } memberof AvailableCarrierWillPickUpOptions : Array < AvailableCarrierWillPickUpOption > ; type { Array < AvailableDeliveryExperienceOption > } memberof AvailableDeliveryExperienceOptions : Array < AvailableDeliveryExperienceOption > ; } export interface export interface CancelShipmentResponse { type { Shipment } memberof payload ? : Shipment ; type { Array < Error > } memberof errors ? : Array < Error > ; } export enum { string } export enum CarrierWillPickUpOption { CarrierWillPickUp = 'CarrierWillPickUp' , ShipperWillDropOff = 'ShipperWillDropOff' , NoPreference = 'NoPreference' } export interface export interface Constraint { type { string } memberof ValidationRegEx ? : string ; type { string } memberof ValidationString : string ; } export interface export interface CreateShipmentRequest { type { ShipmentRequestDetails } memberof ShipmentRequestDetails : ShipmentRequestDetails ; type { string } memberof ShippingServiceId : string ; type { string } memberof ShippingServiceOfferId ? : string ; type { HazmatType } memberof HazmatType ? : HazmatType | 'None' | 'LQHazmat' ; type { LabelFormatOptionRequest } memberof LabelFormatOption ? : LabelFormatOptionRequest ; type { Array < AdditionalSellerInputs > } memberof ShipmentLevelSellerInputsList ? : Array < AdditionalSellerInputs > ; } export interface export interface CreateShipmentResponse { type { Shipment } memberof payload ? : Shipment ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface CurrencyAmount { type { string } memberof CurrencyCode : string ; type { number } memberof Amount : number ; } export enum { string } export enum DeliveryExperienceOption { DeliveryConfirmationWithAdultSignature = 'DeliveryConfirmationWithAdultSignature' , DeliveryConfirmationWithSignature = 'DeliveryConfirmationWithSignature' , DeliveryConfirmationWithoutSignature = 'DeliveryConfirmationWithoutSignature' , NoTracking = 'NoTracking' , NoPreference = 'NoPreference' } export enum { string } export enum DeliveryExperienceType { DeliveryConfirmationWithAdultSignature = 'DeliveryConfirmationWithAdultSignature' , DeliveryConfirmationWithSignature = 'DeliveryConfirmationWithSignature' , DeliveryConfirmationWithoutSignature = 'DeliveryConfirmationWithoutSignature' , NoTracking = 'NoTracking' } export interface export interface FileContents { type { string } memberof Contents : string ; type { FileType } memberof FileType : FileType | 'application/pdf' | 'application/zpl' | 'image/png' ; type { string } memberof Checksum : string ; } export enum { string } export enum FileType { ApplicationPdf = 'application/pdf' , ApplicationZpl = 'application/zpl' , ImagePng = 'image/png' } export interface export interface GetAdditionalSellerInputsRequest { type { string } memberof ShippingServiceId : string ; type { Address } memberof ShipFromAddress : Address ; type { string } memberof OrderId : string ; } export interface export interface GetAdditionalSellerInputsResponse { type { GetAdditionalSellerInputsResult } memberof payload ? : GetAdditionalSellerInputsResult ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetAdditionalSellerInputsResult { type { Array < AdditionalInputs > } memberof ShipmentLevelFields ? : Array < AdditionalInputs > ; type { Array < ItemLevelFields > } memberof ItemLevelFieldsList ? : Array < ItemLevelFields > ; } export interface export interface GetEligibleShipmentServicesRequest { type { ShipmentRequestDetails } memberof ShipmentRequestDetails : ShipmentRequestDetails ; type { ShippingOfferingFilter } memberof ShippingOfferingFilter ? : ShippingOfferingFilter ; } export interface export interface GetEligibleShipmentServicesResponse { type { GetEligibleShipmentServicesResult } memberof payload ? : GetEligibleShipmentServicesResult ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetEligibleShipmentServicesResult { type { Array < ShippingService > } memberof ShippingServiceList : Array < ShippingService > ; type { Array < RejectedShippingService > } memberof RejectedShippingServiceList ? : Array < RejectedShippingService > ; type { Array < TemporarilyUnavailableCarrier > } memberof TemporarilyUnavailableCarrierList ? : Array < TemporarilyUnavailableCarrier > ; type { Array < TermsAndConditionsNotAcceptedCarrier > } memberof TermsAndConditionsNotAcceptedCarrierList ? : Array < TermsAndConditionsNotAcceptedCarrier > ; } export interface export interface GetShipmentResponse { type { Shipment } memberof payload ? : Shipment ; type { Array < Error > } memberof errors ? : Array < Error > ; } export enum { string } export enum HazmatType { None = 'None' , LqHazmat = 'LQHazmat' } export enum { string } export enum InputTargetType { ShipmentLevel = 'SHIPMENT_LEVEL' , ItemLevel = 'ITEM_LEVEL' } export interface export interface Item { type { string } memberof OrderItemId : string ; type { number } memberof Quantity : number ; type { Weight } memberof ItemWeight ? : Weight ; type { string } memberof ItemDescription ? : string ; type { Array < string > } memberof TransparencyCodeList ? : Array < string > ; type { Array < AdditionalSellerInputs > } memberof ItemLevelSellerInputsList ? : Array < AdditionalSellerInputs > ; } export interface export interface ItemLevelFields { type { string } memberof Asin : string ; type { Array < AdditionalInputs > } memberof AdditionalInputs : Array < AdditionalInputs > ; } export interface export interface Label { type { string } memberof CustomTextForLabel ? : string ; type { LabelDimensions } memberof Dimensions : LabelDimensions ; type { FileContents } memberof FileContents : FileContents ; type { LabelFormat } memberof LabelFormat ? : LabelFormat | 'PDF' | 'PNG' | 'ZPL203' | 'ZPL300' | 'ShippingServiceDefault' ; type { StandardIdForLabel } memberof StandardIdForLabel ? : StandardIdForLabel | 'AmazonOrderId' ; } export interface export interface LabelCustomization { type { string } memberof CustomTextForLabel ? : string ; type { StandardIdForLabel } memberof StandardIdForLabel ? : StandardIdForLabel | 'AmazonOrderId' ; } export interface export interface LabelDimensions { type { number } memberof Length : number ; type { number } memberof Width : number ; type { UnitOfLength } memberof Unit : UnitOfLength | 'inches' | 'centimeters' ; } export enum { string } export enum LabelFormat { Pdf = 'PDF' , Png = 'PNG' , Zpl203 = 'ZPL203' , Zpl300 = 'ZPL300' , ShippingServiceDefault = 'ShippingServiceDefault' } export interface export interface LabelFormatOption { type { boolean } memberof IncludePackingSlipWithLabel ? : boolean ; type { LabelFormat } memberof LabelFormat ? : LabelFormat | 'PDF' | 'PNG' | 'ZPL203' | 'ZPL300' | 'ShippingServiceDefault' ; } export interface export interface LabelFormatOptionRequest { type { boolean } memberof IncludePackingSlipWithLabel ? : boolean ; } export interface export interface Length { type { number } memberof value ? : number ; type { UnitOfLength } memberof unit ? : UnitOfLength | 'inches' | 'centimeters' ; } export interface export interface ModelError { type { string } memberof code : string ; type { string } memberof message : string ; type { string } memberof details ? : string ; } export interface export interface PackageDimensions { type { number } memberof Length ? : number ; type { number } memberof Width ? : number ; type { number } memberof Height ? : number ; type { UnitOfLength } memberof Unit ? : UnitOfLength | 'inches' | 'centimeters' ; type { PredefinedPackageDimensions } memberof PredefinedPackageDimensions ? : PredefinedPackageDimensions | 'FedEx_Box_10kg' | 'FedEx_Box_25kg' | 'FedEx_Box_Extra_Large_1' | 'FedEx_Box_Extra_Large_2' | 'FedEx_Box_Large_1' | 'FedEx_Box_Large_2' | 'FedEx_Box_Medium_1' | 'FedEx_Box_Medium_2' | 'FedEx_Box_Small_1' | 'FedEx_Box_Small_2' | 'FedEx_Envelope' | 'FedEx_Padded_Pak' | 'FedEx_Pak_1' | 'FedEx_Pak_2' | 'FedEx_Tube' | 'FedEx_XL_Pak' | 'UPS_Box_10kg' | 'UPS_Box_25kg' | 'UPS_Express_Box' | 'UPS_Express_Box_Large' | 'UPS_Express_Box_Medium' | 'UPS_Express_Box_Small' | 'UPS_Express_Envelope' | 'UPS_Express_Hard_Pak' | 'UPS_Express_Legal_Envelope' | 'UPS_Express_Pak' | 'UPS_Express_Tube' | 'UPS_Laboratory_Pak' | 'UPS_Pad_Pak' | 'UPS_Pallet' | 'USPS_Card' | 'USPS_Flat' | 'USPS_FlatRateCardboardEnvelope' | 'USPS_FlatRateEnvelope' | 'USPS_FlatRateGiftCardEnvelope' | 'USPS_FlatRateLegalEnvelope' | 'USPS_FlatRatePaddedEnvelope' | 'USPS_FlatRateWindowEnvelope' | 'USPS_LargeFlatRateBoardGameBox' | 'USPS_LargeFlatRateBox' | 'USPS_Letter' | 'USPS_MediumFlatRateBox1' | 'USPS_MediumFlatRateBox2' | 'USPS_RegionalRateBoxA1' | 'USPS_RegionalRateBoxA2' | 'USPS_RegionalRateBoxB1' | 'USPS_RegionalRateBoxB2' | 'USPS_RegionalRateBoxC' | 'USPS_SmallFlatRateBox' | 'USPS_SmallFlatRateEnvelope' ; } export enum { string } export enum PredefinedPackageDimensions { FedExBox10kg = 'FedEx_Box_10kg' , FedExBox25kg = 'FedEx_Box_25kg' , FedExBoxExtraLarge1 = 'FedEx_Box_Extra_Large_1' , FedExBoxExtraLarge2 = 'FedEx_Box_Extra_Large_2' , FedExBoxLarge1 = 'FedEx_Box_Large_1' , FedExBoxLarge2 = 'FedEx_Box_Large_2' , FedExBoxMedium1 = 'FedEx_Box_Medium_1' , FedExBoxMedium2 = 'FedEx_Box_Medium_2' , FedExBoxSmall1 = 'FedEx_Box_Small_1' , FedExBoxSmall2 = 'FedEx_Box_Small_2' , FedExEnvelope = 'FedEx_Envelope' , FedExPaddedPak = 'FedEx_Padded_Pak' , FedExPak1 = 'FedEx_Pak_1' , FedExPak2 = 'FedEx_Pak_2' , FedExTube = 'FedEx_Tube' , FedExXlPak = 'FedEx_XL_Pak' , UpsBox10kg = 'UPS_Box_10kg' , UpsBox25kg = 'UPS_Box_25kg' , UpsExpressBox = 'UPS_Express_Box' , UpsExpressBoxLarge = 'UPS_Express_Box_Large' , UpsExpressBoxMedium = 'UPS_Express_Box_Medium' , UpsExpressBoxSmall = 'UPS_Express_Box_Small' , UpsExpressEnvelope = 'UPS_Express_Envelope' , UpsExpressHardPak = 'UPS_Express_Hard_Pak' , UpsExpressLegalEnvelope = 'UPS_Express_Legal_Envelope' , UpsExpressPak = 'UPS_Express_Pak' , UpsExpressTube = 'UPS_Express_Tube' , UpsLaboratoryPak = 'UPS_Laboratory_Pak' , UpsPadPak = 'UPS_Pad_Pak' , UpsPallet = 'UPS_Pallet' , UspsCard = 'USPS_Card' , UspsFlat = 'USPS_Flat' , UspsFlatRateCardboardEnvelope = 'USPS_FlatRateCardboardEnvelope' , UspsFlatRateEnvelope = 'USPS_FlatRateEnvelope' , UspsFlatRateGiftCardEnvelope = 'USPS_FlatRateGiftCardEnvelope' , UspsFlatRateLegalEnvelope = 'USPS_FlatRateLegalEnvelope' , UspsFlatRatePaddedEnvelope = 'USPS_FlatRatePaddedEnvelope' , UspsFlatRateWindowEnvelope = 'USPS_FlatRateWindowEnvelope' , UspsLargeFlatRateBoardGameBox = 'USPS_LargeFlatRateBoardGameBox' , UspsLargeFlatRateBox = 'USPS_LargeFlatRateBox' , UspsLetter = 'USPS_Letter' , UspsMediumFlatRateBox1 = 'USPS_MediumFlatRateBox1' , UspsMediumFlatRateBox2 = 'USPS_MediumFlatRateBox2' , UspsRegionalRateBoxA1 = 'USPS_RegionalRateBoxA1' , UspsRegionalRateBoxA2 = 'USPS_RegionalRateBoxA2' , UspsRegionalRateBoxB1 = 'USPS_RegionalRateBoxB1' , UspsRegionalRateBoxB2 = 'USPS_RegionalRateBoxB2' , UspsRegionalRateBoxC = 'USPS_RegionalRateBoxC' , UspsSmallFlatRateBox = 'USPS_SmallFlatRateBox' , UspsSmallFlatRateEnvelope = 'USPS_SmallFlatRateEnvelope' } export interface export interface RejectedShippingService { type { string } memberof CarrierName : string ; type { string } memberof ShippingServiceName : string ; type { string } memberof ShippingServiceId : string ; type { string } memberof RejectionReasonCode : string ; type { string } memberof RejectionReasonMessage ? : string ; } export interface export interface SellerInputDefinition { type { boolean } memberof IsRequired : boolean ; type { string } memberof DataType : string ; type { Array < Constraint > } memberof Constraints : Array < Constraint > ; type { string } memberof InputDisplayText : string ; type { InputTargetType } memberof InputTarget ? : InputTargetType | 'SHIPMENT_LEVEL' | 'ITEM_LEVEL' ; type { AdditionalSellerInput } memberof StoredValue : AdditionalSellerInput ; type { Array < string > } memberof RestrictedSetValues ? : Array < string > ; } export interface export interface Shipment { type { string } memberof ShipmentId : string ; type { string } memberof AmazonOrderId : string ; type { string } memberof SellerOrderId ? : string ; type { Array < Item > } memberof ItemList : Array < Item > ; type { Address } memberof ShipFromAddress : Address ; type { Address } memberof ShipToAddress : Address ; type { PackageDimensions } memberof PackageDimensions : PackageDimensions ; type { Weight } memberof Weight : Weight ; type { CurrencyAmount } memberof Insurance : CurrencyAmount ; type { ShippingService } memberof ShippingService : ShippingService ; type { Label } memberof Label : Label ; type { ShipmentStatus } memberof Status : ShipmentStatus | 'Purchased' | 'RefundPending' | 'RefundRejected' | 'RefundApplied' ; type { string } memberof TrackingId ? : string ; type { string } memberof CreatedDate : string ; type { string } memberof LastUpdatedDate ? : string ; } export interface export interface ShipmentRequestDetails { type { string } memberof AmazonOrderId : string ; type { string } memberof SellerOrderId ? : string ; type { Array < Item > } memberof ItemList : Array < Item > ; type { Address } memberof ShipFromAddress : Address ; type { PackageDimensions } memberof PackageDimensions : PackageDimensions ; type { Weight } memberof Weight : Weight ; type { string } memberof MustArriveByDate ? : string ; type { string } memberof ShipDate ? : string ; type { ShippingServiceOptions } memberof ShippingServiceOptions : ShippingServiceOptions ; type { LabelCustomization } memberof LabelCustomization ? : LabelCustomization ; } export enum { string } export enum ShipmentStatus { Purchased = 'Purchased' , RefundPending = 'RefundPending' , RefundRejected = 'RefundRejected' , RefundApplied = 'RefundApplied' } export interface export interface ShippingOfferingFilter { type { boolean } memberof IncludePackingSlipWithLabel ? : boolean ; type { boolean } memberof IncludeComplexShippingOptions ? : boolean ; type { CarrierWillPickUpOption } memberof CarrierWillPickUp ? : CarrierWillPickUpOption | 'CarrierWillPickUp' | 'ShipperWillDropOff' | 'NoPreference' ; type { DeliveryExperienceOption } memberof DeliveryExperience ? : DeliveryExperienceOption | 'DeliveryConfirmationWithAdultSignature' | 'DeliveryConfirmationWithSignature' | 'DeliveryConfirmationWithoutSignature' | 'NoTracking' | 'NoPreference' ; } export interface export interface ShippingService { type { string } memberof ShippingServiceName : string ; type { string } memberof CarrierName : string ; type { string } memberof ShippingServiceId : string ; type { string } memberof ShippingServiceOfferId : string ; type { string } memberof ShipDate : string ; type { string } memberof EarliestEstimatedDeliveryDate ? : string ; type { string } memberof LatestEstimatedDeliveryDate ? : string ; type { CurrencyAmount } memberof Rate : CurrencyAmount ; type { ShippingServiceOptions } memberof ShippingServiceOptions : ShippingServiceOptions ; type { AvailableShippingServiceOptions } memberof AvailableShippingServiceOptions ? : AvailableShippingServiceOptions ; type { Array < LabelFormat > } memberof AvailableLabelFormats ? : Array < ( LabelFormat | 'PDF' | 'PNG' | 'ZPL203' | 'ZPL300' | 'ShippingServiceDefault' ) > ; type { Array < LabelFormatOption > } memberof AvailableFormatOptionsForLabel ? : Array < LabelFormatOption > ; type { boolean } memberof RequiresAdditionalSellerInputs : boolean ; } export interface export interface ShippingServiceOptions { type { DeliveryExperienceType } memberof DeliveryExperience : DeliveryExperienceType | 'DeliveryConfirmationWithAdultSignature' | 'DeliveryConfirmationWithSignature' | 'DeliveryConfirmationWithoutSignature' | 'NoTracking' ; type { CurrencyAmount } memberof DeclaredValue ? : CurrencyAmount ; type { boolean } memberof CarrierWillPickUp : boolean ; type { CarrierWillPickUpOption } memberof CarrierWillPickUpOption ? : CarrierWillPickUpOption | 'CarrierWillPickUp' | 'ShipperWillDropOff' | 'NoPreference' ; type { LabelFormat } memberof LabelFormat ? : LabelFormat | 'PDF' | 'PNG' | 'ZPL203' | 'ZPL300' | 'ShippingServiceDefault' ; } export enum { string } export enum StandardIdForLabel { AmazonOrderId = 'AmazonOrderId' } export interface export interface TemporarilyUnavailableCarrier { type { string } memberof CarrierName : string ; } export interface export interface TermsAndConditionsNotAcceptedCarrier { type { string } memberof CarrierName : string ; } export enum { string } export enum UnitOfLength { Inches = 'inches' , Centimeters = 'centimeters' } export enum { string } export enum UnitOfWeight { Oz = 'oz' , G = 'g' } export interface export interface Weight { type { number } memberof Value : number ; type { UnitOfWeight } memberof Unit : UnitOfWeight | 'oz' | 'g' ; } export export const MerchantFulfillmentApiAxiosParamCreator = function ( configuration ? ) { return { param { string } shipmentId param { * } options throws cancelShipment : async ( shipmentId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'cancelShipment' , 'shipmentId' , shipmentId ) ; const localVarPath = `/mfn/v0/shipments/{shipmentId}` . replace ( `{${ "shipmentId" }}` , encodeURIComponent ( String ( shipmentId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'DELETE' , ... 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 } shipmentId param { * } options throws cancelShipmentOld : async ( shipmentId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'cancelShipmentOld' , 'shipmentId' , shipmentId ) ; const localVarPath = `/mfn/v0/shipments/{shipmentId}/cancel` . replace ( `{${ "shipmentId" }}` , encodeURIComponent ( String ( shipmentId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'PUT' , ... 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 { CreateShipmentRequest } body param { * } options throws createShipment : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'createShipment' , 'body' , body ) ; const localVarPath = `/mfn/v0/shipments` ; 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 ( body , localVarRequestOptions , configuration ) ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { GetAdditionalSellerInputsRequest } body param { * } options throws getAdditionalSellerInputs : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getAdditionalSellerInputs' , 'body' , body ) ; const localVarPath = `/mfn/v0/additionalSellerInputs` ; 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 ( body , localVarRequestOptions , configuration ) ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { GetAdditionalSellerInputsRequest } body param { * } options throws getAdditionalSellerInputsOld : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getAdditionalSellerInputsOld' , 'body' , body ) ; const localVarPath = `/mfn/v0/sellerInputs` ; 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 ( body , localVarRequestOptions , configuration ) ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { GetEligibleShipmentServicesRequest } body param { * } options throws getEligibleShipmentServices : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getEligibleShipmentServices' , 'body' , body ) ; const localVarPath = `/mfn/v0/eligibleShippingServices` ; 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 ( body , localVarRequestOptions , configuration ) ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { GetEligibleShipmentServicesRequest } body param { * } options throws getEligibleShipmentServicesOld : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getEligibleShipmentServicesOld' , 'body' , body ) ; const localVarPath = `/mfn/v0/eligibleServices` ; 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 ( body , localVarRequestOptions , configuration ) ; return { url : toPathString ( localVarUrlObj ) , options : localVarRequestOptions , } ; } , param { string } shipmentId param { * } options throws getShipment : async ( shipmentId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getShipment' , 'shipmentId' , shipmentId ) ; const localVarPath = `/mfn/v0/shipments/{shipmentId}` . replace ( `{${ "shipmentId" }}` , encodeURIComponent ( String ( shipmentId ) ) ) ; 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 , } ; } , } ; } ; export export const MerchantFulfillmentApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = MerchantFulfillmentApiAxiosParamCreator ( configuration ) ; return { param { string } shipmentId param { * } options throws async cancelShipment ( shipmentId , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . cancelShipment ( shipmentId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } shipmentId param { * } options throws async cancelShipmentOld ( shipmentId , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . cancelShipmentOld ( shipmentId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { CreateShipmentRequest } body param { * } options throws async createShipment ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . createShipment ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { GetAdditionalSellerInputsRequest } body param { * } options throws async getAdditionalSellerInputs ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getAdditionalSellerInputs ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { GetAdditionalSellerInputsRequest } body param { * } options throws async getAdditionalSellerInputsOld ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getAdditionalSellerInputsOld ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { GetEligibleShipmentServicesRequest } body param { * } options throws async getEligibleShipmentServices ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getEligibleShipmentServices ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { GetEligibleShipmentServicesRequest } body param { * } options throws async getEligibleShipmentServicesOld ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getEligibleShipmentServicesOld ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } shipmentId param { * } options throws async getShipment ( shipmentId , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getShipment ( shipmentId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const MerchantFulfillmentApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = MerchantFulfillmentApiFp ( configuration ) ; return { param { string } shipmentId param { * } options throws cancelShipment ( shipmentId , options ? ) { return localVarFp . cancelShipment ( shipmentId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } shipmentId param { * } options throws cancelShipmentOld ( shipmentId , options ? ) { return localVarFp . cancelShipmentOld ( shipmentId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { CreateShipmentRequest } body param { * } options throws createShipment ( body , options ? ) { return localVarFp . createShipment ( body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { GetAdditionalSellerInputsRequest } body param { * } options throws getAdditionalSellerInputs ( body , options ? ) { return localVarFp . getAdditionalSellerInputs ( body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { GetAdditionalSellerInputsRequest } body param { * } options throws getAdditionalSellerInputsOld ( body , options ? ) { return localVarFp . getAdditionalSellerInputsOld ( body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { GetEligibleShipmentServicesRequest } body param { * } options throws getEligibleShipmentServices ( body , options ? ) { return localVarFp . getEligibleShipmentServices ( body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { GetEligibleShipmentServicesRequest } body param { * } options throws getEligibleShipmentServicesOld ( body , options ? ) { return localVarFp . getEligibleShipmentServicesOld ( body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } shipmentId param { * } options throws getShipment ( shipmentId , options ? ) { return localVarFp . getShipment ( shipmentId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface MerchantFulfillmentApiCancelShipmentRequest { type { string } memberof readonly shipmentId : string ; } export interface export interface MerchantFulfillmentApiCancelShipmentOldRequest { type { string } memberof readonly shipmentId : string ; } export interface export interface MerchantFulfillmentApiCreateShipmentRequest { type { CreateShipmentRequest } memberof readonly body : CreateShipmentRequest ; } export interface export interface MerchantFulfillmentApiGetAdditionalSellerInputsRequest { type { GetAdditionalSellerInputsRequest } memberof readonly body : GetAdditionalSellerInputsRequest ; } export interface export interface MerchantFulfillmentApiGetAdditionalSellerInputsOldRequest { type { GetAdditionalSellerInputsRequest } memberof readonly body : GetAdditionalSellerInputsRequest ; } export interface export interface MerchantFulfillmentApiGetEligibleShipmentServicesRequest { type { GetEligibleShipmentServicesRequest } memberof readonly body : GetEligibleShipmentServicesRequest ; } export interface export interface MerchantFulfillmentApiGetEligibleShipmentServicesOldRequest { type { GetEligibleShipmentServicesRequest } memberof readonly body : GetEligibleShipmentServicesRequest ; } export interface export interface MerchantFulfillmentApiGetShipmentRequest { type { string } memberof readonly shipmentId : string ; } export class extends BaseAPI export class MerchantFulfillmentApi extends BaseAPI { param { MerchantFulfillmentApiCancelShipmentRequest } requestParameters param { * } options throws memberof public cancelShipment ( requestParameters , options ? ) { return MerchantFulfillmentApiFp ( this . configuration ) . cancelShipment ( requestParameters . shipmentId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { MerchantFulfillmentApiCancelShipmentOldRequest } requestParameters param { * } options throws memberof public cancelShipmentOld ( requestParameters , options ? ) { return MerchantFulfillmentApiFp ( this . configuration ) . cancelShipmentOld ( requestParameters . shipmentId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { MerchantFulfillmentApiCreateShipmentRequest } requestParameters param { * } options throws memberof public createShipment ( requestParameters , options ? ) { return MerchantFulfillmentApiFp ( this . configuration ) . createShipment ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { MerchantFulfillmentApiGetAdditionalSellerInputsRequest } requestParameters param { * } options throws memberof public getAdditionalSellerInputs ( requestParameters , options ? ) { return MerchantFulfillmentApiFp ( this . configuration ) . getAdditionalSellerInputs ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { MerchantFulfillmentApiGetAdditionalSellerInputsOldRequest } requestParameters param { * } options throws memberof public getAdditionalSellerInputsOld ( requestParameters , options ? ) { return MerchantFulfillmentApiFp ( this . configuration ) . getAdditionalSellerInputsOld ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { MerchantFulfillmentApiGetEligibleShipmentServicesRequest } requestParameters param { * } options throws memberof public getEligibleShipmentServices ( requestParameters , options ? ) { return MerchantFulfillmentApiFp ( this . configuration ) . getEligibleShipmentServices ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { MerchantFulfillmentApiGetEligibleShipmentServicesOldRequest } requestParameters param { * } options throws memberof public getEligibleShipmentServicesOld ( requestParameters , options ? ) { return MerchantFulfillmentApiFp ( this . configuration ) . getEligibleShipmentServicesOld ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { MerchantFulfillmentApiGetShipmentRequest } requestParameters param { * } options throws memberof public getShipment ( requestParameters , options ? ) { return MerchantFulfillmentApiFp ( this . configuration ) . getShipment ( requestParameters . shipmentId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }