UNPKG

fineract_sdk

Version:

Wrapper around fineract api.

592 lines (532 loc) 33.3 kB
/* tslint:disable */ /* eslint-disable */ /** * Apache Fineract * Apache Fineract is a secure, multi-tenanted microfinance platform The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform<br>The [reference app](https://cui.fineract.dev) (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation - The API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) - Find out more about Apache Fineract [here](/fineract-provider/api-docs/apiLive.htm#top) - You can [Try The API From Your Browser](/fineract-provider/api-docs/apiLive.htm#interact) - The Generic Options are available [here](/fineract-provider/api-docs/apiLive.htm#genopts) - Find out more about [Updating Dates and Numbers](/fineract-provider/api-docs/apiLive.htm#dates_and_numbers) - For the Authentication and the Basic of HTTP and HTTPS refer [here](/fineract-provider/api-docs/apiLive.htm#authentication_overview) - Check about ERROR codes [here](/fineract-provider/api-docs/apiLive.htm#errors) Please refer to the [old documentation](/fineract-provider/api-docs/apiLive.htm) for any documentation queries * * The version of the OpenAPI document: 1.5.0-66-gffae7d4-dirty * Contact: dev@fineract.apache.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore import { DeleteClientsClientIdChargesChargeIdResponse } from '../models'; // @ts-ignore import { GetClientsChargesPageItems } from '../models'; // @ts-ignore import { GetClientsClientIdChargesResponse } from '../models'; // @ts-ignore import { PostClientsClientIdChargesChargeIdRequest } from '../models'; // @ts-ignore import { PostClientsClientIdChargesChargeIdResponse } from '../models'; // @ts-ignore import { PostClientsClientIdChargesRequest } from '../models'; // @ts-ignore import { PostClientsClientIdChargesResponse } from '../models'; /** * ClientChargesApi - axios parameter creator * @export */ export const ClientChargesApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * This API associates a Client charge with an implicit Client account Mandatory Fields : chargeId and dueDate Optional Fields : amount * @summary Add Client Charge * @param {number} clientId clientId * @param {PostClientsClientIdChargesRequest} postClientsClientIdChargesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyClientCharge: async (clientId: number, postClientsClientIdChargesRequest: PostClientsClientIdChargesRequest, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'clientId' is not null or undefined assertParamExists('applyClientCharge', 'clientId', clientId) // verify required parameter 'postClientsClientIdChargesRequest' is not null or undefined assertParamExists('applyClientCharge', 'postClientsClientIdChargesRequest', postClientsClientIdChargesRequest) const localVarPath = `/clients/{clientId}/charges` .replace(`{${"clientId"}}`, encodeURIComponent(String(clientId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. 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; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(postClientsClientIdChargesRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Deletes a Client Charge on which no transactions have taken place (either payments or waivers). * @summary Delete a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteClientCharge: async (clientId: number, chargeId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'clientId' is not null or undefined assertParamExists('deleteClientCharge', 'clientId', clientId) // verify required parameter 'chargeId' is not null or undefined assertParamExists('deleteClientCharge', 'chargeId', chargeId) const localVarPath = `/clients/{clientId}/charges/{chargeId}` .replace(`{${"clientId"}}`, encodeURIComponent(String(clientId))) .replace(`{${"chargeId"}}`, encodeURIComponent(String(chargeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Pay a Client Charge: Mandatory Fields:transactionDate and amount \"Pay either a part of or the entire due amount for a charge.(command=paycharge) Waive a Client Charge: This API provides the facility of waiving off the remaining amount on a client charge (command=waive) Showing request/response for \'Pay a Client Charge\' * @summary Pay a Client Charge | Waive a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {PostClientsClientIdChargesChargeIdRequest} postClientsClientIdChargesChargeIdRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ payOrWaiveClientCharge: async (clientId: number, chargeId: number, postClientsClientIdChargesChargeIdRequest: PostClientsClientIdChargesChargeIdRequest, command?: string, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'clientId' is not null or undefined assertParamExists('payOrWaiveClientCharge', 'clientId', clientId) // verify required parameter 'chargeId' is not null or undefined assertParamExists('payOrWaiveClientCharge', 'chargeId', chargeId) // verify required parameter 'postClientsClientIdChargesChargeIdRequest' is not null or undefined assertParamExists('payOrWaiveClientCharge', 'postClientsClientIdChargesChargeIdRequest', postClientsClientIdChargesChargeIdRequest) const localVarPath = `/clients/{clientId}/charges/{chargeId}` .replace(`{${"clientId"}}`, encodeURIComponent(String(clientId))) .replace(`{${"chargeId"}}`, encodeURIComponent(String(chargeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. 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; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) if (command !== undefined) { localVarQueryParameter['command'] = command; } localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(postClientsClientIdChargesChargeIdRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * The list capability of client charges supports pagination.Example Requests: clients/1/charges clients/1/charges?offset=0&limit=5 * @summary List Client Charges * @param {number} clientId clientId * @param {string} [chargeStatus] chargeStatus * @param {boolean} [pendingPayment] pendingPayment * @param {number} [limit] limit * @param {number} [offset] offset * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveAllClientCharges: async (clientId: number, chargeStatus?: string, pendingPayment?: boolean, limit?: number, offset?: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'clientId' is not null or undefined assertParamExists('retrieveAllClientCharges', 'clientId', clientId) const localVarPath = `/clients/{clientId}/charges` .replace(`{${"clientId"}}`, encodeURIComponent(String(clientId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. 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; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) if (chargeStatus !== undefined) { localVarQueryParameter['chargeStatus'] = chargeStatus; } if (pendingPayment !== undefined) { localVarQueryParameter['pendingPayment'] = pendingPayment; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Example Requests: clients/1/charges/1 clients/1/charges/1?fields=name,id * @summary Retrieve a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveClientCharge: async (clientId: number, chargeId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'clientId' is not null or undefined assertParamExists('retrieveClientCharge', 'clientId', clientId) // verify required parameter 'chargeId' is not null or undefined assertParamExists('retrieveClientCharge', 'chargeId', chargeId) const localVarPath = `/clients/{clientId}/charges/{chargeId}` .replace(`{${"clientId"}}`, encodeURIComponent(String(clientId))) .replace(`{${"chargeId"}}`, encodeURIComponent(String(chargeId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. 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; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) 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} clientId clientId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveTemplate4: async (clientId: number, options: any = {}): Promise<RequestArgs> => { // verify required parameter 'clientId' is not null or undefined assertParamExists('retrieveTemplate4', 'clientId', clientId) const localVarPath = `/clients/{clientId}/charges/template` .replace(`{${"clientId"}}`, encodeURIComponent(String(clientId))); // use dummy base URL string because the URL constructor only accepts absolute URLs. 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; // authentication basicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) // authentication tenantid required await setApiKeyToObject(localVarHeaderParameter, "fineract-platform-tenantid", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter, options.query); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * ClientChargesApi - functional programming interface * @export */ export const ClientChargesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = ClientChargesApiAxiosParamCreator(configuration) return { /** * This API associates a Client charge with an implicit Client account Mandatory Fields : chargeId and dueDate Optional Fields : amount * @summary Add Client Charge * @param {number} clientId clientId * @param {PostClientsClientIdChargesRequest} postClientsClientIdChargesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ async applyClientCharge(clientId: number, postClientsClientIdChargesRequest: PostClientsClientIdChargesRequest, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostClientsClientIdChargesResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.applyClientCharge(clientId, postClientsClientIdChargesRequest, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Deletes a Client Charge on which no transactions have taken place (either payments or waivers). * @summary Delete a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async deleteClientCharge(clientId: number, chargeId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteClientsClientIdChargesChargeIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteClientCharge(clientId, chargeId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Pay a Client Charge: Mandatory Fields:transactionDate and amount \"Pay either a part of or the entire due amount for a charge.(command=paycharge) Waive a Client Charge: This API provides the facility of waiving off the remaining amount on a client charge (command=waive) Showing request/response for \'Pay a Client Charge\' * @summary Pay a Client Charge | Waive a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {PostClientsClientIdChargesChargeIdRequest} postClientsClientIdChargesChargeIdRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ async payOrWaiveClientCharge(clientId: number, chargeId: number, postClientsClientIdChargesChargeIdRequest: PostClientsClientIdChargesChargeIdRequest, command?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostClientsClientIdChargesChargeIdResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.payOrWaiveClientCharge(clientId, chargeId, postClientsClientIdChargesChargeIdRequest, command, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * The list capability of client charges supports pagination.Example Requests: clients/1/charges clients/1/charges?offset=0&limit=5 * @summary List Client Charges * @param {number} clientId clientId * @param {string} [chargeStatus] chargeStatus * @param {boolean} [pendingPayment] pendingPayment * @param {number} [limit] limit * @param {number} [offset] offset * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveAllClientCharges(clientId: number, chargeStatus?: string, pendingPayment?: boolean, limit?: number, offset?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetClientsClientIdChargesResponse>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveAllClientCharges(clientId, chargeStatus, pendingPayment, limit, offset, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * Example Requests: clients/1/charges/1 clients/1/charges/1?fields=name,id * @summary Retrieve a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveClientCharge(clientId: number, chargeId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetClientsChargesPageItems>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveClientCharge(clientId, chargeId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** * * @param {number} clientId clientId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async retrieveTemplate4(clientId: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveTemplate4(clientId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, } }; /** * ClientChargesApi - factory interface * @export */ export const ClientChargesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = ClientChargesApiFp(configuration) return { /** * This API associates a Client charge with an implicit Client account Mandatory Fields : chargeId and dueDate Optional Fields : amount * @summary Add Client Charge * @param {number} clientId clientId * @param {PostClientsClientIdChargesRequest} postClientsClientIdChargesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ applyClientCharge(clientId: number, postClientsClientIdChargesRequest: PostClientsClientIdChargesRequest, options?: any): AxiosPromise<PostClientsClientIdChargesResponse> { return localVarFp.applyClientCharge(clientId, postClientsClientIdChargesRequest, options).then((request) => request(axios, basePath)); }, /** * Deletes a Client Charge on which no transactions have taken place (either payments or waivers). * @summary Delete a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteClientCharge(clientId: number, chargeId: number, options?: any): AxiosPromise<DeleteClientsClientIdChargesChargeIdResponse> { return localVarFp.deleteClientCharge(clientId, chargeId, options).then((request) => request(axios, basePath)); }, /** * Pay a Client Charge: Mandatory Fields:transactionDate and amount \"Pay either a part of or the entire due amount for a charge.(command=paycharge) Waive a Client Charge: This API provides the facility of waiving off the remaining amount on a client charge (command=waive) Showing request/response for \'Pay a Client Charge\' * @summary Pay a Client Charge | Waive a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {PostClientsClientIdChargesChargeIdRequest} postClientsClientIdChargesChargeIdRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} */ payOrWaiveClientCharge(clientId: number, chargeId: number, postClientsClientIdChargesChargeIdRequest: PostClientsClientIdChargesChargeIdRequest, command?: string, options?: any): AxiosPromise<PostClientsClientIdChargesChargeIdResponse> { return localVarFp.payOrWaiveClientCharge(clientId, chargeId, postClientsClientIdChargesChargeIdRequest, command, options).then((request) => request(axios, basePath)); }, /** * The list capability of client charges supports pagination.Example Requests: clients/1/charges clients/1/charges?offset=0&limit=5 * @summary List Client Charges * @param {number} clientId clientId * @param {string} [chargeStatus] chargeStatus * @param {boolean} [pendingPayment] pendingPayment * @param {number} [limit] limit * @param {number} [offset] offset * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveAllClientCharges(clientId: number, chargeStatus?: string, pendingPayment?: boolean, limit?: number, offset?: number, options?: any): AxiosPromise<GetClientsClientIdChargesResponse> { return localVarFp.retrieveAllClientCharges(clientId, chargeStatus, pendingPayment, limit, offset, options).then((request) => request(axios, basePath)); }, /** * Example Requests: clients/1/charges/1 clients/1/charges/1?fields=name,id * @summary Retrieve a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveClientCharge(clientId: number, chargeId: number, options?: any): AxiosPromise<GetClientsChargesPageItems> { return localVarFp.retrieveClientCharge(clientId, chargeId, options).then((request) => request(axios, basePath)); }, /** * * @param {number} clientId clientId * @param {*} [options] Override http request option. * @throws {RequiredError} */ retrieveTemplate4(clientId: number, options?: any): AxiosPromise<string> { return localVarFp.retrieveTemplate4(clientId, options).then((request) => request(axios, basePath)); }, }; }; /** * ClientChargesApi - object-oriented interface * @export * @class ClientChargesApi * @extends {BaseAPI} */ export class ClientChargesApi extends BaseAPI { /** * This API associates a Client charge with an implicit Client account Mandatory Fields : chargeId and dueDate Optional Fields : amount * @summary Add Client Charge * @param {number} clientId clientId * @param {PostClientsClientIdChargesRequest} postClientsClientIdChargesRequest * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClientChargesApi */ public applyClientCharge(clientId: number, postClientsClientIdChargesRequest: PostClientsClientIdChargesRequest, options?: any) { return ClientChargesApiFp(this.configuration).applyClientCharge(clientId, postClientsClientIdChargesRequest, options).then((request) => request(this.axios, this.basePath)); } /** * Deletes a Client Charge on which no transactions have taken place (either payments or waivers). * @summary Delete a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClientChargesApi */ public deleteClientCharge(clientId: number, chargeId: number, options?: any) { return ClientChargesApiFp(this.configuration).deleteClientCharge(clientId, chargeId, options).then((request) => request(this.axios, this.basePath)); } /** * Pay a Client Charge: Mandatory Fields:transactionDate and amount \"Pay either a part of or the entire due amount for a charge.(command=paycharge) Waive a Client Charge: This API provides the facility of waiving off the remaining amount on a client charge (command=waive) Showing request/response for \'Pay a Client Charge\' * @summary Pay a Client Charge | Waive a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {PostClientsClientIdChargesChargeIdRequest} postClientsClientIdChargesChargeIdRequest * @param {string} [command] command * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClientChargesApi */ public payOrWaiveClientCharge(clientId: number, chargeId: number, postClientsClientIdChargesChargeIdRequest: PostClientsClientIdChargesChargeIdRequest, command?: string, options?: any) { return ClientChargesApiFp(this.configuration).payOrWaiveClientCharge(clientId, chargeId, postClientsClientIdChargesChargeIdRequest, command, options).then((request) => request(this.axios, this.basePath)); } /** * The list capability of client charges supports pagination.Example Requests: clients/1/charges clients/1/charges?offset=0&limit=5 * @summary List Client Charges * @param {number} clientId clientId * @param {string} [chargeStatus] chargeStatus * @param {boolean} [pendingPayment] pendingPayment * @param {number} [limit] limit * @param {number} [offset] offset * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClientChargesApi */ public retrieveAllClientCharges(clientId: number, chargeStatus?: string, pendingPayment?: boolean, limit?: number, offset?: number, options?: any) { return ClientChargesApiFp(this.configuration).retrieveAllClientCharges(clientId, chargeStatus, pendingPayment, limit, offset, options).then((request) => request(this.axios, this.basePath)); } /** * Example Requests: clients/1/charges/1 clients/1/charges/1?fields=name,id * @summary Retrieve a Client Charge * @param {number} clientId clientId * @param {number} chargeId chargeId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClientChargesApi */ public retrieveClientCharge(clientId: number, chargeId: number, options?: any) { return ClientChargesApiFp(this.configuration).retrieveClientCharge(clientId, chargeId, options).then((request) => request(this.axios, this.basePath)); } /** * * @param {number} clientId clientId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ClientChargesApi */ public retrieveTemplate4(clientId: number, options?: any) { return ClientChargesApiFp(this.configuration).retrieveTemplate4(clientId, options).then((request) => request(this.axios, this.basePath)); } }