/**
 * Selling Partner API for FBA Inbound Eligibilty
 * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers.
 *
 * 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 GetItemEligibilityPreviewResponse { type { ItemEligibilityPreview } memberof payload ? : ItemEligibilityPreview ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface ItemEligibilityPreview { type { string } memberof asin : string ; type { string } memberof marketplaceId ? : string ; type { string } memberof program : ItemEligibilityPreviewProgramEnum | 'INBOUND' | 'COMMINGLING' ; type { boolean } memberof isEligibleForProgram : boolean ; type { Array < string > } memberof ineligibilityReasonList ? : Array < ( ItemEligibilityPreviewIneligibilityReasonListEnum | 'FBA_INB_0004' | 'FBA_INB_0006' | 'FBA_INB_0007' | 'FBA_INB_0008' | 'FBA_INB_0009' | 'FBA_INB_0010' | 'FBA_INB_0011' | 'FBA_INB_0012' | 'FBA_INB_0013' | 'FBA_INB_0014' | 'FBA_INB_0015' | 'FBA_INB_0016' | 'FBA_INB_0017' | 'FBA_INB_0018' | 'FBA_INB_0019' | 'FBA_INB_0034' | 'FBA_INB_0035' | 'FBA_INB_0036' | 'FBA_INB_0037' | 'FBA_INB_0038' | 'FBA_INB_0050' | 'FBA_INB_0051' | 'FBA_INB_0053' | 'FBA_INB_0055' | 'FBA_INB_0056' | 'FBA_INB_0059' | 'FBA_INB_0065' | 'FBA_INB_0066' | 'FBA_INB_0067' | 'FBA_INB_0068' | 'FBA_INB_0095' | 'FBA_INB_0097' | 'FBA_INB_0098' | 'FBA_INB_0099' | 'FBA_INB_0100' | 'FBA_INB_0103' | 'FBA_INB_0104' | 'UNKNOWN_INB_ERROR_CODE' ) > ; } export enum { string } export enum ItemEligibilityPreviewProgramEnum { Inbound = 'INBOUND' , Commingling = 'COMMINGLING' } export enum { string } export enum ItemEligibilityPreviewIneligibilityReasonListEnum { FbaInb0004 = 'FBA_INB_0004' , FbaInb0006 = 'FBA_INB_0006' , FbaInb0007 = 'FBA_INB_0007' , FbaInb0008 = 'FBA_INB_0008' , FbaInb0009 = 'FBA_INB_0009' , FbaInb0010 = 'FBA_INB_0010' , FbaInb0011 = 'FBA_INB_0011' , FbaInb0012 = 'FBA_INB_0012' , FbaInb0013 = 'FBA_INB_0013' , FbaInb0014 = 'FBA_INB_0014' , FbaInb0015 = 'FBA_INB_0015' , FbaInb0016 = 'FBA_INB_0016' , FbaInb0017 = 'FBA_INB_0017' , FbaInb0018 = 'FBA_INB_0018' , FbaInb0019 = 'FBA_INB_0019' , FbaInb0034 = 'FBA_INB_0034' , FbaInb0035 = 'FBA_INB_0035' , FbaInb0036 = 'FBA_INB_0036' , FbaInb0037 = 'FBA_INB_0037' , FbaInb0038 = 'FBA_INB_0038' , FbaInb0050 = 'FBA_INB_0050' , FbaInb0051 = 'FBA_INB_0051' , FbaInb0053 = 'FBA_INB_0053' , FbaInb0055 = 'FBA_INB_0055' , FbaInb0056 = 'FBA_INB_0056' , FbaInb0059 = 'FBA_INB_0059' , FbaInb0065 = 'FBA_INB_0065' , FbaInb0066 = 'FBA_INB_0066' , FbaInb0067 = 'FBA_INB_0067' , FbaInb0068 = 'FBA_INB_0068' , FbaInb0095 = 'FBA_INB_0095' , FbaInb0097 = 'FBA_INB_0097' , FbaInb0098 = 'FBA_INB_0098' , FbaInb0099 = 'FBA_INB_0099' , FbaInb0100 = 'FBA_INB_0100' , FbaInb0103 = 'FBA_INB_0103' , FbaInb0104 = 'FBA_INB_0104' , UnknownInbErrorCode = 'UNKNOWN_INB_ERROR_CODE' } export interface export interface ModelError { type { string } memberof code : string ; type { string } memberof message ? : string ; type { string } memberof details ? : string ; } export export const FbaInboundApiAxiosParamCreator = function ( configuration ? ) { return { param { string } asin param { 'INBOUND' | 'COMMINGLING' } program param { Array < string > } marketplaceIds param { * } options throws getItemEligibilityPreview : async ( asin , program , marketplaceIds ? , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getItemEligibilityPreview' , 'asin' , asin ) ; assertParamExists ( 'getItemEligibilityPreview' , 'program' , program ) ; const localVarPath = `/fba/inbound/v1/eligibility/itemPreview` ; 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 ( marketplaceIds ) { localVarQueryParameter [ 'marketplaceIds' ] = marketplaceIds . join ( COLLECTION_FORMATS . csv ) ; } if ( asin !== undefined ) { localVarQueryParameter [ 'asin' ] = asin ; } if ( program !== undefined ) { localVarQueryParameter [ 'program' ] = program ; } 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 FbaInboundApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = FbaInboundApiAxiosParamCreator ( configuration ) ; return { param { string } asin param { 'INBOUND' | 'COMMINGLING' } program param { Array < string > } marketplaceIds param { * } options throws async getItemEligibilityPreview ( asin , program , marketplaceIds ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getItemEligibilityPreview ( asin , program , marketplaceIds , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const FbaInboundApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = FbaInboundApiFp ( configuration ) ; return { param { string } asin param { 'INBOUND' | 'COMMINGLING' } program param { Array < string > } marketplaceIds param { * } options throws getItemEligibilityPreview ( asin , program , marketplaceIds ? , options ? ) { return localVarFp . getItemEligibilityPreview ( asin , program , marketplaceIds , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface FbaInboundApiGetItemEligibilityPreviewRequest { type { string } memberof readonly asin : string ; type { 'INBOUND' | 'COMMINGLING' } memberof readonly program : 'INBOUND' | 'COMMINGLING' ; type { Array < string > } memberof readonly marketplaceIds ? : Array < string > ; } export class extends BaseAPI export class FbaInboundApi extends BaseAPI { param { FbaInboundApiGetItemEligibilityPreviewRequest } requestParameters param { * } options throws memberof public getItemEligibilityPreview ( requestParameters , options ? ) { return FbaInboundApiFp ( this . configuration ) . getItemEligibilityPreview ( requestParameters . asin , requestParameters . program , requestParameters . marketplaceIds , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }