Skip to content

Commit 7cdc56d

Browse files
[balanceplatform] Automated update from Adyen/adyen-openapi@aa5556e
1 parent e0c07e0 commit 7cdc56d

21 files changed

+717
-14
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"service": "balanceplatform",
3+
"project": "node",
4+
"generatedAt": "2026-04-10T08:25:01Z",
5+
"openapiCommitSha": "aa5556ef9586980ba6c319d0750fb38d7bbda09b",
6+
"automationCommitSha": "855b6c5526cb5fae757e921687c38df66d31dc4b",
7+
"libraryCommitSha": "e0c07e05d8c98b20f336ef0fa714fe95f4172c2f"
8+
}

src/services/balancePlatform/accountHoldersApi.ts

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { AccountHolderInfo } from "../../typings/balancePlatform/models";
2020
import { AccountHolderUpdateRequest } from "../../typings/balancePlatform/models";
2121
import { GetTaxFormResponse } from "../../typings/balancePlatform/models";
2222
import { PaginatedBalanceAccountsResponse } from "../../typings/balancePlatform/models";
23+
import { TaxFormSummaryResponse } from "../../typings/balancePlatform/models";
2324
import { TransactionRulesResponse } from "../../typings/balancePlatform/models";
2425

2526
/**
@@ -128,9 +129,9 @@ export class AccountHoldersApi extends Service {
128129
* @summary Get a tax form
129130
* @param id {@link string } The unique identifier of the account holder.
130131
* @param requestOptions {@link IRequest.Options }
131-
* @param formType {@link 'US1099k' | 'US1099nec' } (Required) The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec**
132-
* @param year {@link number } (Required) The tax year in YYYY format for the tax form you want to retrieve
133-
* @param legalEntityId {@link string } The legal entity reference whose tax form you want to retrieve
132+
* @param formType {@link 'US1099k' | 'US1099nec' } (Required) The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec**.
133+
* @param year {@link number } (Required) The tax year in **YYYY** format for the tax form you want to retrieve.
134+
* @param legalEntityId {@link string } The legal entity reference whose tax form you want to retrieve.
134135
* @return {@link GetTaxFormResponse }
135136
*/
136137
public async getTaxForm(id: string, formType: "US1099k" | "US1099nec", year: number, legalEntityId?: string, requestOptions?: IRequest.Options): Promise<GetTaxFormResponse> {
@@ -155,6 +156,33 @@ export class AccountHoldersApi extends Service {
155156
return ObjectSerializer.deserialize(response, "GetTaxFormResponse");
156157
}
157158

159+
/**
160+
* @summary Get summary of tax forms for an account holder
161+
* @param id {@link string } The unique identifier of the account holder.
162+
* @param requestOptions {@link IRequest.Options }
163+
* @param formType {@link string } (Required) The type of tax form you want a summary for. Accepted values are **US1099k** and **US1099nec**.
164+
* @return {@link TaxFormSummaryResponse }
165+
*/
166+
public async getTaxFormSummary(id: string, formType: string, requestOptions?: IRequest.Options): Promise<TaxFormSummaryResponse> {
167+
const endpoint = `${this.baseUrl}/accountHolders/{id}/taxFormSummary`
168+
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
169+
const resource = new Resource(this, endpoint);
170+
171+
const hasDefinedQueryParams = formType;
172+
if(hasDefinedQueryParams) {
173+
if(!requestOptions) requestOptions = {};
174+
if(!requestOptions.params) requestOptions.params = {};
175+
if(formType) requestOptions.params["formType"] = formType;
176+
}
177+
const response = await getJsonResponse<string, TaxFormSummaryResponse>(
178+
resource,
179+
"",
180+
{ ...requestOptions, method: "GET" }
181+
);
182+
183+
return ObjectSerializer.deserialize(response, "TaxFormSummaryResponse");
184+
}
185+
158186
/**
159187
* @summary Update an account holder
160188
* @param id {@link string } The unique identifier of the account holder.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/*
2+
* The version of the OpenAPI document: v2
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
11+
import getJsonResponse from "../../helpers/getJsonResponse";
12+
import Service from "../../service";
13+
import Client from "../../client";
14+
import { IRequest } from "../../typings/requestOptions";
15+
import Resource from "../resource";
16+
17+
import { ObjectSerializer } from "../../typings/balancePlatform/objectSerializer";
18+
import { ListMandatesResponse } from "../../typings/balancePlatform/models";
19+
import { Mandate } from "../../typings/balancePlatform/models";
20+
import { PatchableMandate } from "../../typings/balancePlatform/models";
21+
22+
/**
23+
* API handler for DirectDebitMandatesApi
24+
*/
25+
export class DirectDebitMandatesApi extends Service {
26+
27+
private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2";
28+
private baseUrl: string;
29+
30+
public constructor(client: Client){
31+
super(client);
32+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
33+
}
34+
35+
/**
36+
* @summary Cancel a mandate
37+
* @param mandateId {@link string } The unique identifier of the mandate.
38+
* @param requestOptions {@link IRequest.Options }
39+
* @return {@link void }
40+
*/
41+
public async cancelMandate(mandateId: string, requestOptions?: IRequest.Options): Promise<void> {
42+
const endpoint = `${this.baseUrl}/mandates/{mandateId}/cancel`
43+
.replace("{" + "mandateId" + "}", encodeURIComponent(String(mandateId)));
44+
const resource = new Resource(this, endpoint);
45+
46+
await getJsonResponse<string, void>(
47+
resource,
48+
"",
49+
{ ...requestOptions, method: "POST" }
50+
);
51+
}
52+
53+
/**
54+
* @summary Get a list of mandates
55+
* @param requestOptions {@link IRequest.Options }
56+
* @param balanceAccountId {@link string } The unique identifier of the balance account linked to the payment instrument.
57+
* @param paymentInstrumentId {@link string } The unique identifier of the payment instrument linked to the mandate.
58+
* @param cursor {@link string } The pagination cursor returned in a previous GET &#x60;/mandates&#x60; request.
59+
* @return {@link ListMandatesResponse }
60+
*/
61+
public async getListOfMandates(balanceAccountId?: string, paymentInstrumentId?: string, cursor?: string, requestOptions?: IRequest.Options): Promise<ListMandatesResponse> {
62+
const endpoint = `${this.baseUrl}/mandates`;
63+
const resource = new Resource(this, endpoint);
64+
65+
const hasDefinedQueryParams = balanceAccountId ?? paymentInstrumentId ?? cursor;
66+
if(hasDefinedQueryParams) {
67+
if(!requestOptions) requestOptions = {};
68+
if(!requestOptions.params) requestOptions.params = {};
69+
if(balanceAccountId) requestOptions.params["balanceAccountId"] = balanceAccountId;
70+
if(paymentInstrumentId) requestOptions.params["paymentInstrumentId"] = paymentInstrumentId;
71+
if(cursor) requestOptions.params["cursor"] = cursor;
72+
}
73+
const response = await getJsonResponse<string, ListMandatesResponse>(
74+
resource,
75+
"",
76+
{ ...requestOptions, method: "GET" }
77+
);
78+
79+
return ObjectSerializer.deserialize(response, "ListMandatesResponse");
80+
}
81+
82+
/**
83+
* @summary Get a specific mandate
84+
* @param mandateId {@link string } The unique identifier of the mandate.
85+
* @param requestOptions {@link IRequest.Options }
86+
* @return {@link Mandate }
87+
*/
88+
public async getMandateById(mandateId: string, requestOptions?: IRequest.Options): Promise<Mandate> {
89+
const endpoint = `${this.baseUrl}/mandates/{mandateId}`
90+
.replace("{" + "mandateId" + "}", encodeURIComponent(String(mandateId)));
91+
const resource = new Resource(this, endpoint);
92+
93+
const response = await getJsonResponse<string, Mandate>(
94+
resource,
95+
"",
96+
{ ...requestOptions, method: "GET" }
97+
);
98+
99+
return ObjectSerializer.deserialize(response, "Mandate");
100+
}
101+
102+
/**
103+
* @summary Amend a mandate
104+
* @param mandateId {@link string } The unique identifier of the mandate.
105+
* @param patchableMandate {@link PatchableMandate }
106+
* @param requestOptions {@link IRequest.Options }
107+
* @return {@link void }
108+
*/
109+
public async updateMandate(mandateId: string, patchableMandate: PatchableMandate, requestOptions?: IRequest.Options): Promise<void> {
110+
const endpoint = `${this.baseUrl}/mandates/{mandateId}`
111+
.replace("{" + "mandateId" + "}", encodeURIComponent(String(mandateId)));
112+
const resource = new Resource(this, endpoint);
113+
114+
const request: PatchableMandate = ObjectSerializer.serialize(patchableMandate, "PatchableMandate");
115+
await getJsonResponse<PatchableMandate, void>(
116+
resource,
117+
request,
118+
{ ...requestOptions, method: "PATCH" }
119+
);
120+
}
121+
122+
}

src/services/balancePlatform/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { BalanceAccountsApi } from "./balanceAccountsApi";
1313
import { BalancesApi } from "./balancesApi";
1414
import { BankAccountValidationApi } from "./bankAccountValidationApi";
1515
import { CardOrdersApi } from "./cardOrdersApi";
16+
import { DirectDebitMandatesApi } from "./directDebitMandatesApi";
1617
import { GrantAccountsApi } from "./grantAccountsApi";
1718
import { GrantOffersApi } from "./grantOffersApi";
1819
import { ManageCardPINApi } from "./manageCardPINApi";
@@ -61,6 +62,10 @@ export default class BalancePlatformAPI extends Service {
6162
return new CardOrdersApi(this.client);
6263
}
6364

65+
public get DirectDebitMandatesApi() {
66+
return new DirectDebitMandatesApi(this.client);
67+
}
68+
6469
public get GrantAccountsApi() {
6570
return new GrantAccountsApi(this.client);
6671
}

src/typings/balancePlatform/invalidField.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010

1111
export class InvalidField {
12+
/**
13+
* Description of the validation error.
14+
*/
15+
"message": string;
1216
/**
1317
* The field that has an invalid value.
1418
*/
@@ -17,31 +21,27 @@ export class InvalidField {
1721
* The invalid value.
1822
*/
1923
"value": string;
20-
/**
21-
* Description of the validation error.
22-
*/
23-
"message": string;
2424

2525
static readonly discriminator: string | undefined = undefined;
2626

2727
static readonly mapping: {[index: string]: string} | undefined = undefined;
2828

2929
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
3030
{
31-
"name": "name",
32-
"baseName": "name",
31+
"name": "message",
32+
"baseName": "message",
3333
"type": "string",
3434
"format": ""
3535
},
3636
{
37-
"name": "value",
38-
"baseName": "value",
37+
"name": "name",
38+
"baseName": "name",
3939
"type": "string",
4040
"format": ""
4141
},
4242
{
43-
"name": "message",
44-
"baseName": "message",
43+
"name": "value",
44+
"baseName": "value",
4545
"type": "string",
4646
"format": ""
4747
} ];
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* The version of the OpenAPI document: v2
3+
*
4+
*
5+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6+
* https://openapi-generator.tech
7+
* Do not edit this class manually.
8+
*/
9+
10+
import { Link } from "./link";
11+
import { Mandate } from "./mandate";
12+
13+
14+
export class ListMandatesResponse {
15+
"link": Link;
16+
/**
17+
* Contains a list of the mandates.
18+
*/
19+
"mandates": Array<Mandate>;
20+
21+
static readonly discriminator: string | undefined = undefined;
22+
23+
static readonly mapping: {[index: string]: string} | undefined = undefined;
24+
25+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
26+
{
27+
"name": "link",
28+
"baseName": "link",
29+
"type": "Link",
30+
"format": ""
31+
},
32+
{
33+
"name": "mandates",
34+
"baseName": "mandates",
35+
"type": "Array<Mandate>",
36+
"format": ""
37+
} ];
38+
39+
static getAttributeTypeMap() {
40+
return ListMandatesResponse.attributeTypeMap;
41+
}
42+
43+
public constructor() {
44+
}
45+
}
46+

0 commit comments

Comments
 (0)