/**
 * Cardano Wallet Backend API
 * <p align=\"right\"><img style=\"position: relative; top: -10em; margin-bottom: -12em;\" width=\"20%\" src=\"https://cardanodocs.com/img/cardano.png\"></img></p>
 *
 * OpenAPI spec version: 2021.3.4
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */ import globalAxios , { AxiosPromise , AxiosInstance } from 'axios' ; import { Configuration } from '../configuration' ; import { BASE_PATH , COLLECTION_FORMATS , RequestArgs , BaseAPI , RequiredError } from '../base' ; import { ApiPostTransactionFeeData } from '../models' ; import { ApiPostTransactionData } from '../models' ; import { ApiTransaction } from '../models' ; import { ApiFee } from '../models' ; import { InlineResponse400 } from '../models' ; import { InlineResponse4001 } from '../models' ; import { InlineResponse4031 } from '../models' ; import { InlineResponse4032 } from '../models' ; import { InlineResponse404 } from '../models' ; import { NoSuchWallet } from '../models' ; import { NotAcceptable } from '../models' ; import { TransactionAlreadyInLedger } from '../models' ; import { UnsupportedMediaType } from '../models' ; export export const TransactionsApiAxiosParamCreator = function ( configuration ? ) { return { summary param { string } walletId param { string } transactionId param { * } options throws deleteTransaction : async ( walletId , transactionId , options = { } ) : Promise < RequestArgs > => { if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling deleteTransaction.' ) ; } if ( transactionId === null || transactionId === undefined ) { throw new RequiredError ( 'transactionId' , 'Required parameter transactionId was null or undefined when calling deleteTransaction.' ) ; } const localVarPath = `/wallets/{walletId}/transactions/{transactionId}` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) . replace ( `{${ "transactionId" }}` , encodeURIComponent ( String ( transactionId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'DELETE' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; const query = new URLSearchParams ( localVarUrlObj . search ) ; for ( const key in localVarQueryParameter ) { query . set ( key , localVarQueryParameter [ key ] ) ; } for ( const key in options . query ) { query . set ( key , options . query [ key ] ) ; } localVarUrlObj . search = ( new URLSearchParams ( query ) ) . toString ( ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : localVarUrlObj . pathname + localVarUrlObj . search + localVarUrlObj . hash , options : localVarRequestOptions , } ; } , summary param { string } walletId param { string } transactionId param { * } options throws getTransaction : async ( walletId , transactionId , options = { } ) : Promise < RequestArgs > => { if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling getTransaction.' ) ; } if ( transactionId === null || transactionId === undefined ) { throw new RequiredError ( 'transactionId' , 'Required parameter transactionId was null or undefined when calling getTransaction.' ) ; } const localVarPath = `/wallets/{walletId}/transactions/{transactionId}` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) . replace ( `{${ "transactionId" }}` , encodeURIComponent ( String ( transactionId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; const query = new URLSearchParams ( localVarUrlObj . search ) ; for ( const key in localVarQueryParameter ) { query . set ( key , localVarQueryParameter [ key ] ) ; } for ( const key in options . query ) { query . set ( key , options . query [ key ] ) ; } localVarUrlObj . search = ( new URLSearchParams ( query ) ) . toString ( ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : localVarUrlObj . pathname + localVarUrlObj . search + localVarUrlObj . hash , options : localVarRequestOptions , } ; } , summary param { string } walletId param { string } start param { string } end param { string } order param { number } minWithdrawal param { * } options throws listTransactions : async ( walletId , start ? , end ? , order ? , minWithdrawal ? , options = { } ) : Promise < RequestArgs > => { if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling listTransactions.' ) ; } const localVarPath = `/wallets/{walletId}/transactions` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'GET' , ... baseOptions , ... options } ; const localVarHeaderParameter = { } as any ; const localVarQueryParameter = { } as any ; if ( start !== undefined ) { localVarQueryParameter [ 'start' ] = start ; } if ( end !== undefined ) { localVarQueryParameter [ 'end' ] = end ; } if ( order !== undefined ) { localVarQueryParameter [ 'order' ] = order ; } if ( minWithdrawal !== undefined ) { localVarQueryParameter [ 'minWithdrawal' ] = minWithdrawal ; } const query = new URLSearchParams ( localVarUrlObj . search ) ; for ( const key in localVarQueryParameter ) { query . set ( key , localVarQueryParameter [ key ] ) ; } for ( const key in options . query ) { query . set ( key , options . query [ key ] ) ; } localVarUrlObj . search = ( new URLSearchParams ( query ) ) . toString ( ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; return { url : localVarUrlObj . pathname + localVarUrlObj . search + localVarUrlObj . hash , options : localVarRequestOptions , } ; } , summary param { ApiPostTransactionData } body param { string } walletId param { * } options throws postTransaction : async ( body , walletId , options = { } ) : Promise < RequestArgs > => { if ( body === null || body === undefined ) { throw new RequiredError ( 'body' , 'Required parameter body was null or undefined when calling postTransaction.' ) ; } if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling postTransaction.' ) ; } const localVarPath = `/wallets/{walletId}/transactions` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; 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' ; const query = new URLSearchParams ( localVarUrlObj . search ) ; for ( const key in localVarQueryParameter ) { query . set ( key , localVarQueryParameter [ key ] ) ; } for ( const key in options . query ) { query . set ( key , options . query [ key ] ) ; } localVarUrlObj . search = ( new URLSearchParams ( query ) ) . toString ( ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; const needsSerialization = ( typeof body !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ; localVarRequestOptions . data = needsSerialization ? JSON . stringify ( body !== undefined ? body : { } ) : ( body || "" ) ; return { url : localVarUrlObj . pathname + localVarUrlObj . search + localVarUrlObj . hash , options : localVarRequestOptions , } ; } , summary param { ApiPostTransactionFeeData } body param { string } walletId param { * } options throws postTransactionFee : async ( body , walletId , options = { } ) : Promise < RequestArgs > => { if ( body === null || body === undefined ) { throw new RequiredError ( 'body' , 'Required parameter body was null or undefined when calling postTransactionFee.' ) ; } if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling postTransactionFee.' ) ; } const localVarPath = `/wallets/{walletId}/payment-fees` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; 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' ; const query = new URLSearchParams ( localVarUrlObj . search ) ; for ( const key in localVarQueryParameter ) { query . set ( key , localVarQueryParameter [ key ] ) ; } for ( const key in options . query ) { query . set ( key , options . query [ key ] ) ; } localVarUrlObj . search = ( new URLSearchParams ( query ) ) . toString ( ) ; let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ; localVarRequestOptions . headers = { ... localVarHeaderParameter , ... headersFromBaseOptions , ... options . headers } ; const needsSerialization = ( typeof body !== "string" ) || localVarRequestOptions . headers [ 'Content-Type' ] === 'application/json' ; localVarRequestOptions . data = needsSerialization ? JSON . stringify ( body !== undefined ? body : { } ) : ( body || "" ) ; return { url : localVarUrlObj . pathname + localVarUrlObj . search + localVarUrlObj . hash , options : localVarRequestOptions , } ; } , } ; } ; export export const TransactionsApiFp = function ( configuration ? ) { return { summary param { string } walletId param { string } transactionId param { * } options throws async deleteTransaction ( walletId , transactionId , options ? ) { const localVarAxiosArgs = await TransactionsApiAxiosParamCreator ( configuration ) . deleteTransaction ( walletId , transactionId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { string } walletId param { string } transactionId param { * } options throws async getTransaction ( walletId , transactionId , options ? ) { const localVarAxiosArgs = await TransactionsApiAxiosParamCreator ( configuration ) . getTransaction ( walletId , transactionId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { string } walletId param { string } start param { string } end param { string } order param { number } minWithdrawal param { * } options throws async listTransactions ( walletId , start ? , end ? , order ? , minWithdrawal ? , options ? ) { const localVarAxiosArgs = await TransactionsApiAxiosParamCreator ( configuration ) . listTransactions ( walletId , start , end , order , minWithdrawal , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { ApiPostTransactionData } body param { string } walletId param { * } options throws async postTransaction ( body , walletId , options ? ) { const localVarAxiosArgs = await TransactionsApiAxiosParamCreator ( configuration ) . postTransaction ( body , walletId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { ApiPostTransactionFeeData } body param { string } walletId param { * } options throws async postTransactionFee ( body , walletId , options ? ) { const localVarAxiosArgs = await TransactionsApiAxiosParamCreator ( configuration ) . postTransactionFee ( body , walletId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , } ; } ; export export const TransactionsApiFactory = function ( configuration ? , basePath ? , axios ? ) { return { summary param { string } walletId param { string } transactionId param { * } options throws deleteTransaction ( walletId , transactionId , options ? ) { return TransactionsApiFp ( configuration ) . deleteTransaction ( walletId , transactionId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { string } walletId param { string } transactionId param { * } options throws getTransaction ( walletId , transactionId , options ? ) { return TransactionsApiFp ( configuration ) . getTransaction ( walletId , transactionId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { string } walletId param { string } start param { string } end param { string } order param { number } minWithdrawal param { * } options throws listTransactions ( walletId , start ? , end ? , order ? , minWithdrawal ? , options ? ) { return TransactionsApiFp ( configuration ) . listTransactions ( walletId , start , end , order , minWithdrawal , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { ApiPostTransactionData } body param { string } walletId param { * } options throws postTransaction ( body , walletId , options ? ) { return TransactionsApiFp ( configuration ) . postTransaction ( body , walletId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { ApiPostTransactionFeeData } body param { string } walletId param { * } options throws postTransactionFee ( body , walletId , options ? ) { return TransactionsApiFp ( configuration ) . postTransactionFee ( body , walletId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export class extends BaseAPI export class TransactionsApi extends BaseAPI { summary param { string } walletId param { string } transactionId param { * } options throws memberof public deleteTransaction ( walletId , transactionId , options ? ) { return TransactionsApiFp ( this . configuration ) . deleteTransaction ( walletId , transactionId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { string } walletId param { string } transactionId param { * } options throws memberof public getTransaction ( walletId , transactionId , options ? ) { return TransactionsApiFp ( this . configuration ) . getTransaction ( walletId , transactionId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { string } walletId param { string } start param { string } end param { string } order param { number } minWithdrawal param { * } options throws memberof public listTransactions ( walletId , start ? , end ? , order ? , minWithdrawal ? , options ? ) { return TransactionsApiFp ( this . configuration ) . listTransactions ( walletId , start , end , order , minWithdrawal , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { ApiPostTransactionData } body param { string } walletId param { * } options throws memberof public postTransaction ( body , walletId , options ? ) { return TransactionsApiFp ( this . configuration ) . postTransaction ( body , walletId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { ApiPostTransactionFeeData } body param { string } walletId param { * } options throws memberof public postTransactionFee ( body , walletId , options ? ) { return TransactionsApiFp ( this . configuration ) . postTransactionFee ( body , walletId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }