Skip to content

Commit 213bf8a

Browse files
[reformat][adyen-sdk-automation] automated change
1 parent f6f056a commit 213bf8a

File tree

202 files changed

+3653
-218
lines changed

Some content is hidden

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

202 files changed

+3653
-218
lines changed

src/services/balancePlatform/accountHoldersApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
AccountHolderUpdateRequest,
1717
GetTaxFormResponse,
1818
PaginatedBalanceAccountsResponse,
19+
RestServiceError,
1920
TransactionRulesResponse,
2021
ObjectSerializer
2122
} from "../../typings/balancePlatform/models";
@@ -121,7 +122,7 @@ export class AccountHoldersApi extends Service {
121122
* @param year {@link number } The tax year in YYYY format for the tax form you want to retrieve
122123
* @return {@link GetTaxFormResponse }
123124
*/
124-
public async getTaxForm(id: string, formType?: "US1099k" | "US1099nec", year?: number, requestOptions?: IRequest.Options): Promise<GetTaxFormResponse> {
125+
public async getTaxForm(id: string, formType?: 'US1099k' | 'US1099nec', year?: number, requestOptions?: IRequest.Options): Promise<GetTaxFormResponse> {
125126
const endpoint = `${this.baseUrl}/accountHolders/{id}/taxForms`
126127
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
127128
const resource = new Resource(this, endpoint);

src/services/balancePlatform/balanceAccountsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
BalanceSweepConfigurationsResponse,
1818
CreateSweepConfigurationV2,
1919
PaginatedPaymentInstrumentsResponse,
20+
RestServiceError,
2021
SweepConfigurationV2,
2122
TransactionRulesResponse,
2223
UpdateSweepConfigurationV2,
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
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 getJsonResponse from "../../helpers/getJsonResponse";
11+
import Service from "../../service";
12+
import Client from "../../client";
13+
import {
14+
BalanceWebhookSettingInfo,
15+
BalanceWebhookSettingInfoUpdate,
16+
DefaultErrorResponseEntity,
17+
WebhookSetting,
18+
WebhookSettings,
19+
ObjectSerializer
20+
} from "../../typings/balancePlatform/models";
21+
import { IRequest } from "../../typings/requestOptions";
22+
import Resource from "../resource";
23+
24+
export class BalancesApi 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 a balance webhook setting
36+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
37+
* @param webhookId {@link string } The unique identifier of the balance webhook.
38+
* @param balanceWebhookSettingInfo {@link BalanceWebhookSettingInfo }
39+
* @param requestOptions {@link IRequest.Options }
40+
* @return {@link WebhookSetting }
41+
*/
42+
public async createWebhookSetting(balancePlatformId: string, webhookId: string, balanceWebhookSettingInfo: BalanceWebhookSettingInfo, requestOptions?: IRequest.Options): Promise<WebhookSetting> {
43+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings`
44+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
45+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)));
46+
const resource = new Resource(this, endpoint);
47+
const request: BalanceWebhookSettingInfo = ObjectSerializer.serialize(balanceWebhookSettingInfo, "BalanceWebhookSettingInfo");
48+
const response = await getJsonResponse<BalanceWebhookSettingInfo, WebhookSetting>(
49+
resource,
50+
request,
51+
{ ...requestOptions, method: "POST" }
52+
);
53+
return ObjectSerializer.deserialize(response, "WebhookSetting");
54+
}
55+
56+
/**
57+
* @summary Delete a balance webhook setting by id
58+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
59+
* @param webhookId {@link string } The unique identifier of the balance webhook.
60+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
61+
* @param requestOptions {@link IRequest.Options }
62+
*/
63+
public async deleteWebhookSetting(balancePlatformId: string, webhookId: string, settingId: string, requestOptions?: IRequest.Options): Promise<void> {
64+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}`
65+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
66+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)))
67+
.replace("{" + "settingId" + "}", encodeURIComponent(String(settingId)));
68+
const resource = new Resource(this, endpoint);
69+
await getJsonResponse<string, void>(
70+
resource,
71+
"",
72+
{ ...requestOptions, method: "DELETE" }
73+
);
74+
}
75+
76+
/**
77+
* @summary Get all balance webhook settings
78+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
79+
* @param webhookId {@link string } The unique identifier of the balance webhook.
80+
* @param requestOptions {@link IRequest.Options }
81+
* @return {@link WebhookSettings }
82+
*/
83+
public async getAllWebhookSettings(balancePlatformId: string, webhookId: string, requestOptions?: IRequest.Options): Promise<WebhookSettings> {
84+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings`
85+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
86+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)));
87+
const resource = new Resource(this, endpoint);
88+
const response = await getJsonResponse<string, WebhookSettings>(
89+
resource,
90+
"",
91+
{ ...requestOptions, method: "GET" }
92+
);
93+
return ObjectSerializer.deserialize(response, "WebhookSettings");
94+
}
95+
96+
/**
97+
* @summary Get a balance webhook setting by id
98+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
99+
* @param webhookId {@link string } The unique identifier of the balance webhook.
100+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
101+
* @param requestOptions {@link IRequest.Options }
102+
* @return {@link WebhookSetting }
103+
*/
104+
public async getWebhookSetting(balancePlatformId: string, webhookId: string, settingId: string, requestOptions?: IRequest.Options): Promise<WebhookSetting> {
105+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}`
106+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
107+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)))
108+
.replace("{" + "settingId" + "}", encodeURIComponent(String(settingId)));
109+
const resource = new Resource(this, endpoint);
110+
const response = await getJsonResponse<string, WebhookSetting>(
111+
resource,
112+
"",
113+
{ ...requestOptions, method: "GET" }
114+
);
115+
return ObjectSerializer.deserialize(response, "WebhookSetting");
116+
}
117+
118+
/**
119+
* @summary Update a balance webhook setting by id
120+
* @param balancePlatformId {@link string } The unique identifier of the balance platform.
121+
* @param webhookId {@link string } The unique identifier of the balance webhook.
122+
* @param settingId {@link string } The unique identifier of the balance webhook setting.
123+
* @param balanceWebhookSettingInfoUpdate {@link BalanceWebhookSettingInfoUpdate }
124+
* @param requestOptions {@link IRequest.Options }
125+
* @return {@link WebhookSetting }
126+
*/
127+
public async updateWebhookSetting(balancePlatformId: string, webhookId: string, settingId: string, balanceWebhookSettingInfoUpdate: BalanceWebhookSettingInfoUpdate, requestOptions?: IRequest.Options): Promise<WebhookSetting> {
128+
const endpoint = `${this.baseUrl}/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}`
129+
.replace("{" + "balancePlatformId" + "}", encodeURIComponent(String(balancePlatformId)))
130+
.replace("{" + "webhookId" + "}", encodeURIComponent(String(webhookId)))
131+
.replace("{" + "settingId" + "}", encodeURIComponent(String(settingId)));
132+
const resource = new Resource(this, endpoint);
133+
const request: BalanceWebhookSettingInfoUpdate = ObjectSerializer.serialize(balanceWebhookSettingInfoUpdate, "BalanceWebhookSettingInfoUpdate");
134+
const response = await getJsonResponse<BalanceWebhookSettingInfoUpdate, WebhookSetting>(
135+
resource,
136+
request,
137+
{ ...requestOptions, method: "PATCH" }
138+
);
139+
return ObjectSerializer.deserialize(response, "WebhookSetting");
140+
}
141+
}

src/services/balancePlatform/bankAccountValidationApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Service from "../../service";
1212
import Client from "../../client";
1313
import {
1414
BankAccountIdentificationValidationRequest,
15+
RestServiceError,
1516
ObjectSerializer
1617
} from "../../typings/balancePlatform/models";
1718
import { IRequest } from "../../typings/requestOptions";

src/services/balancePlatform/cardOrdersApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Client from "../../client";
1313
import {
1414
PaginatedGetCardOrderItemResponse,
1515
PaginatedGetCardOrderResponse,
16+
RestServiceError,
1617
ObjectSerializer
1718
} from "../../typings/balancePlatform/models";
1819
import { IRequest } from "../../typings/requestOptions";

src/services/balancePlatform/grantAccountsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Service from "../../service";
1212
import Client from "../../client";
1313
import {
1414
CapitalGrantAccount,
15+
RestServiceError,
1516
ObjectSerializer
1617
} from "../../typings/balancePlatform/models";
1718
import { IRequest } from "../../typings/requestOptions";

src/services/balancePlatform/grantOffersApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Client from "../../client";
1313
import {
1414
GrantOffer,
1515
GrantOffers,
16+
RestServiceError,
1617
ObjectSerializer
1718
} from "../../typings/balancePlatform/models";
1819
import { IRequest } from "../../typings/requestOptions";

src/services/balancePlatform/index.ts

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

1010
import { AccountHoldersApi } from "./accountHoldersApi";
1111
import { BalanceAccountsApi } from "./balanceAccountsApi";
12+
import { BalancesApi } from "./balancesApi";
1213
import { BankAccountValidationApi } from "./bankAccountValidationApi";
1314
import { CardOrdersApi } from "./cardOrdersApi";
1415
import { GrantAccountsApi } from "./grantAccountsApi";
@@ -39,6 +40,10 @@ export default class BalancePlatformAPI extends Service {
3940
return new BalanceAccountsApi(this.client);
4041
}
4142

43+
public get BalancesApi() {
44+
return new BalancesApi(this.client);
45+
}
46+
4247
public get BankAccountValidationApi() {
4348
return new BankAccountValidationApi(this.client);
4449
}

src/services/balancePlatform/manageCardPINApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
PinChangeRequest,
1515
PinChangeResponse,
1616
PublicKeyResponse,
17+
RestServiceError,
1718
RevealPinRequest,
1819
RevealPinResponse,
1920
ObjectSerializer

src/services/balancePlatform/manageSCADevicesApi.ts

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

src/services/balancePlatform/networkTokensApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Service from "../../service";
1212
import Client from "../../client";
1313
import {
1414
GetNetworkTokenResponse,
15+
RestServiceError,
1516
UpdateNetworkTokenRequest,
1617
ObjectSerializer
1718
} from "../../typings/balancePlatform/models";

src/services/balancePlatform/paymentInstrumentGroupsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Client from "../../client";
1313
import {
1414
PaymentInstrumentGroup,
1515
PaymentInstrumentGroupInfo,
16+
RestServiceError,
1617
TransactionRulesResponse,
1718
ObjectSerializer
1819
} from "../../typings/balancePlatform/models";

src/services/balancePlatform/paymentInstrumentsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
PaymentInstrumentRevealRequest,
1919
PaymentInstrumentRevealResponse,
2020
PaymentInstrumentUpdateRequest,
21+
RestServiceError,
2122
TransactionRulesResponse,
2223
UpdatePaymentInstrument,
2324
ObjectSerializer

src/services/balancePlatform/platformApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Client from "../../client";
1313
import {
1414
BalancePlatform,
1515
PaginatedAccountHoldersResponse,
16+
RestServiceError,
1617
TransactionRulesResponse,
1718
ObjectSerializer
1819
} from "../../typings/balancePlatform/models";

src/services/balancePlatform/transactionRulesApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
import getJsonResponse from "../../helpers/getJsonResponse";
1111
import Service from "../../service";
1212
import Client from "../../client";
13-
import {
13+
import {
14+
RestServiceError,
1415
TransactionRule,
1516
TransactionRuleInfo,
1617
TransactionRuleResponse,

src/services/balancePlatform/transferRoutesApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
import getJsonResponse from "../../helpers/getJsonResponse";
1111
import Service from "../../service";
1212
import Client from "../../client";
13-
import {
13+
import {
14+
RestServiceError,
1415
TransferRouteRequest,
1516
TransferRouteResponse,
1617
ObjectSerializer

src/services/checkout/donationsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
DonationCampaignsResponse,
1616
DonationPaymentRequest,
1717
DonationPaymentResponse,
18+
ServiceError,
1819
ObjectSerializer
1920
} from "../../typings/checkout/models";
2021
import { IRequest } from "../../typings/requestOptions";

src/services/checkout/modificationsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
PaymentRefundResponse,
2222
PaymentReversalRequest,
2323
PaymentReversalResponse,
24+
ServiceError,
2425
StandalonePaymentCancelRequest,
2526
StandalonePaymentCancelResponse,
2627
ObjectSerializer

src/services/checkout/ordersApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
CancelOrderResponse,
1818
CreateOrderRequest,
1919
CreateOrderResponse,
20+
ServiceError,
2021
ObjectSerializer
2122
} from "../../typings/checkout/models";
2223
import { IRequest } from "../../typings/requestOptions";

src/services/checkout/paymentLinksApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Client from "../../client";
1313
import {
1414
PaymentLinkRequest,
1515
PaymentLinkResponse,
16+
ServiceError,
1617
UpdatePaymentLinkRequest,
1718
ObjectSerializer
1819
} from "../../typings/checkout/models";

src/services/checkout/paymentsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
PaymentMethodsResponse,
2222
PaymentRequest,
2323
PaymentResponse,
24+
ServiceError,
2425
SessionResultResponse,
2526
ObjectSerializer
2627
} from "../../typings/checkout/models";

src/services/checkout/utilityApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
ApplePaySessionResponse,
1616
PaypalUpdateOrderRequest,
1717
PaypalUpdateOrderResponse,
18+
ServiceError,
1819
UtilityRequest,
1920
UtilityResponse,
2021
ObjectSerializer

src/services/legalEntityManagement/businessLinesApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
BusinessLine,
1515
BusinessLineInfo,
1616
BusinessLineInfoUpdate,
17+
ServiceError,
1718
ObjectSerializer
1819
} from "../../typings/legalEntityManagement/models";
1920
import { IRequest } from "../../typings/requestOptions";

src/services/legalEntityManagement/documentsApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Service from "../../service";
1212
import Client from "../../client";
1313
import {
1414
Document,
15+
ServiceError,
1516
ObjectSerializer
1617
} from "../../typings/legalEntityManagement/models";
1718
import { IRequest } from "../../typings/requestOptions";

src/services/legalEntityManagement/hostedOnboardingApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
OnboardingLinkInfo,
1616
OnboardingTheme,
1717
OnboardingThemes,
18+
ServiceError,
1819
ObjectSerializer
1920
} from "../../typings/legalEntityManagement/models";
2021
import { IRequest } from "../../typings/requestOptions";

src/services/legalEntityManagement/legalEntitiesApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
LegalEntity,
1717
LegalEntityInfo,
1818
LegalEntityInfoRequiredType,
19+
ServiceError,
1920
VerificationErrors,
2021
ObjectSerializer
2122
} from "../../typings/legalEntityManagement/models";

src/services/legalEntityManagement/pCIQuestionnairesApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
GetPciQuestionnaireResponse,
2020
PciSigningRequest,
2121
PciSigningResponse,
22+
ServiceError,
2223
ObjectSerializer
2324
} from "../../typings/legalEntityManagement/models";
2425
import { IRequest } from "../../typings/requestOptions";

src/services/legalEntityManagement/taxEDeliveryConsentApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Service from "../../service";
1212
import Client from "../../client";
1313
import {
1414
CheckTaxElectronicDeliveryConsentResponse,
15+
ServiceError,
1516
SetTaxElectronicDeliveryConsentRequest,
1617
ObjectSerializer
1718
} from "../../typings/legalEntityManagement/models";

src/services/legalEntityManagement/termsOfServiceApi.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
GetTermsOfServiceAcceptanceInfosResponse,
1919
GetTermsOfServiceDocumentRequest,
2020
GetTermsOfServiceDocumentResponse,
21+
ServiceError,
2122
ObjectSerializer
2223
} from "../../typings/legalEntityManagement/models";
2324
import { IRequest } from "../../typings/requestOptions";

src/services/legalEntityManagement/transferInstrumentsApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
import getJsonResponse from "../../helpers/getJsonResponse";
1111
import Service from "../../service";
1212
import Client from "../../client";
13-
import {
13+
import {
14+
ServiceError,
1415
TransferInstrument,
1516
TransferInstrumentInfo,
1617
ObjectSerializer

0 commit comments

Comments
 (0)