diff --git a/src/services/balancePlatform/accountHoldersApi.ts b/src/services/balancePlatform/accountHoldersApi.ts index cdc3d9360..3fffc711e 100644 --- a/src/services/balancePlatform/accountHoldersApi.ts +++ b/src/services/balancePlatform/accountHoldersApi.ts @@ -20,6 +20,7 @@ import { AccountHolderInfo } from "../../typings/balancePlatform/models"; import { AccountHolderUpdateRequest } from "../../typings/balancePlatform/models"; import { GetTaxFormResponse } from "../../typings/balancePlatform/models"; import { PaginatedBalanceAccountsResponse } from "../../typings/balancePlatform/models"; +import { TaxFormSummaryResponse } from "../../typings/balancePlatform/models"; import { TransactionRulesResponse } from "../../typings/balancePlatform/models"; /** @@ -128,9 +129,9 @@ export class AccountHoldersApi extends Service { * @summary Get a tax form * @param id {@link string } The unique identifier of the account holder. * @param requestOptions {@link IRequest.Options } - * @param formType {@link 'US1099k' | 'US1099nec' } (Required) The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec** - * @param year {@link number } (Required) The tax year in YYYY format for the tax form you want to retrieve - * @param legalEntityId {@link string } The legal entity reference whose tax form you want to retrieve + * @param formType {@link 'US1099k' | 'US1099nec' } (Required) The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec**. + * @param year {@link number } (Required) The tax year in **YYYY** format for the tax form you want to retrieve. + * @param legalEntityId {@link string } The legal entity reference whose tax form you want to retrieve. * @return {@link GetTaxFormResponse } */ public async getTaxForm(id: string, formType: "US1099k" | "US1099nec", year: number, legalEntityId?: string, requestOptions?: IRequest.Options): Promise { @@ -155,6 +156,33 @@ export class AccountHoldersApi extends Service { return ObjectSerializer.deserialize(response, "GetTaxFormResponse"); } + /** + * @summary Get summary of tax forms for an account holder + * @param id {@link string } The unique identifier of the account holder. + * @param requestOptions {@link IRequest.Options } + * @param formType {@link string } (Required) The type of tax form you want a summary for. Accepted values are **US1099k** and **US1099nec**. + * @return {@link TaxFormSummaryResponse } + */ + public async getTaxFormSummary(id: string, formType: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/accountHolders/{id}/taxFormSummary` + .replace("{" + "id" + "}", encodeURIComponent(String(id))); + const resource = new Resource(this, endpoint); + + const hasDefinedQueryParams = formType; + if(hasDefinedQueryParams) { + if(!requestOptions) requestOptions = {}; + if(!requestOptions.params) requestOptions.params = {}; + if(formType) requestOptions.params["formType"] = formType; + } + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "TaxFormSummaryResponse"); + } + /** * @summary Update an account holder * @param id {@link string } The unique identifier of the account holder. diff --git a/src/services/balancePlatform/directDebitMandatesApi.ts b/src/services/balancePlatform/directDebitMandatesApi.ts new file mode 100644 index 000000000..85e4996a6 --- /dev/null +++ b/src/services/balancePlatform/directDebitMandatesApi.ts @@ -0,0 +1,122 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * 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/balancePlatform/objectSerializer"; +import { ListMandatesResponse } from "../../typings/balancePlatform/models"; +import { Mandate } from "../../typings/balancePlatform/models"; +import { PatchableMandate } from "../../typings/balancePlatform/models"; + +/** + * API handler for DirectDebitMandatesApi + */ +export class DirectDebitMandatesApi extends Service { + + private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2"; + private baseUrl: string; + + public constructor(client: Client){ + super(client); + this.baseUrl = this.createBaseUrl(this.API_BASEPATH); + } + + /** + * @summary Cancel a mandate + * @param mandateId {@link string } The unique identifier of the mandate. + * @param requestOptions {@link IRequest.Options } + * @return {@link void } + */ + public async cancelMandate(mandateId: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/mandates/{mandateId}/cancel` + .replace("{" + "mandateId" + "}", encodeURIComponent(String(mandateId))); + const resource = new Resource(this, endpoint); + + await getJsonResponse( + resource, + "", + { ...requestOptions, method: "POST" } + ); + } + + /** + * @summary Get a list of mandates + * @param requestOptions {@link IRequest.Options } + * @param balanceAccountId {@link string } The unique identifier of the balance account linked to the payment instrument. + * @param paymentInstrumentId {@link string } The unique identifier of the payment instrument linked to the mandate. + * @param cursor {@link string } The pagination cursor returned in a previous GET `/mandates` request. + * @return {@link ListMandatesResponse } + */ + public async getListOfMandates(balanceAccountId?: string, paymentInstrumentId?: string, cursor?: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/mandates`; + const resource = new Resource(this, endpoint); + + const hasDefinedQueryParams = balanceAccountId ?? paymentInstrumentId ?? cursor; + if(hasDefinedQueryParams) { + if(!requestOptions) requestOptions = {}; + if(!requestOptions.params) requestOptions.params = {}; + if(balanceAccountId) requestOptions.params["balanceAccountId"] = balanceAccountId; + if(paymentInstrumentId) requestOptions.params["paymentInstrumentId"] = paymentInstrumentId; + if(cursor) requestOptions.params["cursor"] = cursor; + } + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "ListMandatesResponse"); + } + + /** + * @summary Get a specific mandate + * @param mandateId {@link string } The unique identifier of the mandate. + * @param requestOptions {@link IRequest.Options } + * @return {@link Mandate } + */ + public async getMandateById(mandateId: string, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/mandates/{mandateId}` + .replace("{" + "mandateId" + "}", encodeURIComponent(String(mandateId))); + const resource = new Resource(this, endpoint); + + const response = await getJsonResponse( + resource, + "", + { ...requestOptions, method: "GET" } + ); + + return ObjectSerializer.deserialize(response, "Mandate"); + } + + /** + * @summary Amend a mandate + * @param mandateId {@link string } The unique identifier of the mandate. + * @param patchableMandate {@link PatchableMandate } + * @param requestOptions {@link IRequest.Options } + * @return {@link void } + */ + public async updateMandate(mandateId: string, patchableMandate: PatchableMandate, requestOptions?: IRequest.Options): Promise { + const endpoint = `${this.baseUrl}/mandates/{mandateId}` + .replace("{" + "mandateId" + "}", encodeURIComponent(String(mandateId))); + const resource = new Resource(this, endpoint); + + const request: PatchableMandate = ObjectSerializer.serialize(patchableMandate, "PatchableMandate"); + await getJsonResponse( + resource, + request, + { ...requestOptions, method: "PATCH" } + ); + } + +} diff --git a/src/services/balancePlatform/index.ts b/src/services/balancePlatform/index.ts index 0db1994f1..1b3105f51 100644 --- a/src/services/balancePlatform/index.ts +++ b/src/services/balancePlatform/index.ts @@ -13,6 +13,7 @@ import { BalanceAccountsApi } from "./balanceAccountsApi"; import { BalancesApi } from "./balancesApi"; import { BankAccountValidationApi } from "./bankAccountValidationApi"; import { CardOrdersApi } from "./cardOrdersApi"; +import { DirectDebitMandatesApi } from "./directDebitMandatesApi"; import { GrantAccountsApi } from "./grantAccountsApi"; import { GrantOffersApi } from "./grantOffersApi"; import { ManageCardPINApi } from "./manageCardPINApi"; @@ -61,6 +62,10 @@ export default class BalancePlatformAPI extends Service { return new CardOrdersApi(this.client); } + public get DirectDebitMandatesApi() { + return new DirectDebitMandatesApi(this.client); + } + public get GrantAccountsApi() { return new GrantAccountsApi(this.client); } diff --git a/src/typings/balancePlatform/invalidField.ts b/src/typings/balancePlatform/invalidField.ts index e8c6b3624..4e75960d1 100644 --- a/src/typings/balancePlatform/invalidField.ts +++ b/src/typings/balancePlatform/invalidField.ts @@ -9,6 +9,10 @@ export class InvalidField { + /** + * Description of the validation error. + */ + "message": string; /** * The field that has an invalid value. */ @@ -17,10 +21,6 @@ export class InvalidField { * The invalid value. */ "value": string; - /** - * Description of the validation error. - */ - "message": string; static readonly discriminator: string | undefined = undefined; @@ -28,20 +28,20 @@ export class InvalidField { static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "name", - "baseName": "name", + "name": "message", + "baseName": "message", "type": "string", "format": "" }, { - "name": "value", - "baseName": "value", + "name": "name", + "baseName": "name", "type": "string", "format": "" }, { - "name": "message", - "baseName": "message", + "name": "value", + "baseName": "value", "type": "string", "format": "" } ]; diff --git a/src/typings/balancePlatform/listMandatesResponse.ts b/src/typings/balancePlatform/listMandatesResponse.ts new file mode 100644 index 000000000..a45596d9a --- /dev/null +++ b/src/typings/balancePlatform/listMandatesResponse.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Link } from "./link"; +import { Mandate } from "./mandate"; + + +export class ListMandatesResponse { + "link": Link; + /** + * Contains a list of the mandates. + */ + "mandates": 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": "link", + "baseName": "link", + "type": "Link", + "format": "" + }, + { + "name": "mandates", + "baseName": "mandates", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ListMandatesResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/balancePlatform/mandate.ts b/src/typings/balancePlatform/mandate.ts new file mode 100644 index 000000000..65cf8ec72 --- /dev/null +++ b/src/typings/balancePlatform/mandate.ts @@ -0,0 +1,103 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { MandateBankAccount } from "./mandateBankAccount"; +import { MandateStatus } from "./mandateStatus"; +import { MandateType } from "./mandateType"; + + +export class Mandate { + /** + * The unique identifier of the balance account linked to the payment instrument. + */ + "balanceAccountId"?: string; + "counterparty"?: MandateBankAccount | null; + /** + * The date when the mandate was created. + */ + "createdAt"?: Date; + /** + * The unique identifier of the mandate. + */ + "id"?: string; + /** + * The unique identifier of the payment instrument linked to the mandate. + */ + "paymentInstrumentId"?: string; + "status"?: MandateStatus; + "type"?: MandateType; + /** + * The date when the mandate was updated. + */ + "updatedAt"?: 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": "balanceAccountId", + "baseName": "balanceAccountId", + "type": "string", + "format": "" + }, + { + "name": "counterparty", + "baseName": "counterparty", + "type": "MandateBankAccount | null", + "format": "" + }, + { + "name": "createdAt", + "baseName": "createdAt", + "type": "Date", + "format": "date-time" + }, + { + "name": "id", + "baseName": "id", + "type": "string", + "format": "" + }, + { + "name": "paymentInstrumentId", + "baseName": "paymentInstrumentId", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "MandateStatus", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "MandateType", + "format": "" + }, + { + "name": "updatedAt", + "baseName": "updatedAt", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return Mandate.attributeTypeMap; + } + + public constructor() { + } +} + +export namespace Mandate { +} diff --git a/src/typings/balancePlatform/mandateAccountIdentification.ts b/src/typings/balancePlatform/mandateAccountIdentification.ts new file mode 100644 index 000000000..aabd2f532 --- /dev/null +++ b/src/typings/balancePlatform/mandateAccountIdentification.ts @@ -0,0 +1,36 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * 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 MandateAccountIdentification { + "type": string; + + static readonly discriminator: string | undefined = "type"; + + static readonly mapping: {[index: string]: string} | undefined = { + "ukLocal": "UKLocalMandateAccountIdentification", + }; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MandateAccountIdentification.attributeTypeMap; + } + + public constructor() { + //this.type = "MandateAccountIdentification"; + } +} + diff --git a/src/typings/balancePlatform/mandateBankAccount.ts b/src/typings/balancePlatform/mandateBankAccount.ts new file mode 100644 index 000000000..c89e3e149 --- /dev/null +++ b/src/typings/balancePlatform/mandateBankAccount.ts @@ -0,0 +1,43 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { MandateAccountIdentification } from "./mandateAccountIdentification"; +import { MandatePartyIdentification } from "./mandatePartyIdentification"; + + +export class MandateBankAccount { + "accountHolder": MandatePartyIdentification; + "accountIdentification": MandateAccountIdentification; + + 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": "accountHolder", + "baseName": "accountHolder", + "type": "MandatePartyIdentification", + "format": "" + }, + { + "name": "accountIdentification", + "baseName": "accountIdentification", + "type": "MandateAccountIdentification", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MandateBankAccount.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/balancePlatform/mandatePartyIdentification.ts b/src/typings/balancePlatform/mandatePartyIdentification.ts new file mode 100644 index 000000000..7e3857a76 --- /dev/null +++ b/src/typings/balancePlatform/mandatePartyIdentification.ts @@ -0,0 +1,36 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * 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 MandatePartyIdentification { + /** + * The full name of the entity that owns the bank account. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" \' and space. + */ + "fullName"?: 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": "fullName", + "baseName": "fullName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return MandatePartyIdentification.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/balancePlatform/mandateStatus.ts b/src/typings/balancePlatform/mandateStatus.ts new file mode 100644 index 000000000..7222cb6f8 --- /dev/null +++ b/src/typings/balancePlatform/mandateStatus.ts @@ -0,0 +1,14 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * 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 MandateStatus { + Pending = 'pending', + Approved = 'approved', + Cancelled = 'cancelled' +} diff --git a/src/typings/balancePlatform/mandateType.ts b/src/typings/balancePlatform/mandateType.ts new file mode 100644 index 000000000..6714ed941 --- /dev/null +++ b/src/typings/balancePlatform/mandateType.ts @@ -0,0 +1,12 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * 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 MandateType { + Bacs = 'bacs' +} diff --git a/src/typings/balancePlatform/models.ts b/src/typings/balancePlatform/models.ts index 795bb64db..e8cb453a5 100644 --- a/src/typings/balancePlatform/models.ts +++ b/src/typings/balancePlatform/models.ts @@ -101,7 +101,14 @@ export * from "./invalidField" export * from "./limitStatus" export * from "./link" export * from "./listAssociationsResponse" +export * from "./listMandatesResponse" export * from "./listNetworkTokensResponse" +export * from "./mandate" +export * from "./mandateAccountIdentification" +export * from "./mandateBankAccount" +export * from "./mandatePartyIdentification" +export * from "./mandateStatus" +export * from "./mandateType" export * from "./matchingTransactionsRestriction" export * from "./matchingValuesRestriction" export * from "./mccsRestriction" @@ -122,6 +129,7 @@ export * from "./paginatedBalanceAccountsResponse" export * from "./paginatedGetCardOrderItemResponse" export * from "./paginatedGetCardOrderResponse" export * from "./paginatedPaymentInstrumentsResponse" +export * from "./patchableMandate" export * from "./paymentInstrument" export * from "./paymentInstrumentAdditionalBankAccountIdentificationsInner" export * from "./paymentInstrumentGroup" @@ -170,11 +178,13 @@ export * from "./sourceAccountTypesRestriction" export * from "./stringMatch" export * from "./submitScaAssociationRequest" export * from "./submitScaAssociationResponse" +export * from "./summary" export * from "./sweepConfigurationV2" export * from "./sweepCounterparty" export * from "./sweepSchedule" export * from "./target" export * from "./targetUpdate" +export * from "./taxFormSummaryResponse" export * from "./thresholdRepayment" export * from "./timeOfDay" export * from "./timeOfDayRestriction" @@ -195,6 +205,7 @@ export * from "./transferRouteRequirementsInner" export * from "./transferRouteResponse" export * from "./transferType" export * from "./uKLocalAccountIdentification" +export * from "./uKLocalMandateAccountIdentification" export * from "./uSInstantPayoutAddressRequirement" export * from "./uSInternationalAchAddressRequirement" export * from "./uSInternationalAchPriorityRequirement" diff --git a/src/typings/balancePlatform/objectSerializer.ts b/src/typings/balancePlatform/objectSerializer.ts index c3bbf1041..99316f3cd 100644 --- a/src/typings/balancePlatform/objectSerializer.ts +++ b/src/typings/balancePlatform/objectSerializer.ts @@ -103,7 +103,14 @@ import { InvalidField } from "./invalidField"; import { LimitStatus } from "./limitStatus"; import { Link } from "./link"; import { ListAssociationsResponse } from "./listAssociationsResponse"; +import { ListMandatesResponse } from "./listMandatesResponse"; import { ListNetworkTokensResponse } from "./listNetworkTokensResponse"; +import { Mandate } from "./mandate"; +import { MandateAccountIdentification } from "./mandateAccountIdentification"; +import { MandateBankAccount } from "./mandateBankAccount"; +import { MandatePartyIdentification } from "./mandatePartyIdentification"; +import { MandateStatus } from "./mandateStatus"; +import { MandateType } from "./mandateType"; import { MatchingTransactionsRestriction } from "./matchingTransactionsRestriction"; import { MatchingValuesRestriction } from "./matchingValuesRestriction"; import { MccsRestriction } from "./mccsRestriction"; @@ -124,6 +131,7 @@ import { PaginatedBalanceAccountsResponse } from "./paginatedBalanceAccountsResp import { PaginatedGetCardOrderItemResponse } from "./paginatedGetCardOrderItemResponse"; import { PaginatedGetCardOrderResponse } from "./paginatedGetCardOrderResponse"; import { PaginatedPaymentInstrumentsResponse } from "./paginatedPaymentInstrumentsResponse"; +import { PatchableMandate } from "./patchableMandate"; import { PaymentInstrument } from "./paymentInstrument"; import { PaymentInstrumentAdditionalBankAccountIdentificationsInnerClass } from "./paymentInstrumentAdditionalBankAccountIdentificationsInner"; import { PaymentInstrumentGroup } from "./paymentInstrumentGroup"; @@ -172,11 +180,13 @@ import { SourceAccountTypesRestriction } from "./sourceAccountTypesRestriction"; import { StringMatch } from "./stringMatch"; import { SubmitScaAssociationRequest } from "./submitScaAssociationRequest"; import { SubmitScaAssociationResponse } from "./submitScaAssociationResponse"; +import { Summary } from "./summary"; import { SweepConfigurationV2 } from "./sweepConfigurationV2"; import { SweepCounterparty } from "./sweepCounterparty"; import { SweepSchedule } from "./sweepSchedule"; import { Target } from "./target"; import { TargetUpdate } from "./targetUpdate"; +import { TaxFormSummaryResponse } from "./taxFormSummaryResponse"; import { ThresholdRepayment } from "./thresholdRepayment"; import { TimeOfDay } from "./timeOfDay"; import { TimeOfDayRestriction } from "./timeOfDayRestriction"; @@ -197,6 +207,7 @@ import { TransferRouteRequirementsInnerClass } from "./transferRouteRequirements import { TransferRouteResponse } from "./transferRouteResponse"; import { TransferType } from "./transferType"; import { UKLocalAccountIdentification } from "./uKLocalAccountIdentification"; +import { UKLocalMandateAccountIdentification } from "./uKLocalMandateAccountIdentification"; import { USInstantPayoutAddressRequirement } from "./uSInstantPayoutAddressRequirement"; import { USInternationalAchAddressRequirement } from "./uSInternationalAchAddressRequirement"; import { USInternationalAchPriorityRequirement } from "./uSInternationalAchPriorityRequirement"; @@ -297,6 +308,10 @@ let enumsMap: Set = new Set([ LimitStatus.Inactive, LimitStatus.PendingSca, LimitStatus.Scheduled, + MandateStatus.Pending, + MandateStatus.Approved, + MandateStatus.Cancelled, + MandateType.Bacs, "MatchingValuesRestriction.ValueEnum", "NOLocalAccountIdentification.TypeEnum", "NZLocalAccountIdentification.TypeEnum", @@ -347,10 +362,12 @@ let enumsMap: Set = new Set([ "Target.TypeEnum", "TargetUpdate.TypeEnum", "TransactionRule.OutcomeTypeEnum", + "TransactionRule.PurposeEnum", "TransactionRule.RequestTypeEnum", "TransactionRule.StatusEnum", "TransactionRule.TypeEnum", "TransactionRuleInfo.OutcomeTypeEnum", + "TransactionRuleInfo.PurposeEnum", "TransactionRuleInfo.RequestTypeEnum", "TransactionRuleInfo.StatusEnum", "TransactionRuleInfo.TypeEnum", @@ -492,7 +509,12 @@ let typeMap: {[index: string]: any} = { "InvalidField": InvalidField, "Link": Link, "ListAssociationsResponse": ListAssociationsResponse, + "ListMandatesResponse": ListMandatesResponse, "ListNetworkTokensResponse": ListNetworkTokensResponse, + "Mandate": Mandate, + "MandateAccountIdentification": MandateAccountIdentification, + "MandateBankAccount": MandateBankAccount, + "MandatePartyIdentification": MandatePartyIdentification, "MatchingTransactionsRestriction": MatchingTransactionsRestriction, "MatchingValuesRestriction": MatchingValuesRestriction, "MccsRestriction": MccsRestriction, @@ -513,6 +535,7 @@ let typeMap: {[index: string]: any} = { "PaginatedGetCardOrderItemResponse": PaginatedGetCardOrderItemResponse, "PaginatedGetCardOrderResponse": PaginatedGetCardOrderResponse, "PaginatedPaymentInstrumentsResponse": PaginatedPaymentInstrumentsResponse, + "PatchableMandate": PatchableMandate, "PaymentInstrument": PaymentInstrument, "PaymentInstrumentAdditionalBankAccountIdentificationsInner": PaymentInstrumentAdditionalBankAccountIdentificationsInnerClass, "PaymentInstrumentGroup": PaymentInstrumentGroup, @@ -555,11 +578,13 @@ let typeMap: {[index: string]: any} = { "StringMatch": StringMatch, "SubmitScaAssociationRequest": SubmitScaAssociationRequest, "SubmitScaAssociationResponse": SubmitScaAssociationResponse, + "Summary": Summary, "SweepConfigurationV2": SweepConfigurationV2, "SweepCounterparty": SweepCounterparty, "SweepSchedule": SweepSchedule, "Target": Target, "TargetUpdate": TargetUpdate, + "TaxFormSummaryResponse": TaxFormSummaryResponse, "ThresholdRepayment": ThresholdRepayment, "TimeOfDay": TimeOfDay, "TimeOfDayRestriction": TimeOfDayRestriction, @@ -579,6 +604,7 @@ let typeMap: {[index: string]: any} = { "TransferRouteRequirementsInner": TransferRouteRequirementsInnerClass, "TransferRouteResponse": TransferRouteResponse, "UKLocalAccountIdentification": UKLocalAccountIdentification, + "UKLocalMandateAccountIdentification": UKLocalMandateAccountIdentification, "USInstantPayoutAddressRequirement": USInstantPayoutAddressRequirement, "USInternationalAchAddressRequirement": USInternationalAchAddressRequirement, "USInternationalAchPriorityRequirement": USInternationalAchPriorityRequirement, diff --git a/src/typings/balancePlatform/patchableMandate.ts b/src/typings/balancePlatform/patchableMandate.ts new file mode 100644 index 000000000..b0041c132 --- /dev/null +++ b/src/typings/balancePlatform/patchableMandate.ts @@ -0,0 +1,36 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * 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 PatchableMandate { + /** + * The unique identifier of the payment instrument linked to the mandate. + */ + "paymentInstrumentId"?: any | 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": "paymentInstrumentId", + "baseName": "paymentInstrumentId", + "type": "any | null", + "format": "" + } ]; + + static getAttributeTypeMap() { + return PatchableMandate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/balancePlatform/platformPaymentConfiguration.ts b/src/typings/balancePlatform/platformPaymentConfiguration.ts index 87cd7da11..9cd90c3ad 100644 --- a/src/typings/balancePlatform/platformPaymentConfiguration.ts +++ b/src/typings/balancePlatform/platformPaymentConfiguration.ts @@ -14,7 +14,7 @@ export class PlatformPaymentConfiguration { */ "salesDayClosingTime"?: string; /** - * Specifies after how many business days the funds in a settlement batch are made available in this balance account. Possible values: **1** to **20**, or **null**. Default value: **null**. + * Specifies after how many business days the funds in a settlement batch are made available in this balance account. Requires Custom Sales Day Payout to be enabled for your balance account. Contact your account manager or implementation manager to enable this. Possible values: **1** to **20**, or **null**. Default value: **null**. */ "settlementDelayDays"?: number; diff --git a/src/typings/balancePlatform/summary.ts b/src/typings/balancePlatform/summary.ts new file mode 100644 index 000000000..6b00f4475 --- /dev/null +++ b/src/typings/balancePlatform/summary.ts @@ -0,0 +1,46 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * 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 Summary { + /** + * The unique identifier of the legal entity. + */ + "legalEntityId": string; + /** + * The tax years for which the legal entity has a tax form. + */ + "taxYears": 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": "legalEntityId", + "baseName": "legalEntityId", + "type": "string", + "format": "" + }, + { + "name": "taxYears", + "baseName": "taxYears", + "type": "Array", + "format": "int32" + } ]; + + static getAttributeTypeMap() { + return Summary.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/balancePlatform/taxFormSummaryResponse.ts b/src/typings/balancePlatform/taxFormSummaryResponse.ts new file mode 100644 index 000000000..2479c6b5d --- /dev/null +++ b/src/typings/balancePlatform/taxFormSummaryResponse.ts @@ -0,0 +1,38 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { Summary } from "./summary"; + + +export class TaxFormSummaryResponse { + /** + * A list of tax form summaries, where each summary consists of the legal entity and the tax years in which the legal entity has a tax form. + */ + "data": 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": "data", + "baseName": "data", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return TaxFormSummaryResponse.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/src/typings/balancePlatform/transactionRule.ts b/src/typings/balancePlatform/transactionRule.ts index c6c28d7ea..d187a78e0 100644 --- a/src/typings/balancePlatform/transactionRule.ts +++ b/src/typings/balancePlatform/transactionRule.ts @@ -36,6 +36,10 @@ export class TransactionRule { */ "outcomeType"?: TransactionRule.OutcomeTypeEnum; /** + * Specifies the reason for creating the rule. Possible values: * **fraud**: the rule is created to regulate fraudulent activity. * **policy**: the rule is created to ensure that the transaction adheres to your business\' policies. For example, if your business has policies about the Merchant Category Codes (MCCs) allowed on a transaction, you can create a rule to block transactions that have specific MCCs. + */ + "purpose"?: TransactionRule.PurposeEnum; + /** * Your reference for the transaction rule. */ "reference": string; @@ -108,6 +112,12 @@ export class TransactionRule { "type": "TransactionRule.OutcomeTypeEnum", "format": "" }, + { + "name": "purpose", + "baseName": "purpose", + "type": "TransactionRule.PurposeEnum", + "format": "" + }, { "name": "reference", "baseName": "reference", @@ -166,6 +176,13 @@ export namespace TransactionRule { ScoreBased = 'scoreBased', TimedBlock = 'timedBlock' } + export enum PurposeEnum { + Compliance = 'compliance', + Fraud = 'fraud', + InternalPolicy = 'internalPolicy', + Policy = 'policy', + System = 'system' + } export enum RequestTypeEnum { Authentication = 'authentication', Authorization = 'authorization', diff --git a/src/typings/balancePlatform/transactionRuleInfo.ts b/src/typings/balancePlatform/transactionRuleInfo.ts index f26e914f5..960ed7265 100644 --- a/src/typings/balancePlatform/transactionRuleInfo.ts +++ b/src/typings/balancePlatform/transactionRuleInfo.ts @@ -32,6 +32,10 @@ export class TransactionRuleInfo { */ "outcomeType"?: TransactionRuleInfo.OutcomeTypeEnum; /** + * Specifies the reason for creating the rule. Possible values: * **fraud**: the rule is created to regulate fraudulent activity. * **policy**: the rule is created to ensure that the transaction adheres to your business\' policies. For example, if your business has policies about the Merchant Category Codes (MCCs) allowed on a transaction, you can create a rule to block transactions that have specific MCCs. + */ + "purpose"?: TransactionRuleInfo.PurposeEnum; + /** * Your reference for the transaction rule. */ "reference": string; @@ -98,6 +102,12 @@ export class TransactionRuleInfo { "type": "TransactionRuleInfo.OutcomeTypeEnum", "format": "" }, + { + "name": "purpose", + "baseName": "purpose", + "type": "TransactionRuleInfo.PurposeEnum", + "format": "" + }, { "name": "reference", "baseName": "reference", @@ -156,6 +166,13 @@ export namespace TransactionRuleInfo { ScoreBased = 'scoreBased', TimedBlock = 'timedBlock' } + export enum PurposeEnum { + Compliance = 'compliance', + Fraud = 'fraud', + InternalPolicy = 'internalPolicy', + Policy = 'policy', + System = 'system' + } export enum RequestTypeEnum { Authentication = 'authentication', Authorization = 'authorization', diff --git a/src/typings/balancePlatform/uKLocalMandateAccountIdentification.ts b/src/typings/balancePlatform/uKLocalMandateAccountIdentification.ts new file mode 100644 index 000000000..151453abb --- /dev/null +++ b/src/typings/balancePlatform/uKLocalMandateAccountIdentification.ts @@ -0,0 +1,59 @@ +/* + * The version of the OpenAPI document: v2 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit this class manually. + */ + +import { MandateAccountIdentification } from "./mandateAccountIdentification"; + + +export class UKLocalMandateAccountIdentification extends MandateAccountIdentification { + /** + * 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(UKLocalMandateAccountIdentification.attributeTypeMap); + } + + public constructor() { + super(); + } +} +