/**
 * Selling Partner API for Retail Procurement Shipments
 * The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
 *
 * 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 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 postalCode ? : string ; type { string } memberof countryCode : string ; type { string } memberof phone ? : string ; } export interface export interface Carton { type { Array < ContainerIdentification > } memberof cartonIdentifiers ? : Array < ContainerIdentification > ; type { string } memberof cartonSequenceNumber : string ; type { Dimensions } memberof dimensions ? : Dimensions ; type { Weight } memberof weight ? : Weight ; type { string } memberof trackingNumber ? : string ; type { Array < ContainerItem > } memberof items : Array < ContainerItem > ; } export interface export interface CartonReferenceDetails { type { number } memberof cartonCount ? : number ; type { Array < string > } memberof cartonReferenceNumbers : Array < string > ; } export interface export interface ContainerIdentification { type { string } memberof containerIdentificationType : ContainerIdentificationContainerIdentificationTypeEnum | 'SSCC' | 'AMZNCC' | 'GTIN' | 'BPS' | 'CID' ; type { string } memberof containerIdentificationNumber : string ; } export enum { string } export enum ContainerIdentificationContainerIdentificationTypeEnum { Sscc = 'SSCC' , Amzncc = 'AMZNCC' , Gtin = 'GTIN' , Bps = 'BPS' , Cid = 'CID' } export interface export interface ContainerItem { type { string } memberof itemReference : string ; type { ItemQuantity } memberof shippedQuantity : ItemQuantity ; type { ItemDetails } memberof itemDetails ? : ItemDetails ; } export interface export interface Dimensions { type { string } memberof length : string ; type { string } memberof width : string ; type { string } memberof height : string ; type { string } memberof unitOfMeasure : DimensionsUnitOfMeasureEnum | 'In' | 'Ft' | 'Meter' | 'Yard' ; } export enum { string } export enum DimensionsUnitOfMeasureEnum { In = 'In' , Ft = 'Ft' , Meter = 'Meter' , Yard = 'Yard' } export interface export interface Duration { type { string } memberof durationUnit : DurationDurationUnitEnum | 'Days' | 'Months' ; type { number } memberof durationValue : number ; } export enum { string } export enum DurationDurationUnitEnum { Days = 'Days' , Months = 'Months' } export interface export interface Expiry { type { string } memberof manufacturerDate ? : string ; type { string } memberof expiryDate ? : string ; type { Duration } memberof expiryAfterDuration ? : Duration ; } export interface export interface ImportDetails { type { string } memberof methodOfPayment ? : ImportDetailsMethodOfPaymentEnum | 'PaidByBuyer' | 'CollectOnDelivery' | 'DefinedByBuyerAndSeller' | 'FOBPortOfCall' | 'PrepaidBySeller' | 'PaidBySeller' ; type { string } memberof sealNumber ? : string ; type { Route } memberof route ? : Route ; type { string } memberof importContainers ? : string ; type { Weight } memberof billableWeight ? : Weight ; type { string } memberof estimatedShipByDate ? : string ; } export enum { string } export enum ImportDetailsMethodOfPaymentEnum { PaidByBuyer = 'PaidByBuyer' , CollectOnDelivery = 'CollectOnDelivery' , DefinedByBuyerAndSeller = 'DefinedByBuyerAndSeller' , FobPortOfCall = 'FOBPortOfCall' , PrepaidBySeller = 'PrepaidBySeller' , PaidBySeller = 'PaidBySeller' } export interface export interface Item { type { string } memberof itemSequenceNumber : string ; type { string } memberof amazonProductIdentifier ? : string ; type { string } memberof vendorProductIdentifier ? : string ; type { ItemQuantity } memberof shippedQuantity : ItemQuantity ; type { ItemDetails } memberof itemDetails ? : ItemDetails ; } export interface export interface ItemDetails { type { string } memberof purchaseOrderNumber ? : string ; type { string } memberof lotNumber ? : string ; type { Expiry } memberof expiry ? : Expiry ; type { Money } memberof maximumRetailPrice ? : Money ; type { string } memberof handlingCode ? : ItemDetailsHandlingCodeEnum | 'Oversized' | 'Fragile' | 'Food' | 'HandleWithCare' ; } export enum { string } export enum ItemDetailsHandlingCodeEnum { Oversized = 'Oversized' , Fragile = 'Fragile' , Food = 'Food' , HandleWithCare = 'HandleWithCare' } export interface export interface ItemQuantity { type { number } memberof amount : number ; type { string } memberof unitOfMeasure : ItemQuantityUnitOfMeasureEnum | 'Cases' | 'Eaches' ; type { number } memberof unitSize ? : number ; } export enum { string } export enum ItemQuantityUnitOfMeasureEnum { Cases = 'Cases' , Eaches = 'Eaches' } export interface export interface Location { type { string } memberof type ? : string ; type { string } memberof locationCode ? : string ; type { string } memberof countryCode ? : 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 Money { type { string } memberof currencyCode : string ; type { string } memberof amount : string ; } export interface export interface Pallet { type { Array < ContainerIdentification > } memberof palletIdentifiers : Array < ContainerIdentification > ; type { number } memberof tier ? : number ; type { number } memberof block ? : number ; type { Dimensions } memberof dimensions ? : Dimensions ; type { Weight } memberof weight ? : Weight ; type { CartonReferenceDetails } memberof cartonReferenceDetails ? : CartonReferenceDetails ; type { Array < ContainerItem > } memberof items ? : Array < ContainerItem > ; } export interface export interface PartyIdentification { type { Address } memberof address ? : Address ; type { string } memberof partyId : string ; type { Array < TaxRegistrationDetails > } memberof taxRegistrationDetails ? : Array < TaxRegistrationDetails > ; } export interface export interface Route { type { Array < Stop > } memberof stops : Array < Stop > ; } export interface export interface ShipmentConfirmation { type { string } memberof shipmentIdentifier : string ; type { string } memberof shipmentConfirmationType : ShipmentConfirmationShipmentConfirmationTypeEnum | 'Original' | 'Replace' ; type { string } memberof shipmentType ? : ShipmentConfirmationShipmentTypeEnum | 'TruckLoad' | 'LessThanTruckLoad' | 'SmallParcel' ; type { string } memberof shipmentStructure ? : ShipmentConfirmationShipmentStructureEnum | 'PalletizedAssortmentCase' | 'LooseAssortmentCase' | 'PalletOfItems' | 'PalletizedStandardCase' | 'LooseStandardCase' | 'MasterPallet' | 'MasterCase' ; type { TransportationDetails } memberof transportationDetails ? : TransportationDetails ; type { string } memberof amazonReferenceNumber ? : string ; type { string } memberof shipmentConfirmationDate : string ; type { string } memberof shippedDate ? : string ; type { string } memberof estimatedDeliveryDate ? : string ; type { PartyIdentification } memberof sellingParty : PartyIdentification ; type { PartyIdentification } memberof shipFromParty : PartyIdentification ; type { PartyIdentification } memberof shipToParty : PartyIdentification ; type { ShipmentMeasurements } memberof shipmentMeasurements ? : ShipmentMeasurements ; type { ImportDetails } memberof importDetails ? : ImportDetails ; type { Array < Item > } memberof shippedItems : Array < Item > ; type { Array < Carton > } memberof cartons ? : Array < Carton > ; type { Array < Pallet > } memberof pallets ? : Array < Pallet > ; } export enum { string } export enum ShipmentConfirmationShipmentConfirmationTypeEnum { Original = 'Original' , Replace = 'Replace' } export enum { string } export enum ShipmentConfirmationShipmentTypeEnum { TruckLoad = 'TruckLoad' , LessThanTruckLoad = 'LessThanTruckLoad' , SmallParcel = 'SmallParcel' } export enum { string } export enum ShipmentConfirmationShipmentStructureEnum { PalletizedAssortmentCase = 'PalletizedAssortmentCase' , LooseAssortmentCase = 'LooseAssortmentCase' , PalletOfItems = 'PalletOfItems' , PalletizedStandardCase = 'PalletizedStandardCase' , LooseStandardCase = 'LooseStandardCase' , MasterPallet = 'MasterPallet' , MasterCase = 'MasterCase' } export interface export interface ShipmentMeasurements { type { Weight } memberof grossShipmentWeight ? : Weight ; type { Volume } memberof shipmentVolume ? : Volume ; type { number } memberof cartonCount ? : number ; type { number } memberof palletCount ? : number ; } export interface export interface Stop { type { string } memberof functionCode : StopFunctionCodeEnum | 'PortOfDischarge' | 'FreightPayableAt' | 'PortOfLoading' ; type { Location } memberof locationIdentification ? : Location ; type { string } memberof arrivalTime ? : string ; type { string } memberof departureTime ? : string ; } export enum { string } export enum StopFunctionCodeEnum { PortOfDischarge = 'PortOfDischarge' , FreightPayableAt = 'FreightPayableAt' , PortOfLoading = 'PortOfLoading' } export interface export interface SubmitShipmentConfirmationsRequest { type { Array < ShipmentConfirmation > } memberof shipmentConfirmations ? : Array < ShipmentConfirmation > ; } export interface export interface SubmitShipmentConfirmationsResponse { type { TransactionReference } memberof payload ? : TransactionReference ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface TaxRegistrationDetails { type { string } memberof taxRegistrationType : TaxRegistrationDetailsTaxRegistrationTypeEnum | 'VAT' | 'GST' ; type { string } memberof taxRegistrationNumber : string ; } export enum { string } export enum TaxRegistrationDetailsTaxRegistrationTypeEnum { Vat = 'VAT' , Gst = 'GST' } export interface export interface TransactionReference { type { string } memberof transactionId ? : string ; } export interface export interface TransportationDetails { type { string } memberof carrierScac ? : string ; type { string } memberof carrierShipmentReferenceNumber ? : string ; type { string } memberof transportationMode ? : TransportationDetailsTransportationModeEnum | 'Road' | 'Air' | 'Ocean' ; type { string } memberof billOfLadingNumber ? : string ; } export enum { string } export enum TransportationDetailsTransportationModeEnum { Road = 'Road' , Air = 'Air' , Ocean = 'Ocean' } export interface export interface Volume { type { string } memberof unitOfMeasure : VolumeUnitOfMeasureEnum | 'CuFt' | 'CuIn' | 'CuM' | 'CuY' ; type { string } memberof value : string ; } export enum { string } export enum VolumeUnitOfMeasureEnum { CuFt = 'CuFt' , CuIn = 'CuIn' , CuM = 'CuM' , CuY = 'CuY' } export interface export interface Weight { type { string } memberof unitOfMeasure : WeightUnitOfMeasureEnum | 'G' | 'Kg' | 'Oz' | 'Lb' ; type { string } memberof value : string ; } export enum { string } export enum WeightUnitOfMeasureEnum { G = 'G' , Kg = 'Kg' , Oz = 'Oz' , Lb = 'Lb' } export export const VendorShippingApiAxiosParamCreator = function ( configuration ? ) { return { param { SubmitShipmentConfirmationsRequest } body param { * } options throws submitShipmentConfirmations : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'submitShipmentConfirmations' , 'body' , body ) ; const localVarPath = `/vendor/shipping/v1/shipmentConfirmations` ; 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 VendorShippingApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = VendorShippingApiAxiosParamCreator ( configuration ) ; return { param { SubmitShipmentConfirmationsRequest } body param { * } options throws async submitShipmentConfirmations ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . submitShipmentConfirmations ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const VendorShippingApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = VendorShippingApiFp ( configuration ) ; return { param { SubmitShipmentConfirmationsRequest } body param { * } options throws submitShipmentConfirmations ( body , options ? ) { return localVarFp . submitShipmentConfirmations ( body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface VendorShippingApiSubmitShipmentConfirmationsRequest { type { SubmitShipmentConfirmationsRequest } memberof readonly body : SubmitShipmentConfirmationsRequest ; } export class extends BaseAPI export class VendorShippingApi extends BaseAPI { param { VendorShippingApiSubmitShipmentConfirmationsRequest } requestParameters param { * } options throws memberof public submitShipmentConfirmations ( requestParameters , options ? ) { return VendorShippingApiFp ( this . configuration ) . submitShipmentConfirmations ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }