Skip to content

Commit 72591e3

Browse files
[reformat][adyen-sdk-automation] automated change
1 parent 8b36f0a commit 72591e3

File tree

216 files changed

+1441
-488
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+1441
-488
lines changed

src/services/balancePlatform/accountHoldersApi.ts

Lines changed: 5 additions & 2 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 { RestServiceError } from "../../typings/balancePlatform/models";
2324
import { TransactionRulesResponse } from "../../typings/balancePlatform/models";
2425

2526
/**
@@ -130,19 +131,21 @@ export class AccountHoldersApi extends Service {
130131
* @param requestOptions {@link IRequest.Options }
131132
* @param formType {@link 'US1099k' | 'US1099nec' } (Required) The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec**
132133
* @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
133135
* @return {@link GetTaxFormResponse }
134136
*/
135-
public async getTaxForm(id: string, formType: "US1099k" | "US1099nec", year: number, requestOptions?: IRequest.Options): Promise<GetTaxFormResponse> {
137+
public async getTaxForm(id: string, formType: 'US1099k' | 'US1099nec', year: number, legalEntityId?: string, requestOptions?: IRequest.Options): Promise<GetTaxFormResponse> {
136138
const endpoint = `${this.baseUrl}/accountHolders/{id}/taxForms`
137139
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
138140
const resource = new Resource(this, endpoint);
139141

140-
const hasDefinedQueryParams = formType ?? year;
142+
const hasDefinedQueryParams = formType ?? year ?? legalEntityId;
141143
if(hasDefinedQueryParams) {
142144
if(!requestOptions) requestOptions = {};
143145
if(!requestOptions.params) requestOptions.params = {};
144146
if(formType) requestOptions.params["formType"] = formType;
145147
if(year) requestOptions.params["year"] = year;
148+
if(legalEntityId) requestOptions.params["legalEntityId"] = legalEntityId;
146149
}
147150
const response = await getJsonResponse<string, GetTaxFormResponse>(
148151
resource,
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
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 { AuthorisedCardUsers } from "../../typings/balancePlatform/models";
19+
import { DefaultErrorResponseEntity } from "../../typings/balancePlatform/models";
20+
21+
/**
22+
* API handler for AuthorizedCardUsersApi
23+
*/
24+
export class AuthorizedCardUsersApi extends Service {
25+
26+
private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2";
27+
private baseUrl: string;
28+
29+
public constructor(client: Client){
30+
super(client);
31+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
32+
}
33+
34+
/**
35+
* @summary Create authorized users for a card.
36+
* @param paymentInstrumentId {@link string }
37+
* @param authorisedCardUsers {@link AuthorisedCardUsers }
38+
* @param requestOptions {@link IRequest.Options }
39+
* @return {@link void }
40+
*/
41+
public async createAuthorisedCardUsers(paymentInstrumentId: string, authorisedCardUsers: AuthorisedCardUsers, requestOptions?: IRequest.Options): Promise<void> {
42+
const endpoint = `${this.baseUrl}/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers`
43+
.replace("{" + "paymentInstrumentId" + "}", encodeURIComponent(String(paymentInstrumentId)));
44+
const resource = new Resource(this, endpoint);
45+
46+
const request: AuthorisedCardUsers = ObjectSerializer.serialize(authorisedCardUsers, "AuthorisedCardUsers");
47+
await getJsonResponse<AuthorisedCardUsers, void>(
48+
resource,
49+
request,
50+
{ ...requestOptions, method: "POST" }
51+
);
52+
}
53+
54+
/**
55+
* @summary Delete the authorized users for a card.
56+
* @param paymentInstrumentId {@link string }
57+
* @param requestOptions {@link IRequest.Options }
58+
* @return {@link void }
59+
*/
60+
public async deleteAuthorisedCardUsers(paymentInstrumentId: string, requestOptions?: IRequest.Options): Promise<void> {
61+
const endpoint = `${this.baseUrl}/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers`
62+
.replace("{" + "paymentInstrumentId" + "}", encodeURIComponent(String(paymentInstrumentId)));
63+
const resource = new Resource(this, endpoint);
64+
65+
await getJsonResponse<string, void>(
66+
resource,
67+
"",
68+
{ ...requestOptions, method: "DELETE" }
69+
);
70+
}
71+
72+
/**
73+
* @summary Get authorized users for a card.
74+
* @param paymentInstrumentId {@link string }
75+
* @param requestOptions {@link IRequest.Options }
76+
* @return {@link AuthorisedCardUsers }
77+
*/
78+
public async getAllAuthorisedCardUsers(paymentInstrumentId: string, requestOptions?: IRequest.Options): Promise<AuthorisedCardUsers> {
79+
const endpoint = `${this.baseUrl}/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers`
80+
.replace("{" + "paymentInstrumentId" + "}", encodeURIComponent(String(paymentInstrumentId)));
81+
const resource = new Resource(this, endpoint);
82+
83+
const response = await getJsonResponse<string, AuthorisedCardUsers>(
84+
resource,
85+
"",
86+
{ ...requestOptions, method: "GET" }
87+
);
88+
89+
return ObjectSerializer.deserialize(response, "AuthorisedCardUsers");
90+
}
91+
92+
/**
93+
* @summary Update the authorized users for a card.
94+
* @param paymentInstrumentId {@link string }
95+
* @param authorisedCardUsers {@link AuthorisedCardUsers }
96+
* @param requestOptions {@link IRequest.Options }
97+
* @return {@link void }
98+
*/
99+
public async updateAuthorisedCardUsers(paymentInstrumentId: string, authorisedCardUsers: AuthorisedCardUsers, requestOptions?: IRequest.Options): Promise<void> {
100+
const endpoint = `${this.baseUrl}/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers`
101+
.replace("{" + "paymentInstrumentId" + "}", encodeURIComponent(String(paymentInstrumentId)));
102+
const resource = new Resource(this, endpoint);
103+
104+
const request: AuthorisedCardUsers = ObjectSerializer.serialize(authorisedCardUsers, "AuthorisedCardUsers");
105+
await getJsonResponse<AuthorisedCardUsers, void>(
106+
resource,
107+
request,
108+
{ ...requestOptions, method: "PATCH" }
109+
);
110+
}
111+
112+
}

src/services/balancePlatform/balanceAccountsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { BalanceAccountUpdateRequest } from "../../typings/balancePlatform/model
2121
import { BalanceSweepConfigurationsResponse } from "../../typings/balancePlatform/models";
2222
import { CreateSweepConfigurationV2 } from "../../typings/balancePlatform/models";
2323
import { PaginatedPaymentInstrumentsResponse } from "../../typings/balancePlatform/models";
24+
import { RestServiceError } from "../../typings/balancePlatform/models";
2425
import { SweepConfigurationV2 } from "../../typings/balancePlatform/models";
2526
import { TransactionRulesResponse } from "../../typings/balancePlatform/models";
2627
import { UpdateSweepConfigurationV2 } from "../../typings/balancePlatform/models";

src/services/balancePlatform/balancesApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Resource from "../resource";
1717
import { ObjectSerializer } from "../../typings/balancePlatform/objectSerializer";
1818
import { BalanceWebhookSettingInfo } from "../../typings/balancePlatform/models";
1919
import { BalanceWebhookSettingInfoUpdate } from "../../typings/balancePlatform/models";
20+
import { DefaultErrorResponseEntity } from "../../typings/balancePlatform/models";
2021
import { WebhookSetting } from "../../typings/balancePlatform/models";
2122
import { WebhookSettings } from "../../typings/balancePlatform/models";
2223

src/services/balancePlatform/bankAccountValidationApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Resource from "../resource";
1616

1717
import { ObjectSerializer } from "../../typings/balancePlatform/objectSerializer";
1818
import { BankAccountIdentificationValidationRequest } from "../../typings/balancePlatform/models";
19+
import { RestServiceError } from "../../typings/balancePlatform/models";
1920

2021
/**
2122
* API handler for BankAccountValidationApi

src/services/balancePlatform/cardOrdersApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Resource from "../resource";
1717
import { ObjectSerializer } from "../../typings/balancePlatform/objectSerializer";
1818
import { PaginatedGetCardOrderItemResponse } from "../../typings/balancePlatform/models";
1919
import { PaginatedGetCardOrderResponse } from "../../typings/balancePlatform/models";
20+
import { RestServiceError } from "../../typings/balancePlatform/models";
2021

2122
/**
2223
* API handler for CardOrdersApi

src/services/balancePlatform/grantAccountsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Resource from "../resource";
1616

1717
import { ObjectSerializer } from "../../typings/balancePlatform/objectSerializer";
1818
import { CapitalGrantAccount } from "../../typings/balancePlatform/models";
19+
import { RestServiceError } from "../../typings/balancePlatform/models";
1920

2021
/**
2122
* API handler for GrantAccountsApi

src/services/balancePlatform/grantOffersApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Resource from "../resource";
1717
import { ObjectSerializer } from "../../typings/balancePlatform/objectSerializer";
1818
import { GrantOffer } from "../../typings/balancePlatform/models";
1919
import { GrantOffers } from "../../typings/balancePlatform/models";
20+
import { RestServiceError } from "../../typings/balancePlatform/models";
2021

2122
/**
2223
* API handler for GrantOffersApi

src/services/balancePlatform/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
import { AccountHoldersApi } from "./accountHoldersApi";
11+
import { AuthorizedCardUsersApi } from "./authorizedCardUsersApi";
1112
import { BalanceAccountsApi } from "./balanceAccountsApi";
1213
import { BalancesApi } from "./balancesApi";
1314
import { BankAccountValidationApi } from "./bankAccountValidationApi";
@@ -36,6 +37,10 @@ export default class BalancePlatformAPI extends Service {
3637
return new AccountHoldersApi(this.client);
3738
}
3839

40+
public get AuthorizedCardUsersApi() {
41+
return new AuthorizedCardUsersApi(this.client);
42+
}
43+
3944
public get BalanceAccountsApi() {
4045
return new BalanceAccountsApi(this.client);
4146
}

src/services/balancePlatform/manageCardPINApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { ObjectSerializer } from "../../typings/balancePlatform/objectSerializer
1818
import { PinChangeRequest } from "../../typings/balancePlatform/models";
1919
import { PinChangeResponse } from "../../typings/balancePlatform/models";
2020
import { PublicKeyResponse } from "../../typings/balancePlatform/models";
21+
import { RestServiceError } from "../../typings/balancePlatform/models";
2122
import { RevealPinRequest } from "../../typings/balancePlatform/models";
2223
import { RevealPinResponse } from "../../typings/balancePlatform/models";
2324

0 commit comments

Comments
 (0)