/**
 * Selling Partner API for Authorization
 * The Selling Partner API for Authorization helps developers manage authorizations and check the specific permissions associated with a given authorization.
 *
 * 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 AuthorizationCode { type { string } memberof authorizationCode ? : string ; } export interface export interface GetAuthorizationCodeResponse { type { AuthorizationCode } memberof payload ? : AuthorizationCode ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface ModelError { type { string } memberof code : string ; type { string } memberof message : string ; type { string } memberof details ? : string ; } export export const AuthorizationApiAxiosParamCreator = function ( configuration ? ) { return { summary param { string } sellingPartnerId param { string } developerId param { string } mwsAuthToken param { * } options throws getAuthorizationCode : async ( sellingPartnerId , developerId , mwsAuthToken , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getAuthorizationCode' , 'sellingPartnerId' , sellingPartnerId ) ; assertParamExists ( 'getAuthorizationCode' , 'developerId' , developerId ) ; assertParamExists ( 'getAuthorizationCode' , 'mwsAuthToken' , mwsAuthToken ) ; const localVarPath = `/authorization/v1/authorizationCode` ; 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 ( sellingPartnerId !== undefined ) { localVarQueryParameter [ 'sellingPartnerId' ] = sellingPartnerId ; } if ( developerId !== undefined ) { localVarQueryParameter [ 'developerId' ] = developerId ; } if ( mwsAuthToken !== undefined ) { localVarQueryParameter [ 'mwsAuthToken' ] = mwsAuthToken ; } 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 AuthorizationApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = AuthorizationApiAxiosParamCreator ( configuration ) ; return { summary param { string } sellingPartnerId param { string } developerId param { string } mwsAuthToken param { * } options throws async getAuthorizationCode ( sellingPartnerId , developerId , mwsAuthToken , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getAuthorizationCode ( sellingPartnerId , developerId , mwsAuthToken , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const AuthorizationApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = AuthorizationApiFp ( configuration ) ; return { summary param { string } sellingPartnerId param { string } developerId param { string } mwsAuthToken param { * } options throws getAuthorizationCode ( sellingPartnerId , developerId , mwsAuthToken , options ? ) { return localVarFp . getAuthorizationCode ( sellingPartnerId , developerId , mwsAuthToken , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface AuthorizationApiGetAuthorizationCodeRequest { type { string } memberof readonly sellingPartnerId : string ; type { string } memberof readonly developerId : string ; type { string } memberof readonly mwsAuthToken : string ; } export class extends BaseAPI export class AuthorizationApi extends BaseAPI { summary param { AuthorizationApiGetAuthorizationCodeRequest } requestParameters param { * } options throws memberof public getAuthorizationCode ( requestParameters , options ? ) { return AuthorizationApiFp ( this . configuration ) . getAuthorizationCode ( requestParameters . sellingPartnerId , requestParameters . developerId , requestParameters . mwsAuthToken , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }