/**
 * Selling Partner API for FBA Small And Light
 * The Selling Partner API for FBA Small and Light lets you help sellers manage their listings in the Small and Light program. The program reduces the cost of fulfilling orders for small and lightweight FBA inventory. You can enroll or remove items from the program and check item eligibility and enrollment status. You can also preview the estimated program fees charged to a seller for items sold while enrolled in the program.
 *
 * 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 ErrorList { type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface FeeLineItem { type { string } memberof feeType : FeeLineItemFeeTypeEnum | 'FBAWeightBasedFee' | 'FBAPerOrderFulfillmentFee' | 'FBAPerUnitFulfillmentFee' | 'Commission' ; type { MoneyType } memberof feeCharge : MoneyType ; } export enum { string } export enum FeeLineItemFeeTypeEnum { FbaWeightBasedFee = 'FBAWeightBasedFee' , FbaPerOrderFulfillmentFee = 'FBAPerOrderFulfillmentFee' , FbaPerUnitFulfillmentFee = 'FBAPerUnitFulfillmentFee' , Commission = 'Commission' } export interface export interface FeePreview { type { string } memberof asin ? : string ; type { MoneyType } memberof price ? : MoneyType ; type { Array < FeeLineItem > } memberof feeBreakdown ? : Array < FeeLineItem > ; type { MoneyType } memberof totalFees ? : MoneyType ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface Item { type { string } memberof asin : string ; type { MoneyType } memberof price : MoneyType ; } export interface export interface ModelError { type { string } memberof code : string ; type { string } memberof message : string ; type { string } memberof details ? : string ; } export interface export interface MoneyType { type { string } memberof currencyCode ? : string ; type { number } memberof amount ? : number ; } export interface export interface SmallAndLightEligibility { type { string } memberof marketplaceId : string ; type { string } memberof sellerSKU : string ; type { SmallAndLightEligibilityStatus } memberof status : SmallAndLightEligibilityStatus | 'ELIGIBLE' | 'NOT_ELIGIBLE' ; } export enum { string } export enum SmallAndLightEligibilityStatus { Eligible = 'ELIGIBLE' , NotEligible = 'NOT_ELIGIBLE' } export interface export interface SmallAndLightEnrollment { type { string } memberof marketplaceId : string ; type { string } memberof sellerSKU : string ; type { SmallAndLightEnrollmentStatus } memberof status : SmallAndLightEnrollmentStatus | 'ENROLLED' | 'NOT_ENROLLED' ; } export enum { string } export enum SmallAndLightEnrollmentStatus { Enrolled = 'ENROLLED' , NotEnrolled = 'NOT_ENROLLED' } export interface export interface SmallAndLightFeePreviewRequest { type { string } memberof marketplaceId : string ; type { Array < Item > } memberof items : Array < Item > ; } export interface export interface SmallAndLightFeePreviews { type { Array < FeePreview > } memberof data ? : Array < FeePreview > ; } export export const SmallAndLightApiAxiosParamCreator = function ( configuration ? ) { return { param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws deleteSmallAndLightEnrollmentBySellerSKU : async ( sellerSKU , marketplaceIds , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'deleteSmallAndLightEnrollmentBySellerSKU' , 'sellerSKU' , sellerSKU ) ; assertParamExists ( 'deleteSmallAndLightEnrollmentBySellerSKU' , 'marketplaceIds' , marketplaceIds ) ; const localVarPath = `/fba/smallAndLight/v1/enrollments/{sellerSKU}` . replace ( `{${ "sellerSKU" }}` , encodeURIComponent ( String ( sellerSKU ) ) ) ; 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 ; if ( marketplaceIds ) { localVarQueryParameter [ 'marketplaceIds' ] = marketplaceIds . join ( COLLECTION_FORMATS . csv ) ; } 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 } sellerSKU param { Array < string > } marketplaceIds param { * } options throws getSmallAndLightEligibilityBySellerSKU : async ( sellerSKU , marketplaceIds , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getSmallAndLightEligibilityBySellerSKU' , 'sellerSKU' , sellerSKU ) ; assertParamExists ( 'getSmallAndLightEligibilityBySellerSKU' , 'marketplaceIds' , marketplaceIds ) ; const localVarPath = `/fba/smallAndLight/v1/eligibilities/{sellerSKU}` . replace ( `{${ "sellerSKU" }}` , encodeURIComponent ( String ( sellerSKU ) ) ) ; 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 ) ; } 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 } sellerSKU param { Array < string > } marketplaceIds param { * } options throws getSmallAndLightEnrollmentBySellerSKU : async ( sellerSKU , marketplaceIds , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getSmallAndLightEnrollmentBySellerSKU' , 'sellerSKU' , sellerSKU ) ; assertParamExists ( 'getSmallAndLightEnrollmentBySellerSKU' , 'marketplaceIds' , marketplaceIds ) ; const localVarPath = `/fba/smallAndLight/v1/enrollments/{sellerSKU}` . replace ( `{${ "sellerSKU" }}` , encodeURIComponent ( String ( sellerSKU ) ) ) ; 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 ) ; } 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 { SmallAndLightFeePreviewRequest } body param { * } options throws getSmallAndLightFeePreview : async ( body , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getSmallAndLightFeePreview' , 'body' , body ) ; const localVarPath = `/fba/smallAndLight/v1/feePreviews` ; 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 } sellerSKU param { Array < string > } marketplaceIds param { * } options throws putSmallAndLightEnrollmentBySellerSKU : async ( sellerSKU , marketplaceIds , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'putSmallAndLightEnrollmentBySellerSKU' , 'sellerSKU' , sellerSKU ) ; assertParamExists ( 'putSmallAndLightEnrollmentBySellerSKU' , 'marketplaceIds' , marketplaceIds ) ; const localVarPath = `/fba/smallAndLight/v1/enrollments/{sellerSKU}` . replace ( `{${ "sellerSKU" }}` , encodeURIComponent ( String ( sellerSKU ) ) ) ; 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 ; if ( marketplaceIds ) { localVarQueryParameter [ 'marketplaceIds' ] = marketplaceIds . join ( COLLECTION_FORMATS . csv ) ; } 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 SmallAndLightApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = SmallAndLightApiAxiosParamCreator ( configuration ) ; return { param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws async deleteSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . deleteSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws async getSmallAndLightEligibilityBySellerSKU ( sellerSKU , marketplaceIds , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getSmallAndLightEligibilityBySellerSKU ( sellerSKU , marketplaceIds , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws async getSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { SmallAndLightFeePreviewRequest } body param { * } options throws async getSmallAndLightFeePreview ( body , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getSmallAndLightFeePreview ( body , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws async putSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . putSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const SmallAndLightApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = SmallAndLightApiFp ( configuration ) ; return { param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws deleteSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ? ) { return localVarFp . deleteSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws getSmallAndLightEligibilityBySellerSKU ( sellerSKU , marketplaceIds , options ? ) { return localVarFp . getSmallAndLightEligibilityBySellerSKU ( sellerSKU , marketplaceIds , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws getSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ? ) { return localVarFp . getSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { SmallAndLightFeePreviewRequest } body param { * } options throws getSmallAndLightFeePreview ( body , options ? ) { return localVarFp . getSmallAndLightFeePreview ( body , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } sellerSKU param { Array < string > } marketplaceIds param { * } options throws putSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ? ) { return localVarFp . putSmallAndLightEnrollmentBySellerSKU ( sellerSKU , marketplaceIds , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface SmallAndLightApiDeleteSmallAndLightEnrollmentBySellerSKURequest { type { string } memberof readonly sellerSKU : string ; type { Array < string > } memberof readonly marketplaceIds : Array < string > ; } export interface export interface SmallAndLightApiGetSmallAndLightEligibilityBySellerSKURequest { type { string } memberof readonly sellerSKU : string ; type { Array < string > } memberof readonly marketplaceIds : Array < string > ; } export interface export interface SmallAndLightApiGetSmallAndLightEnrollmentBySellerSKURequest { type { string } memberof readonly sellerSKU : string ; type { Array < string > } memberof readonly marketplaceIds : Array < string > ; } export interface export interface SmallAndLightApiGetSmallAndLightFeePreviewRequest { type { SmallAndLightFeePreviewRequest } memberof readonly body : SmallAndLightFeePreviewRequest ; } export interface export interface SmallAndLightApiPutSmallAndLightEnrollmentBySellerSKURequest { type { string } memberof readonly sellerSKU : string ; type { Array < string > } memberof readonly marketplaceIds : Array < string > ; } export class extends BaseAPI export class SmallAndLightApi extends BaseAPI { param { SmallAndLightApiDeleteSmallAndLightEnrollmentBySellerSKURequest } requestParameters param { * } options throws memberof public deleteSmallAndLightEnrollmentBySellerSKU ( requestParameters , options ? ) { return SmallAndLightApiFp ( this . configuration ) . deleteSmallAndLightEnrollmentBySellerSKU ( requestParameters . sellerSKU , requestParameters . marketplaceIds , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { SmallAndLightApiGetSmallAndLightEligibilityBySellerSKURequest } requestParameters param { * } options throws memberof public getSmallAndLightEligibilityBySellerSKU ( requestParameters , options ? ) { return SmallAndLightApiFp ( this . configuration ) . getSmallAndLightEligibilityBySellerSKU ( requestParameters . sellerSKU , requestParameters . marketplaceIds , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { SmallAndLightApiGetSmallAndLightEnrollmentBySellerSKURequest } requestParameters param { * } options throws memberof public getSmallAndLightEnrollmentBySellerSKU ( requestParameters , options ? ) { return SmallAndLightApiFp ( this . configuration ) . getSmallAndLightEnrollmentBySellerSKU ( requestParameters . sellerSKU , requestParameters . marketplaceIds , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { SmallAndLightApiGetSmallAndLightFeePreviewRequest } requestParameters param { * } options throws memberof public getSmallAndLightFeePreview ( requestParameters , options ? ) { return SmallAndLightApiFp ( this . configuration ) . getSmallAndLightFeePreview ( requestParameters . body , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { SmallAndLightApiPutSmallAndLightEnrollmentBySellerSKURequest } requestParameters param { * } options throws memberof public putSmallAndLightEnrollmentBySellerSKU ( requestParameters , options ? ) { return SmallAndLightApiFp ( this . configuration ) . putSmallAndLightEnrollmentBySellerSKU ( requestParameters . sellerSKU , requestParameters . marketplaceIds , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }