Skip to content

Commit c1d0f1f

Browse files
authored
Merge pull request #1417 from Adyen/sdk-automation/models
Update all services
2 parents f201d44 + c5e0373 commit c1d0f1f

Some content is hidden

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

54 files changed

+776
-61
lines changed

src/services/legalEntityManagement/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { DocumentsApi } from "./documentsApi";
1212
import { HostedOnboardingApi } from "./hostedOnboardingApi";
1313
import { LegalEntitiesApi } from "./legalEntitiesApi";
1414
import { PCIQuestionnairesApi } from "./pCIQuestionnairesApi";
15+
import { TaxEDeliveryConsentApi } from "./taxEDeliveryConsentApi";
1516
import { TermsOfServiceApi } from "./termsOfServiceApi";
1617
import { TransferInstrumentsApi } from "./transferInstrumentsApi";
1718

@@ -44,6 +45,10 @@ export default class LegalEntityManagementAPI extends Service {
4445
return new PCIQuestionnairesApi(this.client);
4546
}
4647

48+
public get TaxEDeliveryConsentApi() {
49+
return new TaxEDeliveryConsentApi(this.client);
50+
}
51+
4752
public get TermsOfServiceApi() {
4853
return new TermsOfServiceApi(this.client);
4954
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
* The version of the OpenAPI document: v3
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+
CheckTaxElectronicDeliveryConsentResponse,
15+
SetTaxElectronicDeliveryConsentRequest,
16+
ObjectSerializer
17+
} from "../../typings/legalEntityManagement/models";
18+
import { IRequest } from "../../typings/requestOptions";
19+
import Resource from "../resource";
20+
21+
export class TaxEDeliveryConsentApi extends Service {
22+
23+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
24+
private baseUrl: string;
25+
26+
public constructor(client: Client){
27+
super(client);
28+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
29+
}
30+
31+
/**
32+
* @summary Check the status of consent for electronic delivery of tax forms
33+
* @param id {@link string } The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization.
34+
* @param requestOptions {@link IRequest.Options }
35+
* @return {@link CheckTaxElectronicDeliveryConsentResponse }
36+
*/
37+
public async checkStatusOfConsentForElectronicDeliveryOfTaxForms(id: string, requestOptions?: IRequest.Options): Promise<CheckTaxElectronicDeliveryConsentResponse> {
38+
const endpoint = `${this.baseUrl}/legalEntities/{id}/checkTaxElectronicDeliveryConsent`
39+
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
40+
const resource = new Resource(this, endpoint);
41+
const response = await getJsonResponse<string, CheckTaxElectronicDeliveryConsentResponse>(
42+
resource,
43+
"",
44+
{ ...requestOptions, method: "POST" }
45+
);
46+
return ObjectSerializer.deserialize(response, "CheckTaxElectronicDeliveryConsentResponse");
47+
}
48+
49+
/**
50+
* @summary Set the consent status for electronic delivery of tax forms
51+
* @param id {@link string } The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization.
52+
* @param setTaxElectronicDeliveryConsentRequest {@link SetTaxElectronicDeliveryConsentRequest }
53+
* @param requestOptions {@link IRequest.Options }
54+
*/
55+
public async setConsentStatusForElectronicDeliveryOfTaxForms(id: string, setTaxElectronicDeliveryConsentRequest: SetTaxElectronicDeliveryConsentRequest, requestOptions?: IRequest.Options): Promise<void> {
56+
const endpoint = `${this.baseUrl}/legalEntities/{id}/setTaxElectronicDeliveryConsent`
57+
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
58+
const resource = new Resource(this, endpoint);
59+
const request: SetTaxElectronicDeliveryConsentRequest = ObjectSerializer.serialize(setTaxElectronicDeliveryConsentRequest, "SetTaxElectronicDeliveryConsentRequest");
60+
await getJsonResponse<SetTaxElectronicDeliveryConsentRequest, void>(
61+
resource,
62+
request,
63+
{ ...requestOptions, method: "POST" }
64+
);
65+
}
66+
}

src/services/transfers/transfersApi.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import getJsonResponse from "../../helpers/getJsonResponse";
1111
import Service from "../../service";
1212
import Client from "../../client";
1313
import {
14+
ApproveTransfersRequest,
15+
CancelTransfersRequest,
1416
FindTransfersResponse,
1517
ReturnTransferRequest,
1618
ReturnTransferResponse,
@@ -32,6 +34,38 @@ export class TransfersApi extends Service {
3234
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
3335
}
3436

37+
/**
38+
* @summary Approve initiated transfers
39+
* @param approveTransfersRequest {@link ApproveTransfersRequest }
40+
* @param requestOptions {@link IRequest.Options }
41+
*/
42+
public async approveInitiatedTransfers(approveTransfersRequest: ApproveTransfersRequest, requestOptions?: IRequest.Options): Promise<void> {
43+
const endpoint = `${this.baseUrl}/transfers/approve`;
44+
const resource = new Resource(this, endpoint);
45+
const request: ApproveTransfersRequest = ObjectSerializer.serialize(approveTransfersRequest, "ApproveTransfersRequest");
46+
await getJsonResponse<ApproveTransfersRequest, void>(
47+
resource,
48+
request,
49+
{ ...requestOptions, method: "POST" }
50+
);
51+
}
52+
53+
/**
54+
* @summary Cancel initiated transfers
55+
* @param cancelTransfersRequest {@link CancelTransfersRequest }
56+
* @param requestOptions {@link IRequest.Options }
57+
*/
58+
public async cancelInitiatedTransfers(cancelTransfersRequest: CancelTransfersRequest, requestOptions?: IRequest.Options): Promise<void> {
59+
const endpoint = `${this.baseUrl}/transfers/cancel`;
60+
const resource = new Resource(this, endpoint);
61+
const request: CancelTransfersRequest = ObjectSerializer.serialize(cancelTransfersRequest, "CancelTransfersRequest");
62+
await getJsonResponse<CancelTransfersRequest, void>(
63+
resource,
64+
request,
65+
{ ...requestOptions, method: "POST" }
66+
);
67+
}
68+
3569
/**
3670
* @summary Get all transfers
3771
* @param requestOptions {@link IRequest.Options }

src/typings/balancePlatform/bankAccountDetails.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export class BankAccountDetails {
1818
*/
1919
'accountType'?: string;
2020
/**
21+
* The bank account branch number, without separators or whitespace
22+
*/
23+
'branchNumber'?: string;
24+
/**
2125
* Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL.
2226
*/
2327
'formFactor'?: string;
@@ -51,6 +55,11 @@ export class BankAccountDetails {
5155
"baseName": "accountType",
5256
"type": "string"
5357
},
58+
{
59+
"name": "branchNumber",
60+
"baseName": "branchNumber",
61+
"type": "string"
62+
},
5463
{
5564
"name": "formFactor",
5665
"baseName": "formFactor",

src/typings/balancePlatform/createSweepConfigurationV2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export namespace CreateSweepConfigurationV2 {
148148
Wire = 'wire'
149149
}
150150
export enum ReasonEnum {
151+
AccountHierarchyNotActive = 'accountHierarchyNotActive',
151152
AmountLimitExceeded = 'amountLimitExceeded',
152153
Approved = 'approved',
153154
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
@@ -159,12 +160,15 @@ export namespace CreateSweepConfigurationV2 {
159160
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
160161
Declined = 'declined',
161162
DeclinedByTransactionRule = 'declinedByTransactionRule',
163+
DirectDebitNotSupported = 'directDebitNotSupported',
162164
Error = 'error',
163165
NotEnoughBalance = 'notEnoughBalance',
164166
PendingApproval = 'pendingApproval',
167+
PendingExecution = 'pendingExecution',
165168
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
166169
RouteNotFound = 'routeNotFound',
167170
ScaFailed = 'scaFailed',
171+
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
168172
Unknown = 'unknown'
169173
}
170174
export enum StatusEnum {

src/typings/balancePlatform/platformPaymentConfiguration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class PlatformPaymentConfiguration {
1414
*/
1515
'salesDayClosingTime'?: string;
1616
/**
17-
* Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **0** to **10**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**.
17+
* Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **1** to **10**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**.
1818
*/
1919
'settlementDelayDays'?: number;
2020

src/typings/balancePlatform/registerSCARequest.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
import { DelegatedAuthenticationData } from './delegatedAuthenticationData';
1111

1212
export class RegisterSCARequest {
13+
/**
14+
* The name of the SCA device that you are registering. You can use it to help your users identify the device. If you do not specify a `name`, Adyen automatically generates one.
15+
*/
16+
'name'?: string;
1317
/**
1418
* The unique identifier of the payment instrument for which you are registering the SCA device.
1519
*/
@@ -19,6 +23,11 @@ export class RegisterSCARequest {
1923
static discriminator: string | undefined = undefined;
2024

2125
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
26+
{
27+
"name": "name",
28+
"baseName": "name",
29+
"type": "string"
30+
},
2231
{
2332
"name": "paymentInstrumentId",
2433
"baseName": "paymentInstrumentId",

src/typings/balancePlatform/sweepConfigurationV2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export namespace SweepConfigurationV2 {
157157
Wire = 'wire'
158158
}
159159
export enum ReasonEnum {
160+
AccountHierarchyNotActive = 'accountHierarchyNotActive',
160161
AmountLimitExceeded = 'amountLimitExceeded',
161162
Approved = 'approved',
162163
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
@@ -168,12 +169,15 @@ export namespace SweepConfigurationV2 {
168169
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
169170
Declined = 'declined',
170171
DeclinedByTransactionRule = 'declinedByTransactionRule',
172+
DirectDebitNotSupported = 'directDebitNotSupported',
171173
Error = 'error',
172174
NotEnoughBalance = 'notEnoughBalance',
173175
PendingApproval = 'pendingApproval',
176+
PendingExecution = 'pendingExecution',
174177
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
175178
RouteNotFound = 'routeNotFound',
176179
ScaFailed = 'scaFailed',
180+
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
177181
Unknown = 'unknown'
178182
}
179183
export enum StatusEnum {

src/typings/balancePlatform/transactionRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class TransactionRule {
3131
'id'?: string;
3232
'interval': TransactionRuleInterval;
3333
/**
34-
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. If not provided, by default, this is set to **hardBlock**. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined.
34+
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, declines the Transaction. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.
3535
*/
3636
'outcomeType'?: TransactionRule.OutcomeTypeEnum;
3737
/**

src/typings/balancePlatform/transactionRuleInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class TransactionRuleInfo {
2727
'entityKey': TransactionRuleEntityKey;
2828
'interval': TransactionRuleInterval;
2929
/**
30-
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. If not provided, by default, this is set to **hardBlock**. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined.
30+
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, declines the Transaction. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.
3131
*/
3232
'outcomeType'?: TransactionRuleInfo.OutcomeTypeEnum;
3333
/**

src/typings/balancePlatform/updateSweepConfigurationV2.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export namespace UpdateSweepConfigurationV2 {
157157
Wire = 'wire'
158158
}
159159
export enum ReasonEnum {
160+
AccountHierarchyNotActive = 'accountHierarchyNotActive',
160161
AmountLimitExceeded = 'amountLimitExceeded',
161162
Approved = 'approved',
162163
BalanceAccountTemporarilyBlockedByTransactionRule = 'balanceAccountTemporarilyBlockedByTransactionRule',
@@ -168,12 +169,15 @@ export namespace UpdateSweepConfigurationV2 {
168169
CounterpartyBankUnavailable = 'counterpartyBankUnavailable',
169170
Declined = 'declined',
170171
DeclinedByTransactionRule = 'declinedByTransactionRule',
172+
DirectDebitNotSupported = 'directDebitNotSupported',
171173
Error = 'error',
172174
NotEnoughBalance = 'notEnoughBalance',
173175
PendingApproval = 'pendingApproval',
176+
PendingExecution = 'pendingExecution',
174177
RefusedByCounterpartyBank = 'refusedByCounterpartyBank',
175178
RouteNotFound = 'routeNotFound',
176179
ScaFailed = 'scaFailed',
180+
TransferInstrumentDoesNotExist = 'transferInstrumentDoesNotExist',
177181
Unknown = 'unknown'
178182
}
179183
export enum StatusEnum {

src/typings/balancePlatform/verificationDeadline.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export namespace VerificationDeadline {
6969
IssueCard = 'issueCard',
7070
IssueCardCommercial = 'issueCardCommercial',
7171
IssueCardConsumer = 'issueCardConsumer',
72+
IssueCreditLimit = 'issueCreditLimit',
7273
LocalAcceptance = 'localAcceptance',
7374
Payout = 'payout',
7475
PayoutToTransferInstrument = 'payoutToTransferInstrument',

src/typings/balancePlatform/verificationError.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export namespace VerificationError {
9898
IssueCard = 'issueCard',
9999
IssueCardCommercial = 'issueCardCommercial',
100100
IssueCardConsumer = 'issueCardConsumer',
101+
IssueCreditLimit = 'issueCreditLimit',
101102
LocalAcceptance = 'localAcceptance',
102103
Payout = 'payout',
103104
PayoutToTransferInstrument = 'payoutToTransferInstrument',

src/typings/balancePlatform/verificationErrorRecursive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export namespace VerificationErrorRecursive {
8888
IssueCard = 'issueCard',
8989
IssueCardCommercial = 'issueCardCommercial',
9090
IssueCardConsumer = 'issueCardConsumer',
91+
IssueCreditLimit = 'issueCreditLimit',
9192
LocalAcceptance = 'localAcceptance',
9293
Payout = 'payout',
9394
PayoutToTransferInstrument = 'payoutToTransferInstrument',

src/typings/checkout/cardDetailsResponse.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ export class CardDetailsResponse {
1515
*/
1616
'brands'?: Array<CardBrandDetails>;
1717
/**
18+
* The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**.
19+
*/
20+
'fundingSource'?: string;
21+
/**
22+
* Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card.
23+
*/
24+
'isCardCommercial'?: boolean;
25+
/**
1826
* The two-letter country code of the country where the card was issued.
1927
*/
2028
'issuingCountryCode'?: string;
@@ -27,6 +35,16 @@ export class CardDetailsResponse {
2735
"baseName": "brands",
2836
"type": "Array<CardBrandDetails>"
2937
},
38+
{
39+
"name": "fundingSource",
40+
"baseName": "fundingSource",
41+
"type": "string"
42+
},
43+
{
44+
"name": "isCardCommercial",
45+
"baseName": "isCardCommercial",
46+
"type": "boolean"
47+
},
3048
{
3149
"name": "issuingCountryCode",
3250
"baseName": "issuingCountryCode",

src/typings/checkout/createOrderRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Amount } from './amount';
1212
export class CreateOrderRequest {
1313
'amount': Amount;
1414
/**
15-
* The date that order expires; e.g. 2019-03-23T12:25:28Z. If not provided, the default expiry duration is 1 day.
15+
* The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.
1616
*/
1717
'expiresAt'?: string;
1818
/**

src/typings/checkout/fundRecipient.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ export class FundRecipient {
4545
* Indicates the tax identifier of the fund recipient
4646
*/
4747
'walletOwnerTaxId'?: string;
48+
/**
49+
* The purpose of a digital wallet transaction
50+
*/
51+
'walletPurpose'?: FundRecipient.WalletPurposeEnum;
4852

4953
static discriminator: string | undefined = undefined;
5054

@@ -103,10 +107,24 @@ export class FundRecipient {
103107
"name": "walletOwnerTaxId",
104108
"baseName": "walletOwnerTaxId",
105109
"type": "string"
110+
},
111+
{
112+
"name": "walletPurpose",
113+
"baseName": "walletPurpose",
114+
"type": "FundRecipient.WalletPurposeEnum"
106115
} ];
107116

108117
static getAttributeTypeMap() {
109118
return FundRecipient.attributeTypeMap;
110119
}
111120
}
112121

122+
export namespace FundRecipient {
123+
export enum WalletPurposeEnum {
124+
IdentifiedBoleto = 'identifiedBoleto',
125+
TransferDifferentWallet = 'transferDifferentWallet',
126+
TransferOwnWallet = 'transferOwnWallet',
127+
TransferSameWallet = 'transferSameWallet',
128+
UnidentifiedBoleto = 'unidentifiedBoleto'
129+
}
130+
}

src/typings/checkout/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ let enumsMap: {[index: string]: any} = {
515515
"DragonpayDetails.TypeEnum": DragonpayDetails.TypeEnum,
516516
"EcontextVoucherDetails.TypeEnum": EcontextVoucherDetails.TypeEnum,
517517
"EftDetails.TypeEnum": EftDetails.TypeEnum,
518+
"FundRecipient.WalletPurposeEnum": FundRecipient.WalletPurposeEnum,
518519
"GenericIssuerPaymentMethodDetails.TypeEnum": GenericIssuerPaymentMethodDetails.TypeEnum,
519520
"GiropayDetails.TypeEnum": GiropayDetails.TypeEnum,
520521
"GooglePayDetails.FundingSourceEnum": GooglePayDetails.FundingSourceEnum,

0 commit comments

Comments
 (0)