/**
 * Selling Partner API for Finances
 * The Selling Partner API for Finances helps you obtain financial information relevant to a seller\'s business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
 *
 * The version of the OpenAPI document: v0
 *
 *
 * 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 AdjustmentEvent { type { string } memberof AdjustmentType ? : string ; type { string } memberof PostedDate ? : string ; type { Currency } memberof AdjustmentAmount ? : Currency ; type { Array < AdjustmentItem > } memberof AdjustmentItemList ? : Array < AdjustmentItem > ; } export interface export interface AdjustmentItem { type { string } memberof Quantity ? : string ; type { Currency } memberof PerUnitAmount ? : Currency ; type { Currency } memberof TotalAmount ? : Currency ; type { string } memberof SellerSKU ? : string ; type { string } memberof FnSKU ? : string ; type { string } memberof ProductDescription ? : string ; type { string } memberof ASIN ? : string ; } export interface export interface AffordabilityExpenseEvent { type { string } memberof AmazonOrderId ? : string ; type { string } memberof PostedDate ? : string ; type { string } memberof MarketplaceId ? : string ; type { string } memberof TransactionType ? : string ; type { Currency } memberof BaseExpense ? : Currency ; type { Currency } memberof TaxTypeCGST : Currency ; type { Currency } memberof TaxTypeSGST : Currency ; type { Currency } memberof TaxTypeIGST : Currency ; type { Currency } memberof TotalExpense ? : Currency ; } export interface export interface ChargeComponent { type { string } memberof ChargeType ? : string ; type { Currency } memberof ChargeAmount ? : Currency ; } export interface export interface ChargeInstrument { type { string } memberof Description ? : string ; type { string } memberof Tail ? : string ; type { Currency } memberof Amount ? : Currency ; } export interface export interface CouponPaymentEvent { type { string } memberof PostedDate ? : string ; type { string } memberof CouponId ? : string ; type { string } memberof SellerCouponDescription ? : string ; type { number } memberof ClipOrRedemptionCount ? : number ; type { string } memberof PaymentEventId ? : string ; type { FeeComponent } memberof FeeComponent ? : FeeComponent ; type { ChargeComponent } memberof ChargeComponent ? : ChargeComponent ; type { Currency } memberof TotalAmount ? : Currency ; } export interface export interface Currency { type { string } memberof CurrencyCode ? : string ; type { number } memberof CurrencyAmount ? : number ; } export interface export interface DebtRecoveryEvent { type { string } memberof DebtRecoveryType ? : string ; type { Currency } memberof RecoveryAmount ? : Currency ; type { Currency } memberof OverPaymentCredit ? : Currency ; type { Array < DebtRecoveryItem > } memberof DebtRecoveryItemList ? : Array < DebtRecoveryItem > ; type { Array < ChargeInstrument > } memberof ChargeInstrumentList ? : Array < ChargeInstrument > ; } export interface export interface DebtRecoveryItem { type { Currency } memberof RecoveryAmount ? : Currency ; type { Currency } memberof OriginalAmount ? : Currency ; type { string } memberof GroupBeginDate ? : string ; type { string } memberof GroupEndDate ? : string ; } export interface export interface DirectPayment { type { string } memberof DirectPaymentType ? : string ; type { Currency } memberof DirectPaymentAmount ? : Currency ; } export interface export interface FBALiquidationEvent { type { string } memberof PostedDate ? : string ; type { string } memberof OriginalRemovalOrderId ? : string ; type { Currency } memberof LiquidationProceedsAmount ? : Currency ; type { Currency } memberof LiquidationFeeAmount ? : Currency ; } export interface export interface FeeComponent { type { string } memberof FeeType ? : string ; type { Currency } memberof FeeAmount ? : Currency ; } export interface export interface FinancialEventGroup { type { string } memberof FinancialEventGroupId ? : string ; type { string } memberof ProcessingStatus ? : string ; type { string } memberof FundTransferStatus ? : string ; type { Currency } memberof OriginalTotal ? : Currency ; type { Currency } memberof ConvertedTotal ? : Currency ; type { string } memberof FundTransferDate ? : string ; type { string } memberof TraceId ? : string ; type { string } memberof AccountTail ? : string ; type { Currency } memberof BeginningBalance ? : Currency ; type { string } memberof FinancialEventGroupStart ? : string ; type { string } memberof FinancialEventGroupEnd ? : string ; } export interface export interface FinancialEvents { type { Array < ShipmentEvent > } memberof ShipmentEventList ? : Array < ShipmentEvent > ; type { Array < ShipmentEvent > } memberof RefundEventList ? : Array < ShipmentEvent > ; type { Array < ShipmentEvent > } memberof GuaranteeClaimEventList ? : Array < ShipmentEvent > ; type { Array < ShipmentEvent > } memberof ChargebackEventList ? : Array < ShipmentEvent > ; type { Array < PayWithAmazonEvent > } memberof PayWithAmazonEventList ? : Array < PayWithAmazonEvent > ; type { Array < SolutionProviderCreditEvent > } memberof ServiceProviderCreditEventList ? : Array < SolutionProviderCreditEvent > ; type { Array < RetrochargeEvent > } memberof RetrochargeEventList ? : Array < RetrochargeEvent > ; type { Array < RentalTransactionEvent > } memberof RentalTransactionEventList ? : Array < RentalTransactionEvent > ; type { Array < ProductAdsPaymentEvent > } memberof ProductAdsPaymentEventList ? : Array < ProductAdsPaymentEvent > ; type { Array < ServiceFeeEvent > } memberof ServiceFeeEventList ? : Array < ServiceFeeEvent > ; type { Array < SellerDealPaymentEvent > } memberof SellerDealPaymentEventList ? : Array < SellerDealPaymentEvent > ; type { Array < DebtRecoveryEvent > } memberof DebtRecoveryEventList ? : Array < DebtRecoveryEvent > ; type { Array < LoanServicingEvent > } memberof LoanServicingEventList ? : Array < LoanServicingEvent > ; type { Array < AdjustmentEvent > } memberof AdjustmentEventList ? : Array < AdjustmentEvent > ; type { Array < SAFETReimbursementEvent > } memberof SAFETReimbursementEventList ? : Array < SAFETReimbursementEvent > ; type { Array < SellerReviewEnrollmentPaymentEvent > } memberof SellerReviewEnrollmentPaymentEventList ? : Array < SellerReviewEnrollmentPaymentEvent > ; type { Array < FBALiquidationEvent > } memberof FBALiquidationEventList ? : Array < FBALiquidationEvent > ; type { Array < CouponPaymentEvent > } memberof CouponPaymentEventList ? : Array < CouponPaymentEvent > ; type { Array < ImagingServicesFeeEvent > } memberof ImagingServicesFeeEventList ? : Array < ImagingServicesFeeEvent > ; type { Array < NetworkComminglingTransactionEvent > } memberof NetworkComminglingTransactionEventList ? : Array < NetworkComminglingTransactionEvent > ; type { Array < AffordabilityExpenseEvent > } memberof AffordabilityExpenseEventList ? : Array < AffordabilityExpenseEvent > ; type { Array < AffordabilityExpenseEvent > } memberof AffordabilityExpenseReversalEventList ? : Array < AffordabilityExpenseEvent > ; type { Array < TrialShipmentEvent > } memberof TrialShipmentEventList ? : Array < TrialShipmentEvent > ; type { Array < ShipmentEvent > } memberof ShipmentSettleEventList ? : Array < ShipmentEvent > ; type { Array < TaxWithholdingEvent > } memberof TaxWithholdingEventList ? : Array < TaxWithholdingEvent > ; type { Array < RemovalShipmentEvent > } memberof RemovalShipmentEventList ? : Array < RemovalShipmentEvent > ; type { Array < RemovalShipmentAdjustmentEvent > } memberof RemovalShipmentAdjustmentEventList ? : Array < RemovalShipmentAdjustmentEvent > ; } export interface export interface ImagingServicesFeeEvent { type { string } memberof ImagingRequestBillingItemID ? : string ; type { string } memberof ASIN ? : string ; type { string } memberof PostedDate ? : string ; type { Array < FeeComponent > } memberof FeeList ? : Array < FeeComponent > ; } export interface export interface ListFinancialEventGroupsPayload { type { string } memberof NextToken ? : string ; type { Array < FinancialEventGroup > } memberof FinancialEventGroupList ? : Array < FinancialEventGroup > ; } export interface export interface ListFinancialEventGroupsResponse { type { ListFinancialEventGroupsPayload } memberof payload ? : ListFinancialEventGroupsPayload ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface ListFinancialEventsPayload { type { string } memberof NextToken ? : string ; type { FinancialEvents } memberof FinancialEvents ? : FinancialEvents ; } export interface export interface ListFinancialEventsResponse { type { ListFinancialEventsPayload } memberof payload ? : ListFinancialEventsPayload ; type { Array < Error > } memberof errors ? : Array < Error > ; } export interface export interface LoanServicingEvent { type { Currency } memberof LoanAmount ? : Currency ; type { string } memberof SourceBusinessEventType ? : 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 NetworkComminglingTransactionEvent { type { string } memberof TransactionType ? : string ; type { string } memberof PostedDate ? : string ; type { string } memberof NetCoTransactionID ? : string ; type { string } memberof SwapReason ? : string ; type { string } memberof ASIN ? : string ; type { string } memberof MarketplaceId ? : string ; type { Currency } memberof TaxExclusiveAmount ? : Currency ; type { Currency } memberof TaxAmount ? : Currency ; } export interface export interface PayWithAmazonEvent { type { string } memberof SellerOrderId ? : string ; type { string } memberof TransactionPostedDate ? : string ; type { string } memberof BusinessObjectType ? : string ; type { string } memberof SalesChannel ? : string ; type { ChargeComponent } memberof Charge ? : ChargeComponent ; type { Array < FeeComponent > } memberof FeeList ? : Array < FeeComponent > ; type { string } memberof PaymentAmountType ? : string ; type { string } memberof AmountDescription ? : string ; type { string } memberof FulfillmentChannel ? : string ; type { string } memberof StoreName ? : string ; } export interface export interface ProductAdsPaymentEvent { type { string } memberof postedDate ? : string ; type { string } memberof transactionType ? : string ; type { string } memberof invoiceId ? : string ; type { Currency } memberof baseValue ? : Currency ; type { Currency } memberof taxValue ? : Currency ; type { Currency } memberof transactionValue ? : Currency ; } export interface export interface Promotion { type { string } memberof PromotionType ? : string ; type { string } memberof PromotionId ? : string ; type { Currency } memberof PromotionAmount ? : Currency ; } export interface export interface RemovalShipmentAdjustmentEvent { type { string } memberof PostedDate ? : string ; type { string } memberof AdjustmentEventId ? : string ; type { string } memberof MerchantOrderId ? : string ; type { string } memberof OrderId ? : string ; type { string } memberof TransactionType ? : string ; type { Array < RemovalShipmentItemAdjustment > } memberof RemovalShipmentItemAdjustmentList ? : Array < RemovalShipmentItemAdjustment > ; } export interface export interface RemovalShipmentEvent { type { string } memberof PostedDate ? : string ; type { string } memberof MerchantOrderId ? : string ; type { string } memberof OrderId ? : string ; type { string } memberof TransactionType ? : string ; type { Array < RemovalShipmentItem > } memberof RemovalShipmentItemList ? : Array < RemovalShipmentItem > ; } export interface export interface RemovalShipmentItem { type { string } memberof RemovalShipmentItemId ? : string ; type { string } memberof TaxCollectionModel ? : string ; type { string } memberof FulfillmentNetworkSKU ? : string ; type { number } memberof Quantity ? : number ; type { Currency } memberof Revenue ? : Currency ; type { Currency } memberof FeeAmount ? : Currency ; type { Currency } memberof TaxAmount ? : Currency ; type { Currency } memberof TaxWithheld ? : Currency ; } export interface export interface RemovalShipmentItemAdjustment { type { string } memberof RemovalShipmentItemId ? : string ; type { string } memberof TaxCollectionModel ? : string ; type { string } memberof FulfillmentNetworkSKU ? : string ; type { number } memberof AdjustedQuantity ? : number ; type { Currency } memberof RevenueAdjustment ? : Currency ; type { Currency } memberof TaxAmountAdjustment ? : Currency ; type { Currency } memberof TaxWithheldAdjustment ? : Currency ; } export interface export interface RentalTransactionEvent { type { string } memberof AmazonOrderId ? : string ; type { string } memberof RentalEventType ? : string ; type { number } memberof ExtensionLength ? : number ; type { string } memberof PostedDate ? : string ; type { Array < ChargeComponent > } memberof RentalChargeList ? : Array < ChargeComponent > ; type { Array < FeeComponent > } memberof RentalFeeList ? : Array < FeeComponent > ; type { string } memberof MarketplaceName ? : string ; type { Currency } memberof RentalInitialValue ? : Currency ; type { Currency } memberof RentalReimbursement ? : Currency ; type { Array < TaxWithheldComponent > } memberof RentalTaxWithheldList ? : Array < TaxWithheldComponent > ; } export interface export interface RetrochargeEvent { type { string } memberof RetrochargeEventType ? : string ; type { string } memberof AmazonOrderId ? : string ; type { string } memberof PostedDate ? : string ; type { Currency } memberof BaseTax ? : Currency ; type { Currency } memberof ShippingTax ? : Currency ; type { string } memberof MarketplaceName ? : string ; type { Array < TaxWithheldComponent > } memberof RetrochargeTaxWithheldList ? : Array < TaxWithheldComponent > ; } export interface export interface SAFETReimbursementEvent { type { string } memberof PostedDate ? : string ; type { string } memberof SAFETClaimId ? : string ; type { Currency } memberof ReimbursedAmount ? : Currency ; type { string } memberof ReasonCode ? : string ; type { Array < SAFETReimbursementItem > } memberof SAFETReimbursementItemList ? : Array < SAFETReimbursementItem > ; } export interface export interface SAFETReimbursementItem { type { Array < ChargeComponent > } memberof itemChargeList ? : Array < ChargeComponent > ; type { string } memberof productDescription ? : string ; type { string } memberof quantity ? : string ; } export interface export interface SellerDealPaymentEvent { type { string } memberof postedDate ? : string ; type { string } memberof dealId ? : string ; type { string } memberof dealDescription ? : string ; type { string } memberof eventType ? : string ; type { string } memberof feeType ? : string ; type { Currency } memberof feeAmount ? : Currency ; type { Currency } memberof taxAmount ? : Currency ; type { Currency } memberof totalAmount ? : Currency ; } export interface export interface SellerReviewEnrollmentPaymentEvent { type { string } memberof PostedDate ? : string ; type { string } memberof EnrollmentId ? : string ; type { string } memberof ParentASIN ? : string ; type { FeeComponent } memberof FeeComponent ? : FeeComponent ; type { ChargeComponent } memberof ChargeComponent ? : ChargeComponent ; type { Currency } memberof TotalAmount ? : Currency ; } export interface export interface ServiceFeeEvent { type { string } memberof AmazonOrderId ? : string ; type { string } memberof FeeReason ? : string ; type { Array < FeeComponent > } memberof FeeList ? : Array < FeeComponent > ; type { string } memberof SellerSKU ? : string ; type { string } memberof FnSKU ? : string ; type { string } memberof FeeDescription ? : string ; type { string } memberof ASIN ? : string ; } export interface export interface ShipmentEvent { type { string } memberof AmazonOrderId ? : string ; type { string } memberof SellerOrderId ? : string ; type { string } memberof MarketplaceName ? : string ; type { Array < ChargeComponent > } memberof OrderChargeList ? : Array < ChargeComponent > ; type { Array < ChargeComponent > } memberof OrderChargeAdjustmentList ? : Array < ChargeComponent > ; type { Array < FeeComponent > } memberof ShipmentFeeList ? : Array < FeeComponent > ; type { Array < FeeComponent > } memberof ShipmentFeeAdjustmentList ? : Array < FeeComponent > ; type { Array < FeeComponent > } memberof OrderFeeList ? : Array < FeeComponent > ; type { Array < FeeComponent > } memberof OrderFeeAdjustmentList ? : Array < FeeComponent > ; type { Array < DirectPayment > } memberof DirectPaymentList ? : Array < DirectPayment > ; type { string } memberof PostedDate ? : string ; type { Array < ShipmentItem > } memberof ShipmentItemList ? : Array < ShipmentItem > ; type { Array < ShipmentItem > } memberof ShipmentItemAdjustmentList ? : Array < ShipmentItem > ; } export interface export interface ShipmentItem { type { string } memberof SellerSKU ? : string ; type { string } memberof OrderItemId ? : string ; type { string } memberof OrderAdjustmentItemId ? : string ; type { number } memberof QuantityShipped ? : number ; type { Array < ChargeComponent > } memberof ItemChargeList ? : Array < ChargeComponent > ; type { Array < ChargeComponent > } memberof ItemChargeAdjustmentList ? : Array < ChargeComponent > ; type { Array < FeeComponent > } memberof ItemFeeList ? : Array < FeeComponent > ; type { Array < FeeComponent > } memberof ItemFeeAdjustmentList ? : Array < FeeComponent > ; type { Array < TaxWithheldComponent > } memberof ItemTaxWithheldList ? : Array < TaxWithheldComponent > ; type { Array < Promotion > } memberof PromotionList ? : Array < Promotion > ; type { Array < Promotion > } memberof PromotionAdjustmentList ? : Array < Promotion > ; type { Currency } memberof CostOfPointsGranted ? : Currency ; type { Currency } memberof CostOfPointsReturned ? : Currency ; } export interface export interface SolutionProviderCreditEvent { type { string } memberof ProviderTransactionType ? : string ; type { string } memberof SellerOrderId ? : string ; type { string } memberof MarketplaceId ? : string ; type { string } memberof MarketplaceCountryCode ? : string ; type { string } memberof SellerId ? : string ; type { string } memberof SellerStoreName ? : string ; type { string } memberof ProviderId ? : string ; type { string } memberof ProviderStoreName ? : string ; type { Currency } memberof TransactionAmount ? : Currency ; type { string } memberof TransactionCreationDate ? : string ; } export interface export interface TaxWithheldComponent { type { string } memberof TaxCollectionModel ? : string ; type { Array < ChargeComponent > } memberof TaxesWithheld ? : Array < ChargeComponent > ; } export interface export interface TaxWithholdingEvent { type { string } memberof PostedDate ? : string ; type { Currency } memberof BaseAmount ? : Currency ; type { Currency } memberof WithheldAmount ? : Currency ; type { TaxWithholdingPeriod } memberof TaxWithholdingPeriod ? : TaxWithholdingPeriod ; } export interface export interface TaxWithholdingPeriod { type { string } memberof StartDate ? : string ; type { string } memberof EndDate ? : string ; } export interface export interface TrialShipmentEvent { type { string } memberof AmazonOrderId ? : string ; type { string } memberof FinancialEventGroupId ? : string ; type { string } memberof PostedDate ? : string ; type { string } memberof SKU ? : string ; type { Array < FeeComponent > } memberof FeeList ? : Array < FeeComponent > ; } export export const DefaultApiAxiosParamCreator = function ( configuration ? ) { return { param { number } maxResultsPerPage param { string } financialEventGroupStartedBefore param { string } financialEventGroupStartedAfter param { string } nextToken param { * } options throws listFinancialEventGroups : async ( maxResultsPerPage ? , financialEventGroupStartedBefore ? , financialEventGroupStartedAfter ? , nextToken ? , options = { } ) : Promise < RequestArgs > => { const localVarPath = `/finances/v0/financialEventGroups` ; 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 ( maxResultsPerPage !== undefined ) { localVarQueryParameter [ 'MaxResultsPerPage' ] = maxResultsPerPage ; } if ( financialEventGroupStartedBefore !== undefined ) { localVarQueryParameter [ 'FinancialEventGroupStartedBefore' ] = ( financialEventGroupStartedBefore as any instanceof Date ) ? ( financialEventGroupStartedBefore as any ) . toISOString ( ) : financialEventGroupStartedBefore ; } if ( financialEventGroupStartedAfter !== undefined ) { localVarQueryParameter [ 'FinancialEventGroupStartedAfter' ] = ( financialEventGroupStartedAfter as any instanceof Date ) ? ( financialEventGroupStartedAfter as any ) . toISOString ( ) : financialEventGroupStartedAfter ; } if ( nextToken !== undefined ) { localVarQueryParameter [ 'NextToken' ] = nextToken ; } 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 { number } maxResultsPerPage param { string } postedAfter param { string } postedBefore param { string } nextToken param { * } options throws listFinancialEvents : async ( maxResultsPerPage ? , postedAfter ? , postedBefore ? , nextToken ? , options = { } ) : Promise < RequestArgs > => { const localVarPath = `/finances/v0/financialEvents` ; 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 ( maxResultsPerPage !== undefined ) { localVarQueryParameter [ 'MaxResultsPerPage' ] = maxResultsPerPage ; } if ( postedAfter !== undefined ) { localVarQueryParameter [ 'PostedAfter' ] = ( postedAfter as any instanceof Date ) ? ( postedAfter as any ) . toISOString ( ) : postedAfter ; } if ( postedBefore !== undefined ) { localVarQueryParameter [ 'PostedBefore' ] = ( postedBefore as any instanceof Date ) ? ( postedBefore as any ) . toISOString ( ) : postedBefore ; } if ( nextToken !== undefined ) { localVarQueryParameter [ 'NextToken' ] = nextToken ; } 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 } eventGroupId param { number } maxResultsPerPage param { string } nextToken param { * } options throws listFinancialEventsByGroupId : async ( eventGroupId , maxResultsPerPage ? , nextToken ? , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'listFinancialEventsByGroupId' , 'eventGroupId' , eventGroupId ) ; const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents` . replace ( `{${ "eventGroupId" }}` , encodeURIComponent ( String ( eventGroupId ) ) ) ; 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 ( maxResultsPerPage !== undefined ) { localVarQueryParameter [ 'MaxResultsPerPage' ] = maxResultsPerPage ; } if ( nextToken !== undefined ) { localVarQueryParameter [ 'NextToken' ] = nextToken ; } 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 } orderId param { number } maxResultsPerPage param { string } nextToken param { * } options throws listFinancialEventsByOrderId : async ( orderId , maxResultsPerPage ? , nextToken ? , options = { } ) : Promise < RequestArgs > => { assertParamExists ( 'listFinancialEventsByOrderId' , 'orderId' , orderId ) ; const localVarPath = `/finances/v0/orders/{orderId}/financialEvents` . replace ( `{${ "orderId" }}` , encodeURIComponent ( String ( orderId ) ) ) ; 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 ( maxResultsPerPage !== undefined ) { localVarQueryParameter [ 'MaxResultsPerPage' ] = maxResultsPerPage ; } if ( nextToken !== undefined ) { localVarQueryParameter [ 'NextToken' ] = nextToken ; } 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 DefaultApiFp = function ( configuration ? ) { const localVarAxiosParamCreator = DefaultApiAxiosParamCreator ( configuration ) ; return { param { number } maxResultsPerPage param { string } financialEventGroupStartedBefore param { string } financialEventGroupStartedAfter param { string } nextToken param { * } options throws async listFinancialEventGroups ( maxResultsPerPage ? , financialEventGroupStartedBefore ? , financialEventGroupStartedAfter ? , nextToken ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . listFinancialEventGroups ( maxResultsPerPage , financialEventGroupStartedBefore , financialEventGroupStartedAfter , nextToken , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { number } maxResultsPerPage param { string } postedAfter param { string } postedBefore param { string } nextToken param { * } options throws async listFinancialEvents ( maxResultsPerPage ? , postedAfter ? , postedBefore ? , nextToken ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . listFinancialEvents ( maxResultsPerPage , postedAfter , postedBefore , nextToken , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } eventGroupId param { number } maxResultsPerPage param { string } nextToken param { * } options throws async listFinancialEventsByGroupId ( eventGroupId , maxResultsPerPage ? , nextToken ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . listFinancialEventsByGroupId ( eventGroupId , maxResultsPerPage , nextToken , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , param { string } orderId param { number } maxResultsPerPage param { string } nextToken param { * } options throws async listFinancialEventsByOrderId ( orderId , maxResultsPerPage ? , nextToken ? , options ? ) { const localVarAxiosArgs = await localVarAxiosParamCreator . listFinancialEventsByOrderId ( orderId , maxResultsPerPage , nextToken , options ) ; return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ; } , } ; } ; export export const DefaultApiFactory = function ( configuration ? , basePath ? , axios ? ) { const localVarFp = DefaultApiFp ( configuration ) ; return { param { number } maxResultsPerPage param { string } financialEventGroupStartedBefore param { string } financialEventGroupStartedAfter param { string } nextToken param { * } options throws listFinancialEventGroups ( maxResultsPerPage ? , financialEventGroupStartedBefore ? , financialEventGroupStartedAfter ? , nextToken ? , options ? ) { return localVarFp . listFinancialEventGroups ( maxResultsPerPage , financialEventGroupStartedBefore , financialEventGroupStartedAfter , nextToken , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { number } maxResultsPerPage param { string } postedAfter param { string } postedBefore param { string } nextToken param { * } options throws listFinancialEvents ( maxResultsPerPage ? , postedAfter ? , postedBefore ? , nextToken ? , options ? ) { return localVarFp . listFinancialEvents ( maxResultsPerPage , postedAfter , postedBefore , nextToken , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } eventGroupId param { number } maxResultsPerPage param { string } nextToken param { * } options throws listFinancialEventsByGroupId ( eventGroupId , maxResultsPerPage ? , nextToken ? , options ? ) { return localVarFp . listFinancialEventsByGroupId ( eventGroupId , maxResultsPerPage , nextToken , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , param { string } orderId param { number } maxResultsPerPage param { string } nextToken param { * } options throws listFinancialEventsByOrderId ( orderId , maxResultsPerPage ? , nextToken ? , options ? ) { return localVarFp . listFinancialEventsByOrderId ( orderId , maxResultsPerPage , nextToken , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export interface export interface DefaultApiListFinancialEventGroupsRequest { type { number } memberof readonly maxResultsPerPage ? : number ; type { string } memberof readonly financialEventGroupStartedBefore ? : string ; type { string } memberof readonly financialEventGroupStartedAfter ? : string ; type { string } memberof readonly nextToken ? : string ; } export interface export interface DefaultApiListFinancialEventsRequest { type { number } memberof readonly maxResultsPerPage ? : number ; type { string } memberof readonly postedAfter ? : string ; type { string } memberof readonly postedBefore ? : string ; type { string } memberof readonly nextToken ? : string ; } export interface export interface DefaultApiListFinancialEventsByGroupIdRequest { type { string } memberof readonly eventGroupId : string ; type { number } memberof readonly maxResultsPerPage ? : number ; type { string } memberof readonly nextToken ? : string ; } export interface export interface DefaultApiListFinancialEventsByOrderIdRequest { type { string } memberof readonly orderId : string ; type { number } memberof readonly maxResultsPerPage ? : number ; type { string } memberof readonly nextToken ? : string ; } export class extends BaseAPI export class DefaultApi extends BaseAPI { param { DefaultApiListFinancialEventGroupsRequest } requestParameters param { * } options throws memberof public listFinancialEventGroups ( requestParameters = { } , options ? ) { return DefaultApiFp ( this . configuration ) . listFinancialEventGroups ( requestParameters . maxResultsPerPage , requestParameters . financialEventGroupStartedBefore , requestParameters . financialEventGroupStartedAfter , requestParameters . nextToken , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { DefaultApiListFinancialEventsRequest } requestParameters param { * } options throws memberof public listFinancialEvents ( requestParameters = { } , options ? ) { return DefaultApiFp ( this . configuration ) . listFinancialEvents ( requestParameters . maxResultsPerPage , requestParameters . postedAfter , requestParameters . postedBefore , requestParameters . nextToken , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { DefaultApiListFinancialEventsByGroupIdRequest } requestParameters param { * } options throws memberof public listFinancialEventsByGroupId ( requestParameters , options ? ) { return DefaultApiFp ( this . configuration ) . listFinancialEventsByGroupId ( requestParameters . eventGroupId , requestParameters . maxResultsPerPage , requestParameters . nextToken , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } param { DefaultApiListFinancialEventsByOrderIdRequest } requestParameters param { * } options throws memberof public listFinancialEventsByOrderId ( requestParameters , options ? ) { return DefaultApiFp ( this . configuration ) . listFinancialEventsByOrderId ( requestParameters . orderId , requestParameters . maxResultsPerPage , requestParameters . nextToken , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }