/**
 * Selling Partner API for Direct Fulfillment Transaction Status
 * The Selling Partner API for Direct Fulfillment Transaction Status provides programmatic access to a direct fulfillment vendor\'s transaction status.
 *
 * 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 GetTransactionResponse { type { TransactionStatus } memberof payload ? : TransactionStatus ; 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 interface export interface Transaction { type { string } memberof transactionId : string ; type { string } memberof status : TransactionStatusEnum | 'Failure' | 'Processing' | 'Success' ; type { Array < Error > } memberof errors ? : Array < Error > ; } export enum { string } export enum TransactionStatusEnum { Failure = 'Failure' , Processing = 'Processing' , Success = 'Success' } export interface export interface TransactionStatus { type { Transaction } memberof transactionStatus ? : Transaction ; } export export const VendorTransactionApiAxiosParamCreator = function ( configuration ? ) { return { param { string } transactionId param { * } options throws getTransactionStatus : async ( transactionId , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'getTransactionStatus' , 'transactionId' , transactionId ) ; const localVarPath = `/vendor/directFulfillment/transactions/v1/transactions/{transactionId}` . replace ( `{${ "transactionId" }}` , encodeURIComponent ( String ( transactionId ) ) ) ; 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 ; 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 VendorTransactionApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = VendorTransactionApiAxiosParamCreator ( configuration ) ; return { param { string } transactionId param { * } options throws async getTransactionStatus ( transactionId , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . getTransactionStatus ( transactionId , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const VendorTransactionApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = VendorTransactionApiFp ( configuration ) ; return { param { string } transactionId param { * } options throws getTransactionStatus ( transactionId , options ? ) { return localVarFp . getTransactionStatus ( transactionId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface VendorTransactionApiGetTransactionStatusRequest { type { string } memberof readonly transactionId : string ; } export class extends BaseAPI export class VendorTransactionApi extends BaseAPI { param { VendorTransactionApiGetTransactionStatusRequest } requestParameters param { * } options throws memberof public getTransactionStatus ( requestParameters , options ? ) { return VendorTransactionApiFp ( this . configuration ) . getTransactionStatus ( requestParameters . transactionId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }