diff --git a/src/services/capital/grantAccountsApi.ts b/src/services/capital/grantAccountsApi.ts new file mode 100644 index 000000000..232229fe4 --- /dev/null +++ b/src/services/capital/grantAccountsApi.ts @@ -0,0 +1,53 @@ +/* + * 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 this class manually. + */ + + +import getJsonResponse from "../../helpers/getJsonResponse"; +import Service from "../../service"; +import Client from "../../client"; +import { IRequest } from "../../typings/requestOptions"; +import Resource from "../resource"; + +import { ObjectSerializer } from "../../typings/capital/objectSerializer"; +import { GrantAccount } from "../../typings/capital/models"; + +/** + * API handler for GrantAccountsApi + */ +export class GrantAccountsApi extends Service { + + private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/capital/v1"; + private baseUrl: string; + + public constructor(client: Client){ + super(client); + this.baseUrl = this.createBaseUrl(this.API_BASEPATH); + } + + /** + * @summary Get the information of your grant account + * @param id {@link string } The unique identifier of the grant account. + * @param requestOptions {@link IRequest.Options } + * @return {@link GrantAccount } + */ + public async getGrantAccountInformation(id: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grantAccounts/{id}` + .replace("{" + "id" + "}", encodeURIComponent(String(id))); + const resource = new Resource(this, endpoint); + + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "GrantAccount"); + } + +} diff --git a/src/services/capital/grantOffersApi.ts b/src/services/capital/grantOffersApi.ts new file mode 100644 index 000000000..9853037b5 --- /dev/null +++ b/src/services/capital/grantOffersApi.ts @@ -0,0 +1,79 @@ +/* + * 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 this class manually. + */ + + +import getJsonResponse from "../../helpers/getJsonResponse"; +import Service from "../../service"; +import Client from "../../client"; +import { IRequest } from "../../typings/requestOptions"; +import Resource from "../resource"; + +import { ObjectSerializer } from "../../typings/capital/objectSerializer"; +import { GrantOffer } from "../../typings/capital/models"; +import { GrantOffers } from "../../typings/capital/models"; + +/** + * API handler for GrantOffersApi + */ +export class GrantOffersApi extends Service { + + private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/capital/v1"; + private baseUrl: string; + + public constructor(client: Client){ + super(client); + this.baseUrl = this.createBaseUrl(this.API_BASEPATH); + } + + /** + * @summary Get all available grant offers + * @param requestOptions {@link IRequest.Options } + * @param accountHolderId {@link string } The unique identifier of the account holder for which you want to get the available grant offers. + * @return {@link GrantOffers } + */ + public async getAllGrantOffers(accountHolderId?: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grantOffers`; + const resource = new Resource(this, endpoint); + + const hasDefinedQueryParams = accountHolderId; + if(hasDefinedQueryParams) { + if(!requestOptions) requestOptions = {}; + if(!requestOptions.params) requestOptions.params = {}; + if(accountHolderId) requestOptions.params["accountHolderId"] = accountHolderId; + } + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "GrantOffers"); + } + + /** + * @summary Get the details of a grant offer + * @param id {@link string } The unique identifier of the grant offer. + * @param requestOptions {@link IRequest.Options } + * @return {@link GrantOffer } + */ + public async getGrantOffer(id: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grantOffers/{id}` + .replace("{" + "id" + "}", encodeURIComponent(String(id))); + const resource = new Resource(this, endpoint); + + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "GrantOffer"); + } + +} diff --git a/src/services/capital/grantsApi.ts b/src/services/capital/grantsApi.ts new file mode 100644 index 000000000..da2f28795 --- /dev/null +++ b/src/services/capital/grantsApi.ts @@ -0,0 +1,169 @@ +/* + * 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 this class manually. + */ + + +import getJsonResponse from "../../helpers/getJsonResponse"; +import Service from "../../service"; +import Client from "../../client"; +import { IRequest } from "../../typings/requestOptions"; +import Resource from "../resource"; + +import { ObjectSerializer } from "../../typings/capital/objectSerializer"; +import { Disbursement } from "../../typings/capital/models"; +import { DisbursementInfoUpdate } from "../../typings/capital/models"; +import { Disbursements } from "../../typings/capital/models"; +import { Grant } from "../../typings/capital/models"; +import { GrantInfo } from "../../typings/capital/models"; +import { Grants } from "../../typings/capital/models"; + +/** + * API handler for GrantsApi + */ +export class GrantsApi extends Service { + + private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/capital/v1"; + private baseUrl: string; + + public constructor(client: Client){ + super(client); + this.baseUrl = this.createBaseUrl(this.API_BASEPATH); + } + + /** + * @summary Get all the disbursements of a grant + * @param grantId {@link string } The unique identifier of the grant reference. + * @param requestOptions {@link IRequest.Options } + * @return {@link Disbursements } + */ + public async getAllGrantDisbursements(grantId: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grants/{grantId}/disbursements` + .replace("{" + "grantId" + "}", encodeURIComponent(String(grantId))); + const resource = new Resource(this, endpoint); + + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "Disbursements"); + } + + /** + * @summary Get all the grants of an account holder + * @param requestOptions {@link IRequest.Options } + * @param counterpartyAccountHolderId {@link string } (Required) The unique identifier of the account holder that received the grants. + * @return {@link Grants } + */ + public async getAllGrants(counterpartyAccountHolderId: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grants`; + const resource = new Resource(this, endpoint); + + const hasDefinedQueryParams = counterpartyAccountHolderId; + if(hasDefinedQueryParams) { + if(!requestOptions) requestOptions = {}; + if(!requestOptions.params) requestOptions.params = {}; + if(counterpartyAccountHolderId) requestOptions.params["counterpartyAccountHolderId"] = counterpartyAccountHolderId; + } + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "Grants"); + } + + /** + * @summary Get the details of a grant + * @param grantId {@link string } The unique identifier of the grant reference. + * @param requestOptions {@link IRequest.Options } + * @return {@link Grant } + */ + public async getGrant(grantId: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grants/{grantId}` + .replace("{" + "grantId" + "}", encodeURIComponent(String(grantId))); + const resource = new Resource(this, endpoint); + + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "Grant"); + } + + /** + * @summary Get disbursement details + * @param grantId {@link string } The unique identifier of the grant reference. + * @param disbursementId {@link string } The unique identifier of the disbursement. + * @param requestOptions {@link IRequest.Options } + * @return {@link Disbursement } + */ + public async getGrantDisbursement(grantId: string, disbursementId: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grants/{grantId}/disbursements/{disbursementId}` + .replace("{" + "grantId" + "}", encodeURIComponent(String(grantId))) + .replace("{" + "disbursementId" + "}", encodeURIComponent(String(disbursementId))); + const resource = new Resource(this, endpoint); + + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "Disbursement"); + } + + /** + * @summary Make a request for a grant + * @param grantInfo {@link GrantInfo } + * @param requestOptions {@link IRequest.Options } + * @return {@link Grant } + */ + public async requestGrant(grantInfo: GrantInfo, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grants`; + const resource = new Resource(this, endpoint); + + const request: GrantInfo = ObjectSerializer.serialize(grantInfo, "GrantInfo"); + const response = await getJsonResponse( + resource, + request, + { ...requestOptions, method: "POST" } + ); + + return ObjectSerializer.deserialize(response, "Grant"); + } + + /** + * @summary Update the repayment configuration of a disbursement + * @param grantId {@link string } The unique identifier of the grant reference. + * @param disbursementId {@link string } The unique identifier of the disbursement. + * @param disbursementInfoUpdate {@link DisbursementInfoUpdate } + * @param requestOptions {@link IRequest.Options } + * @return {@link Disbursement } + */ + public async updateGrantDisbursement(grantId: string, disbursementId: string, disbursementInfoUpdate: DisbursementInfoUpdate, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/grants/{grantId}/disbursements/{disbursementId}` + .replace("{" + "grantId" + "}", encodeURIComponent(String(grantId))) + .replace("{" + "disbursementId" + "}", encodeURIComponent(String(disbursementId))); + const resource = new Resource(this, endpoint); + + const request: DisbursementInfoUpdate = ObjectSerializer.serialize(disbursementInfoUpdate, "DisbursementInfoUpdate"); + const response = await getJsonResponse( + resource, + request, + { ...requestOptions, method: "PATCH" } + ); + + return ObjectSerializer.deserialize(response, "Disbursement"); + } + +} diff --git a/src/services/capital/index.ts b/src/services/capital/index.ts new file mode 100644 index 000000000..6d8ed270f --- /dev/null +++ b/src/services/capital/index.ts @@ -0,0 +1,34 @@ +/* + * 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 this class manually. + */ + +import { GrantAccountsApi } from "./grantAccountsApi"; +import { GrantOffersApi } from "./grantOffersApi"; +import { GrantsApi } from "./grantsApi"; + +import Service from "../../service"; +import Client from "../../client"; + +export default class CapitalAPI extends Service { + + public constructor(client: Client) { + super(client); + } + + public get GrantAccountsApi() { + return new GrantAccountsApi(this.client); + } + + public get GrantOffersApi() { + return new GrantOffersApi(this.client); + } + + public get GrantsApi() { + return new GrantsApi(this.client); + } +} diff --git a/src/typings/capital/aULocalAccountIdentification.ts b/src/typings/capital/aULocalAccountIdentification.ts new file mode 100644 index 000000000..c5e258ece --- /dev/null +++ b/src/typings/capital/aULocalAccountIdentification.ts @@ -0,0 +1,59 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class AULocalAccountIdentification extends BankAccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + "accountNumber": string; + /** + * The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. + */ + "bsbCode": string; + /** + * **auLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "bsbCode", + "baseName": "bsbCode", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(AULocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/action.ts b/src/typings/capital/action.ts new file mode 100644 index 000000000..2ad92211c --- /dev/null +++ b/src/typings/capital/action.ts @@ -0,0 +1,46 @@ +/* + * 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 this class manually. + */ + + +export class Action { + /** + * The code identifying the action that needs to be completed. + */ + "actionCode": string; + /** + * Indicates whether this action has been successfully completed. + */ + "resolved": boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "actionCode", + "baseName": "actionCode", + "type": "string", + "format": "" + }, + { + "name": "resolved", + "baseName": "resolved", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Action.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/additionalBankIdentification.ts b/src/typings/capital/additionalBankIdentification.ts new file mode 100644 index 000000000..d167f0909 --- /dev/null +++ b/src/typings/capital/additionalBankIdentification.ts @@ -0,0 +1,47 @@ +/* + * 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 this class manually. + */ + +import { AdditionalBankIdentificationTypes } from "./additionalBankIdentificationTypes"; + + +export class AdditionalBankIdentification { + /** + * The value of the additional bank identification. + */ + "code"?: string; + "type"?: AdditionalBankIdentificationTypes; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "code", + "baseName": "code", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "AdditionalBankIdentificationTypes", + "format": "" + } ]; + + static getAttributeTypeMap() { + return AdditionalBankIdentification.attributeTypeMap; + } + + public constructor() { + } +} + +export namespace AdditionalBankIdentification { +} diff --git a/src/typings/capital/additionalBankIdentificationTypes.ts b/src/typings/capital/additionalBankIdentificationTypes.ts new file mode 100644 index 000000000..4517d5031 --- /dev/null +++ b/src/typings/capital/additionalBankIdentificationTypes.ts @@ -0,0 +1,18 @@ +/* + * 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 this class manually. + */ + +export enum AdditionalBankIdentificationTypes { + AuBsbCode = 'auBsbCode', + CaRoutingNumber = 'caRoutingNumber', + GbSortCode = 'gbSortCode', + HkBankCode = 'hkBankCode', + JpZenginCode = 'jpZenginCode', + NzBankBranchCode = 'nzBankBranchCode', + UsRoutingNumber = 'usRoutingNumber' +} diff --git a/src/typings/capital/amount.ts b/src/typings/capital/amount.ts new file mode 100644 index 000000000..4e1aea8a5 --- /dev/null +++ b/src/typings/capital/amount.ts @@ -0,0 +1,46 @@ +/* + * 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 this class manually. + */ + + +export class Amount { + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). + */ + "currency": string; + /** + * The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). + */ + "value": number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "currency", + "baseName": "currency", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "number", + "format": "int64" + } ]; + + static getAttributeTypeMap() { + return Amount.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/bRLocalAccountIdentification.ts b/src/typings/capital/bRLocalAccountIdentification.ts new file mode 100644 index 000000000..7e1b7593a --- /dev/null +++ b/src/typings/capital/bRLocalAccountIdentification.ts @@ -0,0 +1,79 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class BRLocalAccountIdentification extends BankAccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + "accountNumber": string; + /** + * The 3-digit bank code, with leading zeros. + */ + "bankCode": string; + /** + * The bank account branch number, without separators or whitespace. + */ + "branchNumber": string; + /** + * The 8-digit ISPB, with leading zeros. + */ + "ispb"?: string; + /** + * **brLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string", + "format": "" + }, + { + "name": "branchNumber", + "baseName": "branchNumber", + "type": "string", + "format": "" + }, + { + "name": "ispb", + "baseName": "ispb", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(BRLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/balance.ts b/src/typings/capital/balance.ts new file mode 100644 index 000000000..ec02f1a98 --- /dev/null +++ b/src/typings/capital/balance.ts @@ -0,0 +1,66 @@ +/* + * 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 this class manually. + */ + + +export class Balance { + /** + * The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). + */ + "currency": string; + /** + * The amount of the grant fee. + */ + "fee": number; + /** + * The grant amount that is paid out to the user for business financing. + */ + "principal": number; + /** + * The total amount of the grant that the user must repay. It is the sum of the fee amount and the principal amount. + */ + "total": number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "currency", + "baseName": "currency", + "type": "string", + "format": "" + }, + { + "name": "fee", + "baseName": "fee", + "type": "number", + "format": "int64" + }, + { + "name": "principal", + "baseName": "principal", + "type": "number", + "format": "int64" + }, + { + "name": "total", + "baseName": "total", + "type": "number", + "format": "int64" + } ]; + + static getAttributeTypeMap() { + return Balance.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/bankAccountIdentification.ts b/src/typings/capital/bankAccountIdentification.ts new file mode 100644 index 000000000..fd549126a --- /dev/null +++ b/src/typings/capital/bankAccountIdentification.ts @@ -0,0 +1,54 @@ +/* + * 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 this class manually. + */ + + +export class BankAccountIdentification { + /** + * The type of account, which depends on the country of the account and the currency of the transfer. + */ + "type"?: string; + + static readonly discriminator: string | undefined = "type"; + + static readonly mapping: {[index: string]: string} | undefined = { + "auLocal": "AULocalAccountIdentification", + "brLocal": "BRLocalAccountIdentification", + "caLocal": "CALocalAccountIdentification", + "czLocal": "CZLocalAccountIdentification", + "dkLocal": "DKLocalAccountIdentification", + "hkLocal": "HKLocalAccountIdentification", + "huLocal": "HULocalAccountIdentification", + "iban": "IbanAccountIdentification", + "noLocal": "NOLocalAccountIdentification", + "numberAndBic": "NumberAndBicAccountIdentification", + "nzLocal": "NZLocalAccountIdentification", + "plLocal": "PLLocalAccountIdentification", + "seLocal": "SELocalAccountIdentification", + "sgLocal": "SGLocalAccountIdentification", + "ukLocal": "UKLocalAccountIdentification", + "usLocal": "USLocalAccountIdentification", + }; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return BankAccountIdentification.attributeTypeMap; + } + + public constructor() { + //this.type = "BankAccountIdentification"; + } +} + diff --git a/src/typings/capital/cALocalAccountIdentification.ts b/src/typings/capital/cALocalAccountIdentification.ts new file mode 100644 index 000000000..2d987aeed --- /dev/null +++ b/src/typings/capital/cALocalAccountIdentification.ts @@ -0,0 +1,79 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; +import { CALocalBankAccountType } from "./cALocalBankAccountType"; + + +export class CALocalAccountIdentification extends BankAccountIdentification { + /** + * The 5- to 12-digit bank account number, without separators or whitespace. + */ + "accountNumber": string; + "accountType"?: CALocalBankAccountType; + /** + * The 3-digit institution number, without separators or whitespace. + */ + "institutionNumber": string; + /** + * The 5-digit transit number, without separators or whitespace. + */ + "transitNumber": string; + /** + * **caLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "CALocalBankAccountType", + "format": "" + }, + { + "name": "institutionNumber", + "baseName": "institutionNumber", + "type": "string", + "format": "" + }, + { + "name": "transitNumber", + "baseName": "transitNumber", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(CALocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + +export namespace CALocalAccountIdentification { +} diff --git a/src/typings/capital/cALocalBankAccountType.ts b/src/typings/capital/cALocalBankAccountType.ts new file mode 100644 index 000000000..2f0508720 --- /dev/null +++ b/src/typings/capital/cALocalBankAccountType.ts @@ -0,0 +1,13 @@ +/* + * 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 this class manually. + */ + +export enum CALocalBankAccountType { + Checking = 'checking', + Savings = 'savings' +} diff --git a/src/typings/capital/cZLocalAccountIdentification.ts b/src/typings/capital/cZLocalAccountIdentification.ts new file mode 100644 index 000000000..df8d1f0b7 --- /dev/null +++ b/src/typings/capital/cZLocalAccountIdentification.ts @@ -0,0 +1,59 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class CZLocalAccountIdentification extends BankAccountIdentification { + /** + * The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) + */ + "accountNumber": string; + /** + * The 4-digit bank code (Kód banky), without separators or whitespace. + */ + "bankCode": string; + /** + * **czLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(CZLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/counterparty.ts b/src/typings/capital/counterparty.ts new file mode 100644 index 000000000..4b25a0a04 --- /dev/null +++ b/src/typings/capital/counterparty.ts @@ -0,0 +1,56 @@ +/* + * 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 this class manually. + */ + + +export class Counterparty { + /** + * The unique identifier of the account holder that receives the grant. If no `balanceAccountId` is provided, the grant funds are disbursed to the primary balance account of this account holder. + */ + "accountHolderId"?: string; + /** + * The unique identifier of the balance account where the funds are disbursed. The balance account must belong to the specified account holder. + */ + "balanceAccountId"?: string; + /** + * The unique identifier of the transfer instrument where the funds are disbursed. The transfer instrument must belong to the legal entity of the specified account holder. + */ + "transferInstrumentId"?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountHolderId", + "baseName": "accountHolderId", + "type": "string", + "format": "" + }, + { + "name": "balanceAccountId", + "baseName": "balanceAccountId", + "type": "string", + "format": "" + }, + { + "name": "transferInstrumentId", + "baseName": "transferInstrumentId", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Counterparty.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/dKLocalAccountIdentification.ts b/src/typings/capital/dKLocalAccountIdentification.ts new file mode 100644 index 000000000..2cee6088f --- /dev/null +++ b/src/typings/capital/dKLocalAccountIdentification.ts @@ -0,0 +1,59 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class DKLocalAccountIdentification extends BankAccountIdentification { + /** + * The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). + */ + "accountNumber": string; + /** + * The 4-digit bank code (Registreringsnummer) (without separators or whitespace). + */ + "bankCode": string; + /** + * **dkLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "bankCode", + "baseName": "bankCode", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(DKLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/defaultErrorResponseEntity.ts b/src/typings/capital/defaultErrorResponseEntity.ts new file mode 100644 index 000000000..ec4bf859a --- /dev/null +++ b/src/typings/capital/defaultErrorResponseEntity.ts @@ -0,0 +1,112 @@ +/* + * 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 this class manually. + */ + +import { InvalidField } from "./invalidField"; + +/** +* Standardized error response following RFC-7807 format +*/ + + +export class DefaultErrorResponseEntity { + /** + * A human-readable explanation specific to this occurrence of the problem. + */ + "detail"?: string; + /** + * Unique business error code. + */ + "errorCode"?: string; + /** + * A URI that identifies the specific occurrence of the problem if applicable. + */ + "instance"?: string; + /** + * Array of fields with validation errors when applicable. + */ + "invalidFields"?: Array; + /** + * The unique reference for the request. + */ + "requestId"?: string; + /** + * The HTTP status code. + */ + "status"?: number; + /** + * A short, human-readable summary of the problem type. + */ + "title"?: string; + /** + * A URI that identifies the validation error type. It points to human-readable documentation for the problem type. + */ + "type"?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "detail", + "baseName": "detail", + "type": "string", + "format": "" + }, + { + "name": "errorCode", + "baseName": "errorCode", + "type": "string", + "format": "" + }, + { + "name": "instance", + "baseName": "instance", + "type": "string", + "format": "" + }, + { + "name": "invalidFields", + "baseName": "invalidFields", + "type": "Array", + "format": "" + }, + { + "name": "requestId", + "baseName": "requestId", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "number", + "format": "int32" + }, + { + "name": "title", + "baseName": "title", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DefaultErrorResponseEntity.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/disbursement.ts b/src/typings/capital/disbursement.ts new file mode 100644 index 000000000..f642ea8aa --- /dev/null +++ b/src/typings/capital/disbursement.ts @@ -0,0 +1,110 @@ +/* + * 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 this class manually. + */ + +import { Amount } from "./amount"; +import { Balance } from "./balance"; +import { DisbursementRepayment } from "./disbursementRepayment"; +import { Fee } from "./fee"; +import { FundsCollection } from "./fundsCollection"; + + +export class Disbursement { + /** + * The unique identifier of the account holder that received the disbursement. + */ + "accountHolderId": string; + "amount": Amount; + /** + * The unique identifier of the balance account that received the disbursement. + */ + "balanceAccountId": string; + "balances": Balance; + "fee": Fee; + /** + * Contains information about the accounts that Adyen uses to collect funds related to repayments. + */ + "fundsCollections"?: Array; + /** + * The unique identifier of the grant related to the disbursement. + */ + "grantId": string; + /** + * The unique identifier of the disbursement. + */ + "id": string; + "repayment": DisbursementRepayment; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountHolderId", + "baseName": "accountHolderId", + "type": "string", + "format": "" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount", + "format": "" + }, + { + "name": "balanceAccountId", + "baseName": "balanceAccountId", + "type": "string", + "format": "" + }, + { + "name": "balances", + "baseName": "balances", + "type": "Balance", + "format": "" + }, + { + "name": "fee", + "baseName": "fee", + "type": "Fee", + "format": "" + }, + { + "name": "fundsCollections", + "baseName": "fundsCollections", + "type": "Array", + "format": "" + }, + { + "name": "grantId", + "baseName": "grantId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "repayment", + "baseName": "repayment", + "type": "DisbursementRepayment", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Disbursement.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/disbursementInfoUpdate.ts b/src/typings/capital/disbursementInfoUpdate.ts new file mode 100644 index 000000000..012e51589 --- /dev/null +++ b/src/typings/capital/disbursementInfoUpdate.ts @@ -0,0 +1,35 @@ +/* + * 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 this class manually. + */ + +import { DisbursementRepaymentInfoUpdate } from "./disbursementRepaymentInfoUpdate"; + + +export class DisbursementInfoUpdate { + "repayment"?: DisbursementRepaymentInfoUpdate | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "repayment", + "baseName": "repayment", + "type": "DisbursementRepaymentInfoUpdate | null", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DisbursementInfoUpdate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/disbursementRepayment.ts b/src/typings/capital/disbursementRepayment.ts new file mode 100644 index 000000000..fa652bfe1 --- /dev/null +++ b/src/typings/capital/disbursementRepayment.ts @@ -0,0 +1,43 @@ +/* + * 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 this class manually. + */ + + +export class DisbursementRepayment { + /** + * The percentage of your user\'s incoming net volume that is deducted for repaying the grant. The percentage expressed in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). + */ + "basisPoints": number; + "updateDescription": string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "basisPoints", + "baseName": "basisPoints", + "type": "number", + "format": "int32" + }, + { + "name": "updateDescription", + "baseName": "updateDescription", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DisbursementRepayment.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/disbursementRepaymentInfoUpdate.ts b/src/typings/capital/disbursementRepaymentInfoUpdate.ts new file mode 100644 index 000000000..cbf382ed8 --- /dev/null +++ b/src/typings/capital/disbursementRepaymentInfoUpdate.ts @@ -0,0 +1,43 @@ +/* + * 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 this class manually. + */ + + +export class DisbursementRepaymentInfoUpdate { + /** + * The percentage of your user\'s incoming net volume that is deducted for repaying the grant. The percentage expressed in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). + */ + "basisPoints"?: number; + "updateDescription"?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "basisPoints", + "baseName": "basisPoints", + "type": "number", + "format": "int32" + }, + { + "name": "updateDescription", + "baseName": "updateDescription", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return DisbursementRepaymentInfoUpdate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/disbursements.ts b/src/typings/capital/disbursements.ts new file mode 100644 index 000000000..c8175cad0 --- /dev/null +++ b/src/typings/capital/disbursements.ts @@ -0,0 +1,38 @@ +/* + * 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 this class manually. + */ + +import { Disbursement } from "./disbursement"; + + +export class Disbursements { + /** + * Contains a list of all disbursements related to the specified grant. + */ + "disbursements": Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "disbursements", + "baseName": "disbursements", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Disbursements.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/fee.ts b/src/typings/capital/fee.ts new file mode 100644 index 000000000..6a747e82b --- /dev/null +++ b/src/typings/capital/fee.ts @@ -0,0 +1,35 @@ +/* + * 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 this class manually. + */ + +import { Amount } from "./amount"; + + +export class Fee { + "amount": Amount; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Fee.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/fundsCollection.ts b/src/typings/capital/fundsCollection.ts new file mode 100644 index 000000000..4935402c7 --- /dev/null +++ b/src/typings/capital/fundsCollection.ts @@ -0,0 +1,45 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; +import { FundsCollectionType } from "./fundsCollectionType"; + + +export class FundsCollection { + "accountIdentification"?: BankAccountIdentification | null; + "fundsCollectionType"?: FundsCollectionType; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountIdentification", + "baseName": "accountIdentification", + "type": "BankAccountIdentification | null", + "format": "" + }, + { + "name": "fundsCollectionType", + "baseName": "fundsCollectionType", + "type": "FundsCollectionType", + "format": "" + } ]; + + static getAttributeTypeMap() { + return FundsCollection.attributeTypeMap; + } + + public constructor() { + } +} + +export namespace FundsCollection { +} diff --git a/src/typings/capital/fundsCollectionType.ts b/src/typings/capital/fundsCollectionType.ts new file mode 100644 index 000000000..79d85f45d --- /dev/null +++ b/src/typings/capital/fundsCollectionType.ts @@ -0,0 +1,13 @@ +/* + * 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 this class manually. + */ + +export enum FundsCollectionType { + UnscheduledRepayment = 'UnscheduledRepayment', + Revocation = 'Revocation' +} diff --git a/src/typings/capital/grant.ts b/src/typings/capital/grant.ts new file mode 100644 index 000000000..9df8056bc --- /dev/null +++ b/src/typings/capital/grant.ts @@ -0,0 +1,89 @@ +/* + * 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 this class manually. + */ + +import { Amount } from "./amount"; +import { Balance } from "./balance"; +import { Counterparty } from "./counterparty"; +import { Status } from "./status"; + + +export class Grant { + "amount"?: Amount | null; + "balances": Balance; + "counterparty"?: Counterparty | null; + /** + * The unique identifier of the grant account that tracks this grant. + */ + "grantAccountId": string; + /** + * The unique identifier of the selected grant offer. Adyen uses the details of the selected grant offer to create a grant. + */ + "grantOfferId": string; + /** + * The unique identifier of the grant reference. + */ + "id": string; + "status": Status; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount | null", + "format": "" + }, + { + "name": "balances", + "baseName": "balances", + "type": "Balance", + "format": "" + }, + { + "name": "counterparty", + "baseName": "counterparty", + "type": "Counterparty | null", + "format": "" + }, + { + "name": "grantAccountId", + "baseName": "grantAccountId", + "type": "string", + "format": "" + }, + { + "name": "grantOfferId", + "baseName": "grantOfferId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "Status", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Grant.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/grantAccount.ts b/src/typings/capital/grantAccount.ts new file mode 100644 index 000000000..8bcfc5671 --- /dev/null +++ b/src/typings/capital/grantAccount.ts @@ -0,0 +1,69 @@ +/* + * 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 this class manually. + */ + +import { Balance } from "./balance"; +import { GrantLimit } from "./grantLimit"; + + +export class GrantAccount { + /** + * Contains the sum of the balances of all grants tracked by this grant account. The balances are separated by currency. + */ + "balances"?: Array; + /** + * The unique identifier of the balance account used to fund the grant. + */ + "fundingBalanceAccountId"?: string; + /** + * The unique identifier of the grant account. + */ + "id"?: string; + /** + * Contains the maximum amount of funds that you can disburse for grants. + */ + "limits"?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "balances", + "baseName": "balances", + "type": "Array", + "format": "" + }, + { + "name": "fundingBalanceAccountId", + "baseName": "fundingBalanceAccountId", + "type": "string", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "limits", + "baseName": "limits", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GrantAccount.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/grantInfo.ts b/src/typings/capital/grantInfo.ts new file mode 100644 index 000000000..6a0ce45dd --- /dev/null +++ b/src/typings/capital/grantInfo.ts @@ -0,0 +1,63 @@ +/* + * 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 this class manually. + */ + +import { Amount } from "./amount"; +import { Counterparty } from "./counterparty"; + + +export class GrantInfo { + "amount"?: Amount | null; + "counterparty"?: Counterparty | null; + /** + * The unique identifier of the grant account that tracks this grant. + */ + "grantAccountId": string; + /** + * The unique identifier of the selected grant offer. Adyen uses the details of the selected grant offer to create a grant. + */ + "grantOfferId": string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount | null", + "format": "" + }, + { + "name": "counterparty", + "baseName": "counterparty", + "type": "Counterparty | null", + "format": "" + }, + { + "name": "grantAccountId", + "baseName": "grantAccountId", + "type": "string", + "format": "" + }, + { + "name": "grantOfferId", + "baseName": "grantOfferId", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GrantInfo.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/grantLimit.ts b/src/typings/capital/grantLimit.ts new file mode 100644 index 000000000..f736ab39c --- /dev/null +++ b/src/typings/capital/grantLimit.ts @@ -0,0 +1,35 @@ +/* + * 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 this class manually. + */ + +import { Amount } from "./amount"; + + +export class GrantLimit { + "amount"?: Amount | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount | null", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GrantLimit.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/grantOffer.ts b/src/typings/capital/grantOffer.ts new file mode 100644 index 000000000..9b5f30d75 --- /dev/null +++ b/src/typings/capital/grantOffer.ts @@ -0,0 +1,107 @@ +/* + * 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 this class manually. + */ + +import { Amount } from "./amount"; +import { GrantOfferFee } from "./grantOfferFee"; +import { Repayment } from "./repayment"; + + +export class GrantOffer { + /** + * The unique identifier of the account holder to which the grant is offered. + */ + "accountHolderId": string; + "amount"?: Amount | null; + /** + * The contract type of the grant offer. Possible values: **cashAdvance**, **loan**. + */ + "contractType"?: GrantOffer.ContractTypeEnum; + /** + * The date when the grant offer expires. + */ + "expiresAt"?: Date; + "fee"?: GrantOfferFee | null; + /** + * The unique identifier of the grant offer. + */ + "id"?: string; + "repayment"?: Repayment | null; + /** + * The date when the grant offer becomes available. + */ + "startsAt"?: Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountHolderId", + "baseName": "accountHolderId", + "type": "string", + "format": "" + }, + { + "name": "amount", + "baseName": "amount", + "type": "Amount | null", + "format": "" + }, + { + "name": "contractType", + "baseName": "contractType", + "type": "GrantOffer.ContractTypeEnum", + "format": "" + }, + { + "name": "expiresAt", + "baseName": "expiresAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "fee", + "baseName": "fee", + "type": "GrantOfferFee | null", + "format": "" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "repayment", + "baseName": "repayment", + "type": "Repayment | null", + "format": "" + }, + { + "name": "startsAt", + "baseName": "startsAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return GrantOffer.attributeTypeMap; + } + + public constructor() { + } +} + +export namespace GrantOffer { + export enum ContractTypeEnum { + CashAdvance = 'cashAdvance', + Loan = 'loan' + } +} diff --git a/src/typings/capital/grantOfferFee.ts b/src/typings/capital/grantOfferFee.ts new file mode 100644 index 000000000..d0438e38d --- /dev/null +++ b/src/typings/capital/grantOfferFee.ts @@ -0,0 +1,45 @@ +/* + * 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 this class manually. + */ + +import { Amount } from "./amount"; + + +export class GrantOfferFee { + "amount": Amount; + /** + * Annual Percentage Rate (APR) of the offer. The percentage is expressed in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). + */ + "aprBasisPoints"?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount", + "format": "" + }, + { + "name": "aprBasisPoints", + "baseName": "aprBasisPoints", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return GrantOfferFee.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/grantOffers.ts b/src/typings/capital/grantOffers.ts new file mode 100644 index 000000000..ffbde5d57 --- /dev/null +++ b/src/typings/capital/grantOffers.ts @@ -0,0 +1,38 @@ +/* + * 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 this class manually. + */ + +import { GrantOffer } from "./grantOffer"; + + +export class GrantOffers { + /** + * Contains a list of available grant offers for the specified account holder. + */ + "grantOffers": Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "grantOffers", + "baseName": "grantOffers", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return GrantOffers.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/grants.ts b/src/typings/capital/grants.ts new file mode 100644 index 000000000..0ac657daa --- /dev/null +++ b/src/typings/capital/grants.ts @@ -0,0 +1,38 @@ +/* + * 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 this class manually. + */ + +import { Grant } from "./grant"; + + +export class Grants { + /** + * Contains a list of the grants that the account holder has received. + */ + "grants": Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "grants", + "baseName": "grants", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Grants.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/hKLocalAccountIdentification.ts b/src/typings/capital/hKLocalAccountIdentification.ts new file mode 100644 index 000000000..302bf50d4 --- /dev/null +++ b/src/typings/capital/hKLocalAccountIdentification.ts @@ -0,0 +1,59 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class HKLocalAccountIdentification extends BankAccountIdentification { + /** + * The 9- to 17-digit bank account number, without separators or whitespace. Starts with the 3-digit branch code. + */ + "accountNumber": string; + /** + * The 3-digit clearing code, without separators or whitespace. + */ + "clearingCode": string; + /** + * **hkLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "clearingCode", + "baseName": "clearingCode", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(HKLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/hULocalAccountIdentification.ts b/src/typings/capital/hULocalAccountIdentification.ts new file mode 100644 index 000000000..73b64eac0 --- /dev/null +++ b/src/typings/capital/hULocalAccountIdentification.ts @@ -0,0 +1,49 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class HULocalAccountIdentification extends BankAccountIdentification { + /** + * The 24-digit bank account number, without separators or whitespace. + */ + "accountNumber": string; + /** + * **huLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(HULocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/ibanAccountIdentification.ts b/src/typings/capital/ibanAccountIdentification.ts new file mode 100644 index 000000000..ad27c4203 --- /dev/null +++ b/src/typings/capital/ibanAccountIdentification.ts @@ -0,0 +1,49 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class IbanAccountIdentification extends BankAccountIdentification { + /** + * The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. + */ + "iban": string; + /** + * **iban** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "iban", + "baseName": "iban", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(IbanAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/invalidField.ts b/src/typings/capital/invalidField.ts new file mode 100644 index 000000000..d558415f1 --- /dev/null +++ b/src/typings/capital/invalidField.ts @@ -0,0 +1,56 @@ +/* + * 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 this class manually. + */ + + +export class InvalidField { + /** + * The field that has an invalid value. + */ + "name": string; + /** + * The invalid value. + */ + "value": string; + /** + * Description of the validation error. + */ + "message": string; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return InvalidField.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/models.ts b/src/typings/capital/models.ts new file mode 100644 index 000000000..8de498f72 --- /dev/null +++ b/src/typings/capital/models.ts @@ -0,0 +1,50 @@ +export * from "./aULocalAccountIdentification" +export * from "./action" +export * from "./additionalBankIdentification" +export * from "./additionalBankIdentificationTypes" +export * from "./amount" +export * from "./bRLocalAccountIdentification" +export * from "./balance" +export * from "./bankAccountIdentification" +export * from "./cALocalAccountIdentification" +export * from "./cALocalBankAccountType" +export * from "./cZLocalAccountIdentification" +export * from "./counterparty" +export * from "./dKLocalAccountIdentification" +export * from "./defaultErrorResponseEntity" +export * from "./disbursement" +export * from "./disbursementInfoUpdate" +export * from "./disbursementRepayment" +export * from "./disbursementRepaymentInfoUpdate" +export * from "./disbursements" +export * from "./fee" +export * from "./fundsCollection" +export * from "./fundsCollectionType" +export * from "./grant" +export * from "./grantAccount" +export * from "./grantInfo" +export * from "./grantLimit" +export * from "./grantOffer" +export * from "./grantOfferFee" +export * from "./grantOffers" +export * from "./grants" +export * from "./hKLocalAccountIdentification" +export * from "./hULocalAccountIdentification" +export * from "./ibanAccountIdentification" +export * from "./invalidField" +export * from "./nOLocalAccountIdentification" +export * from "./nZLocalAccountIdentification" +export * from "./numberAndBicAccountIdentification" +export * from "./pLLocalAccountIdentification" +export * from "./repayment" +export * from "./repaymentTerm" +export * from "./sELocalAccountIdentification" +export * from "./sGLocalAccountIdentification" +export * from "./status" +export * from "./thresholdRepayment" +export * from "./uKLocalAccountIdentification" +export * from "./uSLocalAccountIdentification" +export * from "./uSLocalBankAccountType" + +// serializing and deserializing typed objects +export * from "./objectSerializer" \ No newline at end of file diff --git a/src/typings/capital/nOLocalAccountIdentification.ts b/src/typings/capital/nOLocalAccountIdentification.ts new file mode 100644 index 000000000..604200602 --- /dev/null +++ b/src/typings/capital/nOLocalAccountIdentification.ts @@ -0,0 +1,49 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class NOLocalAccountIdentification extends BankAccountIdentification { + /** + * The 11-digit bank account number, without separators or whitespace. + */ + "accountNumber": string; + /** + * **noLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(NOLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/nZLocalAccountIdentification.ts b/src/typings/capital/nZLocalAccountIdentification.ts new file mode 100644 index 000000000..a1ca1f75e --- /dev/null +++ b/src/typings/capital/nZLocalAccountIdentification.ts @@ -0,0 +1,49 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class NZLocalAccountIdentification extends BankAccountIdentification { + /** + * The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. + */ + "accountNumber": string; + /** + * **nzLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(NZLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/numberAndBicAccountIdentification.ts b/src/typings/capital/numberAndBicAccountIdentification.ts new file mode 100644 index 000000000..bcf03a432 --- /dev/null +++ b/src/typings/capital/numberAndBicAccountIdentification.ts @@ -0,0 +1,67 @@ +/* + * 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 this class manually. + */ + +import { AdditionalBankIdentification } from "./additionalBankIdentification"; +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class NumberAndBicAccountIdentification extends BankAccountIdentification { + /** + * The bank account number, without separators or whitespace. The length and format depends on the bank or country. + */ + "accountNumber": string; + "additionalBankIdentification"?: AdditionalBankIdentification | null; + /** + * The bank\'s 8- or 11-character BIC or SWIFT code. + */ + "bic": string; + /** + * **numberAndBic** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "additionalBankIdentification", + "baseName": "additionalBankIdentification", + "type": "AdditionalBankIdentification | null", + "format": "" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(NumberAndBicAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/objectSerializer.ts b/src/typings/capital/objectSerializer.ts new file mode 100644 index 000000000..f57acb420 --- /dev/null +++ b/src/typings/capital/objectSerializer.ts @@ -0,0 +1,448 @@ +export * from "./models"; + +import { AULocalAccountIdentification } from "./aULocalAccountIdentification"; +import { Action } from "./action"; +import { AdditionalBankIdentification } from "./additionalBankIdentification"; +import { AdditionalBankIdentificationTypes } from "./additionalBankIdentificationTypes"; +import { Amount } from "./amount"; +import { BRLocalAccountIdentification } from "./bRLocalAccountIdentification"; +import { Balance } from "./balance"; +import { BankAccountIdentification } from "./bankAccountIdentification"; +import { CALocalAccountIdentification } from "./cALocalAccountIdentification"; +import { CALocalBankAccountType } from "./cALocalBankAccountType"; +import { CZLocalAccountIdentification } from "./cZLocalAccountIdentification"; +import { Counterparty } from "./counterparty"; +import { DKLocalAccountIdentification } from "./dKLocalAccountIdentification"; +import { DefaultErrorResponseEntity } from "./defaultErrorResponseEntity"; +import { Disbursement } from "./disbursement"; +import { DisbursementInfoUpdate } from "./disbursementInfoUpdate"; +import { DisbursementRepayment } from "./disbursementRepayment"; +import { DisbursementRepaymentInfoUpdate } from "./disbursementRepaymentInfoUpdate"; +import { Disbursements } from "./disbursements"; +import { Fee } from "./fee"; +import { FundsCollection } from "./fundsCollection"; +import { FundsCollectionType } from "./fundsCollectionType"; +import { Grant } from "./grant"; +import { GrantAccount } from "./grantAccount"; +import { GrantInfo } from "./grantInfo"; +import { GrantLimit } from "./grantLimit"; +import { GrantOffer } from "./grantOffer"; +import { GrantOfferFee } from "./grantOfferFee"; +import { GrantOffers } from "./grantOffers"; +import { Grants } from "./grants"; +import { HKLocalAccountIdentification } from "./hKLocalAccountIdentification"; +import { HULocalAccountIdentification } from "./hULocalAccountIdentification"; +import { IbanAccountIdentification } from "./ibanAccountIdentification"; +import { InvalidField } from "./invalidField"; +import { NOLocalAccountIdentification } from "./nOLocalAccountIdentification"; +import { NZLocalAccountIdentification } from "./nZLocalAccountIdentification"; +import { NumberAndBicAccountIdentification } from "./numberAndBicAccountIdentification"; +import { PLLocalAccountIdentification } from "./pLLocalAccountIdentification"; +import { Repayment } from "./repayment"; +import { RepaymentTerm } from "./repaymentTerm"; +import { SELocalAccountIdentification } from "./sELocalAccountIdentification"; +import { SGLocalAccountIdentification } from "./sGLocalAccountIdentification"; +import { Status } from "./status"; +import { ThresholdRepayment } from "./thresholdRepayment"; +import { UKLocalAccountIdentification } from "./uKLocalAccountIdentification"; +import { USLocalAccountIdentification } from "./uSLocalAccountIdentification"; +import { USLocalBankAccountType } from "./uSLocalBankAccountType"; + +/* tslint:disable:no-unused-variable */ +let primitives = [ + "string", + "boolean", + "double", + "integer", + "long", + "float", + "number", + "any" + ]; + +let enumsMap: Set = new Set([ + AdditionalBankIdentificationTypes.AuBsbCode, + AdditionalBankIdentificationTypes.CaRoutingNumber, + AdditionalBankIdentificationTypes.GbSortCode, + AdditionalBankIdentificationTypes.HkBankCode, + AdditionalBankIdentificationTypes.JpZenginCode, + AdditionalBankIdentificationTypes.NzBankBranchCode, + AdditionalBankIdentificationTypes.UsRoutingNumber, + CALocalBankAccountType.Checking, + CALocalBankAccountType.Savings, + FundsCollectionType.UnscheduledRepayment, + FundsCollectionType.Revocation, + "GrantOffer.ContractTypeEnum", + "Status.CodeEnum", + USLocalBankAccountType.Checking, + USLocalBankAccountType.Savings, +]); + +let typeMap: {[index: string]: any} = { + "AULocalAccountIdentification": AULocalAccountIdentification, + "Action": Action, + "AdditionalBankIdentification": AdditionalBankIdentification, + "Amount": Amount, + "BRLocalAccountIdentification": BRLocalAccountIdentification, + "Balance": Balance, + "BankAccountIdentification": BankAccountIdentification, + "CALocalAccountIdentification": CALocalAccountIdentification, + "CZLocalAccountIdentification": CZLocalAccountIdentification, + "Counterparty": Counterparty, + "DKLocalAccountIdentification": DKLocalAccountIdentification, + "DefaultErrorResponseEntity": DefaultErrorResponseEntity, + "Disbursement": Disbursement, + "DisbursementInfoUpdate": DisbursementInfoUpdate, + "DisbursementRepayment": DisbursementRepayment, + "DisbursementRepaymentInfoUpdate": DisbursementRepaymentInfoUpdate, + "Disbursements": Disbursements, + "Fee": Fee, + "FundsCollection": FundsCollection, + "Grant": Grant, + "GrantAccount": GrantAccount, + "GrantInfo": GrantInfo, + "GrantLimit": GrantLimit, + "GrantOffer": GrantOffer, + "GrantOfferFee": GrantOfferFee, + "GrantOffers": GrantOffers, + "Grants": Grants, + "HKLocalAccountIdentification": HKLocalAccountIdentification, + "HULocalAccountIdentification": HULocalAccountIdentification, + "IbanAccountIdentification": IbanAccountIdentification, + "InvalidField": InvalidField, + "NOLocalAccountIdentification": NOLocalAccountIdentification, + "NZLocalAccountIdentification": NZLocalAccountIdentification, + "NumberAndBicAccountIdentification": NumberAndBicAccountIdentification, + "PLLocalAccountIdentification": PLLocalAccountIdentification, + "Repayment": Repayment, + "RepaymentTerm": RepaymentTerm, + "SELocalAccountIdentification": SELocalAccountIdentification, + "SGLocalAccountIdentification": SGLocalAccountIdentification, + "Status": Status, + "ThresholdRepayment": ThresholdRepayment, + "UKLocalAccountIdentification": UKLocalAccountIdentification, + "USLocalAccountIdentification": USLocalAccountIdentification, +} + +type MimeTypeDescriptor = { + type: string; + subtype: string; + subtypeTokens: string[]; +}; + +/** + * Every mime-type consists of a type, subtype, and optional parameters. + * The subtype can be composite, including information about the content format. + * For example: `application/json-patch+json`, `application/merge-patch+json`. + * + * This helper transforms a string mime-type into an internal representation. + * This simplifies the implementation of predicates that in turn define common rules for parsing or stringifying + * the payload. + */ +const parseMimeType = (mimeType: string): MimeTypeDescriptor => { + const [type = '', subtype = ''] = mimeType.split('/'); + return { + type, + subtype, + subtypeTokens: subtype.split('+'), + }; +}; + +type MimeTypePredicate = (mimeType: string) => boolean; + +// This factory creates a predicate function that checks a string mime-type against defined rules. +const mimeTypePredicateFactory = (predicate: (descriptor: MimeTypeDescriptor) => boolean): MimeTypePredicate => (mimeType) => predicate(parseMimeType(mimeType)); + +// Use this factory when you need to define a simple predicate based only on type and, if applicable, subtype. +const mimeTypeSimplePredicateFactory = (type: string, subtype?: string): MimeTypePredicate => mimeTypePredicateFactory((descriptor) => { + if (descriptor.type !== type) return false; + if (subtype != null && descriptor.subtype !== subtype) return false; + return true; +}); + +// Creating a set of named predicates that will help us determine how to handle different mime-types +const isTextLikeMimeType = mimeTypeSimplePredicateFactory('text'); +const isJsonMimeType = mimeTypeSimplePredicateFactory('application', 'json'); +const isJsonLikeMimeType = mimeTypePredicateFactory((descriptor) => descriptor.type === 'application' && descriptor.subtypeTokens.some((item) => item === 'json')); +const isOctetStreamMimeType = mimeTypeSimplePredicateFactory('application', 'octet-stream'); +const isFormUrlencodedMimeType = mimeTypeSimplePredicateFactory('application', 'x-www-form-urlencoded'); + +// Defining a list of mime-types in the order of prioritization for handling. +const supportedMimeTypePredicatesWithPriority: MimeTypePredicate[] = [ + isJsonMimeType, + isJsonLikeMimeType, + isTextLikeMimeType, + isOctetStreamMimeType, + isFormUrlencodedMimeType, +]; + +const nullableSuffix = " | null"; +const optionalSuffix = " | undefined"; +const arrayPrefix = "Array<"; +const arraySuffix = ">"; +const mapPrefix = "{ [key: string]: "; +const mapSuffix = "; }"; + +export class ObjectSerializer { + public static findCorrectType(data: any, expectedType: string) { + if (data == undefined) { + return expectedType; + } else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) { + return expectedType; + } else if (expectedType === "Date") { + return expectedType; + } else { + if (enumsMap.has(expectedType)) { + return expectedType; + } + + if (!typeMap[expectedType]) { + return expectedType; // w/e we don't know the type + } + + // Check the discriminator + let discriminatorProperty = typeMap[expectedType].discriminator; + if (discriminatorProperty == null) { + return expectedType; // the type does not have a discriminator. use it. + } else { + if (data[discriminatorProperty]) { + var discriminatorType = data[discriminatorProperty]; + let mapping = typeMap[expectedType].mapping; + if (mapping != undefined && mapping[discriminatorType]) { + return mapping[discriminatorType]; // use the type given in the discriminator + } else if(typeMap[discriminatorType]) { + return discriminatorType; + } else { + return expectedType; // discriminator did not map to a type + } + } else { + return expectedType; // discriminator was not present (or an empty string) + } + } + } + } + + /** + * Serializes a value into a plain JSON-compatible object based on its type. + * + * Supports primitives, arrays, maps, dates, enums, and classes defined in `typeMap`. + * Falls back to raw data if type is unknown or lacks `getAttributeTypeMap()`. + * + * @param data - The value to serialize. + * @param type - The expected type name as a string. + * @param format - Format hint (e.g. "date" or "date-time"). Default is an empty string. + * @returns A JSON-compatible representation of `data`. + */ + public static serialize(data: any, type: string, format: string = ""): any { + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.endsWith(nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.serialize(data, subType, format); + } else if (type.endsWith(optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.serialize(data, subType, format); + } else if (type.startsWith(arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type + let transformedData: any[] = []; + for (let date of data) { + transformedData.push(ObjectSerializer.serialize(date, subType, format)); + } + return transformedData; + } else if (type.startsWith(mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.serialize( + data[key], + subType, + format, + ); + } + return transformedData; + } else if (type === "Date") { + if (format == "date") { + let month = data.getMonth()+1 + month = month < 10 ? "0" + month.toString() : month.toString() + let day = data.getDate(); + day = day < 10 ? "0" + day.toString() : day.toString(); + + return data.getFullYear() + "-" + month + "-" + day; + } else { + return data.toISOString(); + } + } else { + if (enumsMap.has(type)) { + return data; + } + if (!typeMap[type]) { // in case we dont know the type + return data; + } + + // Get the actual type of this object + type = this.findCorrectType(data, type); + + const clazz = typeMap[type]; + + // Safe check for getAttributeTypeMap + if (typeof clazz.getAttributeTypeMap !== "function") { + return { ...data }; // fallback: shallow copy + } + + // get the map for the correct type. + let attributeTypes = typeMap[type].getAttributeTypeMap(); + let instance: {[index: string]: any} = {}; + for (let attributeType of attributeTypes) { + instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format); + } + return instance; + } + } + + /** + * Deserializes a plain JSON-compatible object into a typed instance. + * + * Handles primitives, arrays, maps, dates, enums, and known classes from `typeMap`. + * Uses discriminators when available to resolve polymorphic types. + * Falls back to raw data if the type is unknown or lacks `getAttributeTypeMap()`. + * + * @param data - The raw input to deserialize. + * @param type - The expected type name as a string. + * @param format - Format hint (e.g. "date" or "date-time"). Default is an empty string. + * @returns A deserialized instance or value of `data`. + */ + public static deserialize(data: any, type: string, format: string = ""): any { + // polymorphism may change the actual type. + type = ObjectSerializer.findCorrectType(data, type); + if (data == undefined) { + return data; + } else if (primitives.indexOf(type.toLowerCase()) !== -1) { + return data; + } else if (type.endsWith(nullableSuffix)) { + let subType: string = type.slice(0, -nullableSuffix.length); // Type | null => Type + return ObjectSerializer.deserialize(data, subType, format); + } else if (type.endsWith(optionalSuffix)) { + let subType: string = type.slice(0, -optionalSuffix.length); // Type | undefined => Type + return ObjectSerializer.deserialize(data, subType, format); + } else if (type.startsWith(arrayPrefix)) { + let subType: string = type.slice(arrayPrefix.length, -arraySuffix.length); // Array => Type + let transformedData: any[] = []; + for (let date of data) { + transformedData.push(ObjectSerializer.deserialize(date, subType, format)); + } + return transformedData; + } else if (type.startsWith(mapPrefix)) { + let subType: string = type.slice(mapPrefix.length, -mapSuffix.length); // { [key: string]: Type; } => Type + let transformedData: { [key: string]: any } = {}; + for (let key in data) { + transformedData[key] = ObjectSerializer.deserialize( + data[key], + subType, + format, + ); + } + return transformedData; + } else if (type === "Date") { + return new Date(data); + } else { + if (enumsMap.has(type)) {// is Enum + return data; + } + + if (!typeMap[type]) { // dont know the type + return data; + } + let instance = new typeMap[type](); + + // Safe check for getAttributeTypeMap + if (typeof typeMap[type].getAttributeTypeMap !== "function") { + Object.assign(instance, data); // fallback: shallow copy + return instance; + } + + let attributeTypes = typeMap[type].getAttributeTypeMap(); + for (let attributeType of attributeTypes) { + let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format); + if (value !== undefined) { + instance[attributeType.name] = value; + } + } + return instance; + } + } + + + /** + * Normalize media type + * + * We currently do not handle any media types attributes, i.e. anything + * after a semicolon. All content is assumed to be UTF-8 compatible. + */ + public static normalizeMediaType(mediaType: string | undefined): string | undefined { + if (mediaType === undefined) { + return undefined; + } + return (mediaType.split(";")[0] ?? '').trim().toLowerCase(); + } + + /** + * From a list of possible media types, choose the one we can handle best. + * + * The order of the given media types does not have any impact on the choice + * made. + */ + public static getPreferredMediaType(mediaTypes: Array): string { + /** According to OAS 3 we should default to json */ + if (mediaTypes.length === 0) { + return "application/json"; + } + + const normalMediaTypes = mediaTypes.map(ObjectSerializer.normalizeMediaType); + + for (const predicate of supportedMimeTypePredicatesWithPriority) { + for (const mediaType of normalMediaTypes) { + if (mediaType != null && predicate(mediaType)) { + return mediaType; + } + } + } + + throw new Error("None of the given media types are supported: " + mediaTypes.join(", ")); + } + + /** + * Convert data to a string according the given media type + */ + public static stringify(data: any, mediaType: string): string { + if (isTextLikeMimeType(mediaType)) { + return String(data); + } + + if (isJsonLikeMimeType(mediaType)) { + return JSON.stringify(data); + } + + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify."); + } + + /** + * Parse data from a string according to the given media type + */ + public static parse(rawData: string, mediaType: string | undefined) { + if (mediaType === undefined) { + throw new Error("Cannot parse content. No Content-Type defined."); + } + + if (isTextLikeMimeType(mediaType)) { + return rawData; + } + + if (isJsonLikeMimeType(mediaType)) { + return JSON.parse(rawData); + } + + throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse."); + } +} diff --git a/src/typings/capital/pLLocalAccountIdentification.ts b/src/typings/capital/pLLocalAccountIdentification.ts new file mode 100644 index 000000000..b9b4f69b4 --- /dev/null +++ b/src/typings/capital/pLLocalAccountIdentification.ts @@ -0,0 +1,49 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class PLLocalAccountIdentification extends BankAccountIdentification { + /** + * The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. + */ + "accountNumber": string; + /** + * **plLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(PLLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/repayment.ts b/src/typings/capital/repayment.ts new file mode 100644 index 000000000..756ecd4a8 --- /dev/null +++ b/src/typings/capital/repayment.ts @@ -0,0 +1,53 @@ +/* + * 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 this class manually. + */ + +import { RepaymentTerm } from "./repaymentTerm"; +import { ThresholdRepayment } from "./thresholdRepayment"; + + +export class Repayment { + /** + * The percentage of your user\'s incoming net volume that is deducted for repaying the grant. The percentage expressed in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). + */ + "basisPoints": number; + "term"?: RepaymentTerm | null; + "threshold"?: ThresholdRepayment | null; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "basisPoints", + "baseName": "basisPoints", + "type": "number", + "format": "int32" + }, + { + "name": "term", + "baseName": "term", + "type": "RepaymentTerm | null", + "format": "" + }, + { + "name": "threshold", + "baseName": "threshold", + "type": "ThresholdRepayment | null", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Repayment.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/repaymentTerm.ts b/src/typings/capital/repaymentTerm.ts new file mode 100644 index 000000000..390da92b3 --- /dev/null +++ b/src/typings/capital/repaymentTerm.ts @@ -0,0 +1,46 @@ +/* + * 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 this class manually. + */ + + +export class RepaymentTerm { + /** + * The estimated duration of the repayment term, in days. + */ + "estimatedDays": number; + /** + * The maximum duration of the repayment term, in days. Only applies when `contractType` is **loan**. + */ + "maximumDays"?: number; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "estimatedDays", + "baseName": "estimatedDays", + "type": "number", + "format": "int32" + }, + { + "name": "maximumDays", + "baseName": "maximumDays", + "type": "number", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return RepaymentTerm.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/sELocalAccountIdentification.ts b/src/typings/capital/sELocalAccountIdentification.ts new file mode 100644 index 000000000..1918b49a8 --- /dev/null +++ b/src/typings/capital/sELocalAccountIdentification.ts @@ -0,0 +1,59 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class SELocalAccountIdentification extends BankAccountIdentification { + /** + * The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. + */ + "accountNumber": string; + /** + * The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. + */ + "clearingNumber": string; + /** + * **seLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "clearingNumber", + "baseName": "clearingNumber", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(SELocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/sGLocalAccountIdentification.ts b/src/typings/capital/sGLocalAccountIdentification.ts new file mode 100644 index 000000000..5f1d33865 --- /dev/null +++ b/src/typings/capital/sGLocalAccountIdentification.ts @@ -0,0 +1,59 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class SGLocalAccountIdentification extends BankAccountIdentification { + /** + * The 4- to 19-digit bank account number, without separators or whitespace. + */ + "accountNumber": string; + /** + * The bank\'s 8- or 11-character BIC or SWIFT code. + */ + "bic": string; + /** + * **sgLocal** + */ + "type"?: string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "bic", + "baseName": "bic", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(SGLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/status.ts b/src/typings/capital/status.ts new file mode 100644 index 000000000..5a061ad49 --- /dev/null +++ b/src/typings/capital/status.ts @@ -0,0 +1,65 @@ +/* + * 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 this class manually. + */ + +import { Action } from "./action"; + + +export class Status { + /** + * A list of actions that need to be completed to proceed with the grant. + */ + "actions"?: Array; + /** + * The code for the status of the grant. Possible values: - **Pending** - **Active** - **Repaid** - **WrittenOff** - **Failed** - **Revoked** - **Requested** - **Underwriting** - **Reviewing** - **Assessed** - **Approved** - **Rejected** - **Cancelled** + */ + "code": Status.CodeEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "actions", + "baseName": "actions", + "type": "Array", + "format": "" + }, + { + "name": "code", + "baseName": "code", + "type": "Status.CodeEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return Status.attributeTypeMap; + } + + public constructor() { + } +} + +export namespace Status { + export enum CodeEnum { + Pending = 'Pending', + Active = 'Active', + Repaid = 'Repaid', + WrittenOff = 'WrittenOff', + Failed = 'Failed', + Revoked = 'Revoked', + Requested = 'Requested', + Underwriting = 'Underwriting', + Reviewing = 'Reviewing', + Assessed = 'Assessed', + Approved = 'Approved', + Rejected = 'Rejected', + Cancelled = 'Cancelled' + } +} diff --git a/src/typings/capital/thresholdRepayment.ts b/src/typings/capital/thresholdRepayment.ts new file mode 100644 index 000000000..d2ee9a6e6 --- /dev/null +++ b/src/typings/capital/thresholdRepayment.ts @@ -0,0 +1,35 @@ +/* + * 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 this class manually. + */ + +import { Amount } from "./amount"; + + +export class ThresholdRepayment { + "amount": Amount; + + static readonly discriminator: string | undefined = undefined; + + static readonly mapping: {[index: string]: string} | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "amount", + "baseName": "amount", + "type": "Amount", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ThresholdRepayment.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/capital/uKLocalAccountIdentification.ts b/src/typings/capital/uKLocalAccountIdentification.ts new file mode 100644 index 000000000..f8c5abc36 --- /dev/null +++ b/src/typings/capital/uKLocalAccountIdentification.ts @@ -0,0 +1,59 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; + + +export class UKLocalAccountIdentification extends BankAccountIdentification { + /** + * The 8-digit bank account number, without separators or whitespace. + */ + "accountNumber": string; + /** + * The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. + */ + "sortCode": string; + /** + * **ukLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "sortCode", + "baseName": "sortCode", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(UKLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + diff --git a/src/typings/capital/uSLocalAccountIdentification.ts b/src/typings/capital/uSLocalAccountIdentification.ts new file mode 100644 index 000000000..3e8b7e170 --- /dev/null +++ b/src/typings/capital/uSLocalAccountIdentification.ts @@ -0,0 +1,69 @@ +/* + * 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 this class manually. + */ + +import { BankAccountIdentification } from "./bankAccountIdentification"; +import { USLocalBankAccountType } from "./uSLocalBankAccountType"; + + +export class USLocalAccountIdentification extends BankAccountIdentification { + /** + * The bank account number, without separators or whitespace. + */ + "accountNumber": string; + "accountType"?: USLocalBankAccountType; + /** + * The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. + */ + "routingNumber": string; + /** + * **usLocal** + */ + "type": string; + + static override readonly discriminator: string | undefined = undefined; + + static override readonly mapping: {[index: string]: string} | undefined = undefined; + + static override readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accountNumber", + "baseName": "accountNumber", + "type": "string", + "format": "" + }, + { + "name": "accountType", + "baseName": "accountType", + "type": "USLocalBankAccountType", + "format": "" + }, + { + "name": "routingNumber", + "baseName": "routingNumber", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static override getAttributeTypeMap() { + return super.getAttributeTypeMap().concat(USLocalAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} + +export namespace USLocalAccountIdentification { +} diff --git a/src/typings/capital/uSLocalBankAccountType.ts b/src/typings/capital/uSLocalBankAccountType.ts new file mode 100644 index 000000000..588e7d4d2 --- /dev/null +++ b/src/typings/capital/uSLocalBankAccountType.ts @@ -0,0 +1,13 @@ +/* + * 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 this class manually. + */ + +export enum USLocalBankAccountType { + Checking = 'checking', + Savings = 'savings' +}