/**
 * Selling Partner API for Shipping
 * Provides programmatic access to Amazon Shipping APIs.
 *
 * The version of the OpenAPI document: v1
 *
 *
 * 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 AcceptedRate { type { Currency } memberof totalCharge ? : Currency ; type { Weight } memberof billedWeight ? : Weight ; type { ServiceType } memberof serviceType ? : ServiceType | 'Amazon Shipping Ground' | 'Amazon Shipping Standard' | 'Amazon Shipping Premium' ; type { ShippingPromiseSet } memberof promise ? : ShippingPromiseSet ; } export interface export interface Account { type { string } memberof accountId : string ; } 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 stateOrRegion : string ; type { string } memberof city : string ; type { string } memberof countryCode : string ; type { string } memberof postalCode : string ; type { string } memberof email ? : string ; type { Array < string > } memberof copyEmails ? : Array < string > ; type { string } memberof phoneNumber ? : string ; } export interface export interface CancelShipmentResponse { type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface Container { type { string } memberof containerType ? : ContainerContainerTypeEnum | 'PACKAGE' ; type { string } memberof containerReferenceId : string ; type { Currency } memberof value : Currency ; type { Dimensions } memberof dimensions : Dimensions ; type { Array < ContainerItem > } memberof items : Array < ContainerItem > ; type { Weight } memberof weight : Weight ; } export enum { string } export enum ContainerContainerTypeEnum { Package = 'PACKAGE' } export interface export interface ContainerItem { type { number } memberof quantity : number ; type { Currency } memberof unitPrice : Currency ; type { Weight } memberof unitWeight : Weight ; type { string } memberof title : string ; } export interface export interface ContainerSpecification { type { Dimensions } memberof dimensions : Dimensions ; type { Weight } memberof weight : Weight ; } export interface export interface CreateShipmentRequest { type { string } memberof clientReferenceId : string ; type { Address } memberof shipTo : Address ; type { Address } memberof shipFrom : Address ; type { Array < Container > } memberof containers : Array < Container > ; } export interface export interface CreateShipmentResponse { type { CreateShipmentResult } memberof payload ? : CreateShipmentResult ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface CreateShipmentResult { type { string } memberof shipmentId : string ; type { Array < Rate > } memberof eligibleRates : Array < Rate > ; } export interface export interface Currency { type { number } memberof value : number ; type { string } memberof unit : string ; } export interface export interface Dimensions { type { number } memberof length : number ; type { number } memberof width : number ; type { number } memberof height : number ; type { string } memberof unit : DimensionsUnitEnum | 'IN' | 'CM' ; } export enum { string } export enum DimensionsUnitEnum { In = 'IN' , Cm = 'CM' } export interface export interface Event { type { string } memberof eventCode : string ; type { string } memberof eventTime : string ; type { Location } memberof location ? : Location ; } export interface export interface GetAccountResponse { type { Account } memberof payload ? : Account ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetRatesRequest { type { Address } memberof shipTo : Address ; type { Address } memberof shipFrom : Address ; type { Array < ServiceType > } memberof serviceTypes : Array < ( ServiceType | 'Amazon Shipping Ground' | 'Amazon Shipping Standard' | 'Amazon Shipping Premium' ) > ; type { string } memberof shipDate ? : string ; type { Array < ContainerSpecification > } memberof containerSpecifications : Array < ContainerSpecification > ; } export interface export interface GetRatesResponse { type { GetRatesResult } memberof payload ? : GetRatesResult ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetRatesResult { type { Array < ServiceRate > } memberof serviceRates : Array < ServiceRate > ; } export interface export interface GetShipmentResponse { type { Shipment } memberof payload ? : Shipment ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetTrackingInformationResponse { type { TrackingInformation } memberof payload ? : TrackingInformation ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface Label { type { string } memberof labelStream ? : string ; type { LabelSpecification } memberof labelSpecification ? : LabelSpecification ; } export interface export interface LabelResult { type { string } memberof containerReferenceId ? : string ; type { string } memberof trackingId ? : string ; type { Label } memberof label ? : Label ; } export interface export interface LabelSpecification { type { string } memberof labelFormat : LabelSpecificationLabelFormatEnum | 'PNG' ; type { string } memberof labelStockSize : LabelSpecificationLabelStockSizeEnum | '4x6' ; } export enum { string } export enum LabelSpecificationLabelFormatEnum { Png = 'PNG' } export enum { string } export enum LabelSpecificationLabelStockSizeEnum { _4x6 = '4x6' } export interface export interface Location { type { string } memberof stateOrRegion ? : string ; type { string } memberof city ? : string ; type { string } memberof countryCode ? : string ; type { string } memberof postalCode ? : string ; } export interface export interface ModelError { type { string } memberof code : string ; type { string } memberof message : string ; type { string } memberof details ? : string ; } export interface export interface Party { type { string } memberof accountId ? : string ; } export interface export interface PurchaseLabelsRequest { type { string } memberof rateId : string ; type { LabelSpecification } memberof labelSpecification : LabelSpecification ; } export interface export interface PurchaseLabelsResponse { type { PurchaseLabelsResult } memberof payload ? : PurchaseLabelsResult ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface PurchaseLabelsResult { type { string } memberof shipmentId : string ; type { string } memberof clientReferenceId ? : string ; type { AcceptedRate } memberof acceptedRate : AcceptedRate ; type { Array < LabelResult > } memberof labelResults : Array < LabelResult > ; } export interface export interface PurchaseShipmentRequest { type { string } memberof clientReferenceId : string ; type { Address } memberof shipTo : Address ; type { Address } memberof shipFrom : Address ; type { string } memberof shipDate ? : string ; type { ServiceType } memberof serviceType : ServiceType | 'Amazon Shipping Ground' | 'Amazon Shipping Standard' | 'Amazon Shipping Premium' ; type { Array < Container > } memberof containers : Array < Container > ; type { LabelSpecification } memberof labelSpecification : LabelSpecification ; } export interface export interface PurchaseShipmentResponse { type { PurchaseShipmentResult } memberof payload ? : PurchaseShipmentResult ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface PurchaseShipmentResult { type { string } memberof shipmentId : string ; type { ServiceRate } memberof serviceRate : ServiceRate ; type { Array < LabelResult > } memberof labelResults : Array < LabelResult > ; } export interface export interface Rate { type { string } memberof rateId ? : string ; type { Currency } memberof totalCharge ? : Currency ; type { Weight } memberof billedWeight ? : Weight ; type { string } memberof expirationTime ? : string ; type { ServiceType } memberof serviceType ? : ServiceType | 'Amazon Shipping Ground' | 'Amazon Shipping Standard' | 'Amazon Shipping Premium' ; type { ShippingPromiseSet } memberof promise ? : ShippingPromiseSet ; } export interface export interface RetrieveShippingLabelRequest { type { LabelSpecification } memberof labelSpecification : LabelSpecification ; } export interface export interface RetrieveShippingLabelResponse { type { RetrieveShippingLabelResult } memberof payload ? : RetrieveShippingLabelResult ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface RetrieveShippingLabelResult { type { string } memberof labelStream : string ; type { LabelSpecification } memberof labelSpecification : LabelSpecification ; } export interface export interface ServiceRate { type { Currency } memberof totalCharge : Currency ; type { Weight } memberof billableWeight : Weight ; type { ServiceType } memberof serviceType : ServiceType | 'Amazon Shipping Ground' | 'Amazon Shipping Standard' | 'Amazon Shipping Premium' ; type { ShippingPromiseSet } memberof promise : ShippingPromiseSet ; } export enum { string } export enum ServiceType { Ground = 'Amazon Shipping Ground' , Standard = 'Amazon Shipping Standard' , Premium = 'Amazon Shipping Premium' } export interface export interface Shipment { type { string } memberof shipmentId : string ; type { string } memberof clientReferenceId : string ; type { Address } memberof shipFrom : Address ; type { Address } memberof shipTo : Address ; type { AcceptedRate } memberof acceptedRate ? : AcceptedRate ; type { Party } memberof shipper ? : Party ; type { Array < Container > } memberof containers : Array < Container > ; } export interface export interface ShippingPromiseSet { type { TimeRange } memberof deliveryWindow ? : TimeRange ; type { TimeRange } memberof receiveWindow ? : TimeRange ; } export interface export interface TimeRange { type { string } memberof start ? : string ; type { string } memberof end ? : string ; } export interface export interface TrackingInformation { type { string } memberof trackingId : string ; type { TrackingSummary } memberof summary : TrackingSummary ; type { string } memberof promisedDeliveryDate : string ; type { Array < Event > } memberof eventHistory : Array < Event > ; } export interface export interface TrackingSummary { type { string } memberof status ? : string ; } export interface export interface Weight { type { string } memberof unit : WeightUnitEnum | 'g' | 'kg' | 'oz' | 'lb' ; type { number } memberof value : number ; } export enum { string } export enum WeightUnitEnum { G = 'g' , Kg = 'kg' , Oz = 'oz' , Lb = 'lb' } export export const ShippingApiAxiosParamCreator = function ( configuration ? ) { return { param { string } shipmentId param { * } options throws cancelShipment : async ( shipmentId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'cancelShipment' , 'shipmentId' , shipmentId ) ; const localVarPath = `/shipping/v1/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 : 'POST' , ... 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 = `/shipping/v1/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 { * } options throws getAccount : async ( options = { } ) : Promise < RequestArgs > => { const localVarPath = `/shipping/v1/account` ; 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 { GetRatesRequest } body param { * } options throws getRates : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getRates' , 'body' , body ) ; const localVarPath = `/shipping/v1/rates` ; 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 = `/shipping/v1/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 , } ; } , param { string } trackingId param { * } options throws getTrackingInformation : async ( trackingId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getTrackingInformation' , 'trackingId' , trackingId ) ; const localVarPath = `/shipping/v1/tracking/{trackingId}` . replace ( `{${ "trackingId" }}` , encodeURIComponent ( String ( trackingId ) ) ) ; 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 } shipmentId param { PurchaseLabelsRequest } body param { * } options throws purchaseLabels : async ( shipmentId , body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'purchaseLabels' , 'shipmentId' , shipmentId ) ; assertParamExists ( 'purchaseLabels' , 'body' , body ) ; const localVarPath = `/shipping/v1/shipments/{shipmentId}/purchaseLabels` . replace ( `{${ "shipmentId" }}` , encodeURIComponent ( String ( shipmentId ) ) ) ; 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 { PurchaseShipmentRequest } body param { * } options throws purchaseShipment : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'purchaseShipment' , 'body' , body ) ; const localVarPath = `/shipping/v1/purchaseShipment` ; 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 { string } trackingId param { RetrieveShippingLabelRequest } body param { * } options throws retrieveShippingLabel : async ( shipmentId , trackingId , body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'retrieveShippingLabel' , 'shipmentId' , shipmentId ) ; assertParamExists ( 'retrieveShippingLabel' , 'trackingId' , trackingId ) ; assertParamExists ( 'retrieveShippingLabel' , 'body' , body ) ; const localVarPath = `/shipping/v1/shipments/{shipmentId}/containers/{trackingId}/label` . replace ( `{${ "shipmentId" }}` , encodeURIComponent ( String ( shipmentId ) ) ) . replace ( `{${ "trackingId" }}` , encodeURIComponent ( String ( trackingId ) ) ) ; 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 , } ; } , } ; } ; export export const ShippingApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = ShippingApiAxiosParamCreator ( 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 { CreateShipmentRequest } body param { * } options throws async createShipment ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . createShipment ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { * } options throws async getAccount ( options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getAccount ( options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { GetRatesRequest } body param { * } options throws async getRates ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getRates ( 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 ) ; } , param { string } trackingId param { * } options throws async getTrackingInformation ( trackingId , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getTrackingInformation ( trackingId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } shipmentId param { PurchaseLabelsRequest } body param { * } options throws async purchaseLabels ( shipmentId , body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . purchaseLabels ( shipmentId , body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { PurchaseShipmentRequest } body param { * } options throws async purchaseShipment ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . purchaseShipment ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } shipmentId param { string } trackingId param { RetrieveShippingLabelRequest } body param { * } options throws async retrieveShippingLabel ( shipmentId , trackingId , body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . retrieveShippingLabel ( shipmentId , trackingId , body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const ShippingApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = ShippingApiFp ( configuration ) ; return { param { string } shipmentId param { * } options throws cancelShipment ( shipmentId , options ? ) { return localVarFp . cancelShipment ( 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 { * } options throws getAccount ( options ? ) { return localVarFp . getAccount ( options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { GetRatesRequest } body param { * } options throws getRates ( body , options ? ) { return localVarFp . getRates ( 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 ) ) ; } , param { string } trackingId param { * } options throws getTrackingInformation ( trackingId , options ? ) { return localVarFp . getTrackingInformation ( trackingId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } shipmentId param { PurchaseLabelsRequest } body param { * } options throws purchaseLabels ( shipmentId , body , options ? ) { return localVarFp . purchaseLabels ( shipmentId , body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { PurchaseShipmentRequest } body param { * } options throws purchaseShipment ( body , options ? ) { return localVarFp . purchaseShipment ( body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } shipmentId param { string } trackingId param { RetrieveShippingLabelRequest } body param { * } options throws retrieveShippingLabel ( shipmentId , trackingId , body , options ? ) { return localVarFp . retrieveShippingLabel ( shipmentId , trackingId , body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface ShippingApiCancelShipmentRequest { type { string } memberof readonly shipmentId : string ; } export interface export interface ShippingApiCreateShipmentRequest { type { CreateShipmentRequest } memberof readonly body : CreateShipmentRequest ; } export interface export interface ShippingApiGetRatesRequest { type { GetRatesRequest } memberof readonly body : GetRatesRequest ; } export interface export interface ShippingApiGetShipmentRequest { type { string } memberof readonly shipmentId : string ; } export interface export interface ShippingApiGetTrackingInformationRequest { type { string } memberof readonly trackingId : string ; } export interface export interface ShippingApiPurchaseLabelsRequest { type { string } memberof readonly shipmentId : string ; type { PurchaseLabelsRequest } memberof readonly body : PurchaseLabelsRequest ; } export interface export interface ShippingApiPurchaseShipmentRequest { type { PurchaseShipmentRequest } memberof readonly body : PurchaseShipmentRequest ; } export interface export interface ShippingApiRetrieveShippingLabelRequest { type { string } memberof readonly shipmentId : string ; type { string } memberof readonly trackingId : string ; type { RetrieveShippingLabelRequest } memberof readonly body : RetrieveShippingLabelRequest ; } export class extends BaseAPI export class ShippingApi extends BaseAPI { param { ShippingApiCancelShipmentRequest } requestParameters param { * } options throws memberof public cancelShipment ( requestParameters , options ? ) { return ShippingApiFp ( this . configuration ) . cancelShipment ( requestParameters . shipmentId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { ShippingApiCreateShipmentRequest } requestParameters param { * } options throws memberof public createShipment ( requestParameters , options ? ) { return ShippingApiFp ( this . configuration ) . createShipment ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { * } options throws memberof public getAccount ( options ? ) { return ShippingApiFp ( this . configuration ) . getAccount ( options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { ShippingApiGetRatesRequest } requestParameters param { * } options throws memberof public getRates ( requestParameters , options ? ) { return ShippingApiFp ( this . configuration ) . getRates ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { ShippingApiGetShipmentRequest } requestParameters param { * } options throws memberof public getShipment ( requestParameters , options ? ) { return ShippingApiFp ( this . configuration ) . getShipment ( requestParameters . shipmentId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { ShippingApiGetTrackingInformationRequest } requestParameters param { * } options throws memberof public getTrackingInformation ( requestParameters , options ? ) { return ShippingApiFp ( this . configuration ) . getTrackingInformation ( requestParameters . trackingId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { ShippingApiPurchaseLabelsRequest } requestParameters param { * } options throws memberof public purchaseLabels ( requestParameters , options ? ) { return ShippingApiFp ( this . configuration ) . purchaseLabels ( requestParameters . shipmentId , requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { ShippingApiPurchaseShipmentRequest } requestParameters param { * } options throws memberof public purchaseShipment ( requestParameters , options ? ) { return ShippingApiFp ( this . configuration ) . purchaseShipment ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { ShippingApiRetrieveShippingLabelRequest } requestParameters param { * } options throws memberof public retrieveShippingLabel ( requestParameters , options ? ) { return ShippingApiFp ( this . configuration ) . retrieveShippingLabel ( requestParameters . shipmentId , requestParameters . trackingId , requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }