Skip to content

Commit d9ecda1

Browse files
[balanceplatform] Automated update from Adyen/adyen-openapi@d667e61
1 parent f80ccb5 commit d9ecda1

File tree

5 files changed

+121
-3
lines changed

5 files changed

+121
-3
lines changed

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.

src/typings/balancePlatform/models.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,13 @@ export * from "./sourceAccountTypesRestriction"
170170
export * from "./stringMatch"
171171
export * from "./submitScaAssociationRequest"
172172
export * from "./submitScaAssociationResponse"
173+
export * from "./summary"
173174
export * from "./sweepConfigurationV2"
174175
export * from "./sweepCounterparty"
175176
export * from "./sweepSchedule"
176177
export * from "./target"
177178
export * from "./targetUpdate"
179+
export * from "./taxFormSummaryResponse"
178180
export * from "./thresholdRepayment"
179181
export * from "./timeOfDay"
180182
export * from "./timeOfDayRestriction"

src/typings/balancePlatform/objectSerializer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,13 @@ import { SourceAccountTypesRestriction } from "./sourceAccountTypesRestriction";
172172
import { StringMatch } from "./stringMatch";
173173
import { SubmitScaAssociationRequest } from "./submitScaAssociationRequest";
174174
import { SubmitScaAssociationResponse } from "./submitScaAssociationResponse";
175+
import { Summary } from "./summary";
175176
import { SweepConfigurationV2 } from "./sweepConfigurationV2";
176177
import { SweepCounterparty } from "./sweepCounterparty";
177178
import { SweepSchedule } from "./sweepSchedule";
178179
import { Target } from "./target";
179180
import { TargetUpdate } from "./targetUpdate";
181+
import { TaxFormSummaryResponse } from "./taxFormSummaryResponse";
180182
import { ThresholdRepayment } from "./thresholdRepayment";
181183
import { TimeOfDay } from "./timeOfDay";
182184
import { TimeOfDayRestriction } from "./timeOfDayRestriction";
@@ -555,11 +557,13 @@ let typeMap: {[index: string]: any} = {
555557
"StringMatch": StringMatch,
556558
"SubmitScaAssociationRequest": SubmitScaAssociationRequest,
557559
"SubmitScaAssociationResponse": SubmitScaAssociationResponse,
560+
"Summary": Summary,
558561
"SweepConfigurationV2": SweepConfigurationV2,
559562
"SweepCounterparty": SweepCounterparty,
560563
"SweepSchedule": SweepSchedule,
561564
"Target": Target,
562565
"TargetUpdate": TargetUpdate,
566+
"TaxFormSummaryResponse": TaxFormSummaryResponse,
563567
"ThresholdRepayment": ThresholdRepayment,
564568
"TimeOfDay": TimeOfDay,
565569
"TimeOfDayRestriction": TimeOfDayRestriction,
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+
11+
export class Summary {
12+
/**
13+
* The unique identifier of the legal entity.
14+
*/
15+
"legalEntityId": string;
16+
/**
17+
* The tax years for which the legal entity has a tax form.
18+
*/
19+
"taxYears": Array<number>;
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": "legalEntityId",
28+
"baseName": "legalEntityId",
29+
"type": "string",
30+
"format": ""
31+
},
32+
{
33+
"name": "taxYears",
34+
"baseName": "taxYears",
35+
"type": "Array<number>",
36+
"format": "int32"
37+
} ];
38+
39+
static getAttributeTypeMap() {
40+
return Summary.attributeTypeMap;
41+
}
42+
43+
public constructor() {
44+
}
45+
}
46+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 { Summary } from "./summary";
11+
12+
13+
export class TaxFormSummaryResponse {
14+
/**
15+
* 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.
16+
*/
17+
"data": Array<Summary>;
18+
19+
static readonly discriminator: string | undefined = undefined;
20+
21+
static readonly mapping: {[index: string]: string} | undefined = undefined;
22+
23+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
24+
{
25+
"name": "data",
26+
"baseName": "data",
27+
"type": "Array<Summary>",
28+
"format": ""
29+
} ];
30+
31+
static getAttributeTypeMap() {
32+
return TaxFormSummaryResponse.attributeTypeMap;
33+
}
34+
35+
public constructor() {
36+
}
37+
}
38+

0 commit comments

Comments
 (0)