/**
 * Selling Partner API for Solicitations
 * With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient\'s Message Center. The Solicitations API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
 *
 * 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 CreateProductReviewAndSellerFeedbackSolicitationResponse { type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetSchemaResponse { type { GetSchemaResponseLinks } memberof _links ? : GetSchemaResponseLinks ; type { { [ key : string ] : object ; } } memberof payload ? : { [ key ] : object ; } ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetSchemaResponseLinks { type { LinkObject } memberof self : LinkObject ; } export interface export interface GetSolicitationActionResponse { type { GetSolicitationActionResponseLinks } memberof _links ? : GetSolicitationActionResponseLinks ; type { GetSolicitationActionResponseEmbedded } memberof _embedded ? : GetSolicitationActionResponseEmbedded ; type { SolicitationsAction } memberof payload ? : SolicitationsAction ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetSolicitationActionResponseEmbedded { type { GetSchemaResponse } memberof schema ? : GetSchemaResponse ; } export interface export interface GetSolicitationActionResponseLinks { type { LinkObject } memberof self : LinkObject ; type { LinkObject } memberof schema : LinkObject ; } export interface export interface GetSolicitationActionsForOrderResponse { type { GetSolicitationActionsForOrderResponseLinks } memberof _links ? : GetSolicitationActionsForOrderResponseLinks ; type { GetSolicitationActionsForOrderResponseEmbedded } memberof _embedded ? : GetSolicitationActionsForOrderResponseEmbedded ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface GetSolicitationActionsForOrderResponseEmbedded { type { Array < GetSolicitationActionResponse > } memberof actions : Array < GetSolicitationActionResponse > ; } export interface export interface GetSolicitationActionsForOrderResponseLinks { type { LinkObject } memberof self : LinkObject ; type { Array < LinkObject > } memberof actions : Array < LinkObject > ; } export interface export interface LinkObject { type { string } memberof href : string ; type { string } memberof name ? : 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 SolicitationsAction { type { string } memberof name : string ; } export export const SolicitationsApiAxiosParamCreator = function ( configuration ? ) { return { param { string } amazonOrderId param { Array < string > } marketplaceIds param { * } options throws createProductReviewAndSellerFeedbackSolicitation : async ( amazonOrderId , marketplaceIds , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'createProductReviewAndSellerFeedbackSolicitation' , 'amazonOrderId' , amazonOrderId ) ; assertParamExists ( 'createProductReviewAndSellerFeedbackSolicitation' , 'marketplaceIds' , marketplaceIds ) ; const localVarPath = `/solicitations/v1/orders/{amazonOrderId}/solicitations/productReviewAndSellerFeedback` . replace ( `{${ "amazonOrderId" }}` , encodeURIComponent ( String ( amazonOrderId ) ) ) ; 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 ; 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 } amazonOrderId param { Array < string > } marketplaceIds param { * } options throws getSolicitationActionsForOrder : async ( amazonOrderId , marketplaceIds , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getSolicitationActionsForOrder' , 'amazonOrderId' , amazonOrderId ) ; assertParamExists ( 'getSolicitationActionsForOrder' , 'marketplaceIds' , marketplaceIds ) ; const localVarPath = `/solicitations/v1/orders/{amazonOrderId}` . replace ( `{${ "amazonOrderId" }}` , encodeURIComponent ( String ( amazonOrderId ) ) ) ; 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 , } ; } , } ; } ; export export const SolicitationsApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = SolicitationsApiAxiosParamCreator ( configuration ) ; return { param { string } amazonOrderId param { Array < string > } marketplaceIds param { * } options throws async createProductReviewAndSellerFeedbackSolicitation ( amazonOrderId , marketplaceIds , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . createProductReviewAndSellerFeedbackSolicitation ( amazonOrderId , marketplaceIds , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } amazonOrderId param { Array < string > } marketplaceIds param { * } options throws async getSolicitationActionsForOrder ( amazonOrderId , marketplaceIds , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getSolicitationActionsForOrder ( amazonOrderId , marketplaceIds , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const SolicitationsApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = SolicitationsApiFp ( configuration ) ; return { param { string } amazonOrderId param { Array < string > } marketplaceIds param { * } options throws createProductReviewAndSellerFeedbackSolicitation ( amazonOrderId , marketplaceIds , options ? ) { return localVarFp . createProductReviewAndSellerFeedbackSolicitation ( amazonOrderId , marketplaceIds , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } amazonOrderId param { Array < string > } marketplaceIds param { * } options throws getSolicitationActionsForOrder ( amazonOrderId , marketplaceIds , options ? ) { return localVarFp . getSolicitationActionsForOrder ( amazonOrderId , marketplaceIds , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface SolicitationsApiCreateProductReviewAndSellerFeedbackSolicitationRequest { type { string } memberof readonly amazonOrderId : string ; type { Array < string > } memberof readonly marketplaceIds : Array < string > ; } export interface export interface SolicitationsApiGetSolicitationActionsForOrderRequest { type { string } memberof readonly amazonOrderId : string ; type { Array < string > } memberof readonly marketplaceIds : Array < string > ; } export class extends BaseAPI export class SolicitationsApi extends BaseAPI { param { SolicitationsApiCreateProductReviewAndSellerFeedbackSolicitationRequest } requestParameters param { * } options throws memberof public createProductReviewAndSellerFeedbackSolicitation ( requestParameters , options ? ) { return SolicitationsApiFp ( this . configuration ) . createProductReviewAndSellerFeedbackSolicitation ( requestParameters . amazonOrderId , requestParameters . marketplaceIds , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { SolicitationsApiGetSolicitationActionsForOrderRequest } requestParameters param { * } options throws memberof public getSolicitationActionsForOrder ( requestParameters , options ? ) { return SolicitationsApiFp ( this . configuration ) . getSolicitationActionsForOrder ( requestParameters . amazonOrderId , requestParameters . marketplaceIds , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }