Skip to content

Commit 3a6e350

Browse files
AdyenAutomationBotAdyenAutomationBotDjoykeAbyah
authored
Code generation: update services and models (#1461)
* [reformat][adyen-sdk-automation] automated change * style(fmt): code formatted * Update transferRoute.ts removed faulty import statement * removed redundant SurchargeType --------- Co-authored-by: AdyenAutomationBot <Adyen Automation [email protected]> Co-authored-by: Djoyke Reijans <[email protected]>
1 parent 29a7290 commit 3a6e350

34 files changed

+517
-95
lines changed

src/__tests__/binLookup.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ describe("Bin Lookup", function (): void {
8181
value: 10
8282
},
8383
resultCode: "Unsupported",
84-
surchargeType: "ZERO"
8584
};
8685
const costEstimateRequest: binlookup.CostEstimateRequest = {
8786
amount: { currency: "EUR", value: 1000 },

src/services/balancePlatform/grantAccountsApi.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export class GrantAccountsApi extends Service {
3232
* @param id {@link string } The unique identifier of the grant account.
3333
* @param requestOptions {@link IRequest.Options }
3434
* @return {@link CapitalGrantAccount }
35+
*
36+
* @deprecated since Configuration API v2
37+
* Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead.
3538
*/
3639
public async getGrantAccount(id: string, requestOptions?: IRequest.Options): Promise<CapitalGrantAccount> {
3740
const endpoint = `${this.baseUrl}/grantAccounts/{id}`

src/services/balancePlatform/grantOffersApi.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export class GrantOffersApi extends Service {
3333
* @param requestOptions {@link IRequest.Options }
3434
* @param accountHolderId {@link string } The unique identifier of the grant account.
3535
* @return {@link GrantOffers }
36+
*
37+
* @deprecated since Configuration API v2
38+
* Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead.
3639
*/
3740
public async getAllAvailableGrantOffers(accountHolderId?: string, requestOptions?: IRequest.Options): Promise<GrantOffers> {
3841
const endpoint = `${this.baseUrl}/grantOffers`;
@@ -56,6 +59,9 @@ export class GrantOffersApi extends Service {
5659
* @param grantOfferId {@link string } The unique identifier of the grant offer.
5760
* @param requestOptions {@link IRequest.Options }
5861
* @return {@link GrantOffer }
62+
*
63+
* @deprecated since Configuration API v2
64+
* Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead.
5965
*/
6066
public async getGrantOffer(grantOfferId: string, requestOptions?: IRequest.Options): Promise<GrantOffer> {
6167
const endpoint = `${this.baseUrl}/grantOffers/{grantOfferId}`

src/services/balancePlatform/manageSCADevicesApi.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import getJsonResponse from "../../helpers/getJsonResponse";
1111
import Service from "../../service";
1212
import Client from "../../client";
1313
import {
14+
AssociationFinaliseRequest,
15+
AssociationFinaliseResponse,
16+
AssociationInitiateRequest,
17+
AssociationInitiateResponse,
1418
RegisterSCAFinalResponse,
1519
RegisterSCARequest,
1620
RegisterSCAResponse,
@@ -30,6 +34,26 @@ export class ManageSCADevicesApi extends Service {
3034
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
3135
}
3236

37+
/**
38+
* @summary Complete an association between an SCA device and a resource
39+
* @param deviceId {@link string } The unique identifier of the SCA device that you are associating with a resource.
40+
* @param associationFinaliseRequest {@link AssociationFinaliseRequest }
41+
* @param requestOptions {@link IRequest.Options }
42+
* @return {@link AssociationFinaliseResponse }
43+
*/
44+
public async completeAssociationBetweenScaDeviceAndResource(deviceId: string, associationFinaliseRequest: AssociationFinaliseRequest, requestOptions?: IRequest.Options): Promise<AssociationFinaliseResponse> {
45+
const endpoint = `${this.baseUrl}/registeredDevices/{deviceId}/associations`
46+
.replace("{" + "deviceId" + "}", encodeURIComponent(String(deviceId)));
47+
const resource = new Resource(this, endpoint);
48+
const request: AssociationFinaliseRequest = ObjectSerializer.serialize(associationFinaliseRequest, "AssociationFinaliseRequest");
49+
const response = await getJsonResponse<AssociationFinaliseRequest, AssociationFinaliseResponse>(
50+
resource,
51+
request,
52+
{ ...requestOptions, method: "PATCH" }
53+
);
54+
return ObjectSerializer.deserialize(response, "AssociationFinaliseResponse");
55+
}
56+
3357
/**
3458
* @summary Complete the registration of an SCA device
3559
* @param id {@link string } The unique identifier of the SCA device. You obtain this &#x60;id&#x60; in the response of a POST&amp;nbsp;[/registeredDevices](https://docs.adyen.com/api-explorer/balanceplatform/2/post/registeredDevices#responses-200-id) request.
@@ -73,6 +97,26 @@ export class ManageSCADevicesApi extends Service {
7397
);
7498
}
7599

100+
/**
101+
* @summary Initiate an association between an SCA device and a resource
102+
* @param deviceId {@link string } The unique identifier of the SCA device that you are associating with a resource.
103+
* @param associationInitiateRequest {@link AssociationInitiateRequest }
104+
* @param requestOptions {@link IRequest.Options }
105+
* @return {@link AssociationInitiateResponse }
106+
*/
107+
public async initiateAssociationBetweenScaDeviceAndResource(deviceId: string, associationInitiateRequest: AssociationInitiateRequest, requestOptions?: IRequest.Options): Promise<AssociationInitiateResponse> {
108+
const endpoint = `${this.baseUrl}/registeredDevices/{deviceId}/associations`
109+
.replace("{" + "deviceId" + "}", encodeURIComponent(String(deviceId)));
110+
const resource = new Resource(this, endpoint);
111+
const request: AssociationInitiateRequest = ObjectSerializer.serialize(associationInitiateRequest, "AssociationInitiateRequest");
112+
const response = await getJsonResponse<AssociationInitiateRequest, AssociationInitiateResponse>(
113+
resource,
114+
request,
115+
{ ...requestOptions, method: "POST" }
116+
);
117+
return ObjectSerializer.deserialize(response, "AssociationInitiateResponse");
118+
}
119+
76120
/**
77121
* @summary Initiate the registration of an SCA device
78122
* @param registerSCARequest {@link RegisterSCARequest }

src/services/transfers/capitalApi.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export class CapitalApi extends Service {
3434
* @param requestOptions {@link IRequest.Options }
3535
* @param counterpartyAccountHolderId {@link string } The counterparty account holder id.
3636
* @return {@link CapitalGrants }
37+
*
38+
* @deprecated since Transfers API v4
39+
* Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead.
3740
*/
3841
public async getCapitalAccount(counterpartyAccountHolderId?: string, requestOptions?: IRequest.Options): Promise<CapitalGrants> {
3942
const endpoint = `${this.baseUrl}/grants`;
@@ -57,6 +60,9 @@ export class CapitalApi extends Service {
5760
* @param id {@link string } The unique identifier of the grant.
5861
* @param requestOptions {@link IRequest.Options }
5962
* @return {@link CapitalGrant }
63+
*
64+
* @deprecated since Transfers API v4
65+
* Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead.
6066
*/
6167
public async getGrantReferenceDetails(id: string, requestOptions?: IRequest.Options): Promise<CapitalGrant> {
6268
const endpoint = `${this.baseUrl}/grants/{id}`
@@ -75,6 +81,9 @@ export class CapitalApi extends Service {
7581
* @param capitalGrantInfo {@link CapitalGrantInfo }
7682
* @param requestOptions {@link IRequest.Options }
7783
* @return {@link CapitalGrant }
84+
*
85+
* @deprecated since Transfers API v4
86+
* Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead.
7887
*/
7988
public async requestGrantPayout(capitalGrantInfo: CapitalGrantInfo, requestOptions?: IRequest.Options): Promise<CapitalGrant> {
8089
const endpoint = `${this.baseUrl}/grants`;

src/typings/acsWebhooks/challengeInfo.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
export class ChallengeInfo {
1212
/**
13-
* Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata).
13+
* Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK.
1414
*/
1515
'challengeCancel'?: ChallengeInfo.ChallengeCancelEnum;
1616
/**
@@ -75,13 +75,15 @@ export class ChallengeInfo {
7575

7676
export namespace ChallengeInfo {
7777
export enum ChallengeCancelEnum {
78+
_00 = '00',
7879
_01 = '01',
7980
_02 = '02',
8081
_03 = '03',
8182
_04 = '04',
8283
_05 = '05',
8384
_06 = '06',
84-
_07 = '07'
85+
_07 = '07',
86+
_08 = '08'
8587
}
8688
export enum FlowEnum {
8789
OtpSms = 'OTP_SMS',

src/typings/balancePlatform/accountHolder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class AccountHolder {
5353
*/
5454
'reference'?: string;
5555
/**
56-
* The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
56+
* The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed.
5757
*/
5858
'status'?: AccountHolder.StatusEnum;
5959
/**

src/typings/balancePlatform/accountHolderUpdateRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class AccountHolderUpdateRequest {
4545
*/
4646
'reference'?: string;
4747
/**
48-
* The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **suspended**: The account holder is permanently deactivated by Adyen. This action cannot be undone. * **closed**: The account holder is permanently deactivated by you. This action cannot be undone.
48+
* The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed.
4949
*/
5050
'status'?: AccountHolderUpdateRequest.StatusEnum;
5151
/**
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 AssociationDelegatedAuthenticationData {
12+
/**
13+
* A base64-encoded block with the data required to authenticate the request. You obtain this information by using our authentication SDK.
14+
*/
15+
'sdkOutput': string;
16+
17+
static discriminator: string | undefined = undefined;
18+
19+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
20+
{
21+
"name": "sdkOutput",
22+
"baseName": "sdkOutput",
23+
"type": "string"
24+
} ];
25+
26+
static getAttributeTypeMap() {
27+
return AssociationDelegatedAuthenticationData.attributeTypeMap;
28+
}
29+
}
30+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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 { AssociationDelegatedAuthenticationData } from './associationDelegatedAuthenticationData';
11+
12+
export class AssociationFinaliseRequest {
13+
/**
14+
* The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings.
15+
*/
16+
'ids': Array<string>;
17+
'strongCustomerAuthentication': AssociationDelegatedAuthenticationData;
18+
/**
19+
* The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument**
20+
*/
21+
'type': AssociationFinaliseRequest.TypeEnum;
22+
23+
static discriminator: string | undefined = undefined;
24+
25+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
26+
{
27+
"name": "ids",
28+
"baseName": "ids",
29+
"type": "Array<string>"
30+
},
31+
{
32+
"name": "strongCustomerAuthentication",
33+
"baseName": "strongCustomerAuthentication",
34+
"type": "AssociationDelegatedAuthenticationData"
35+
},
36+
{
37+
"name": "type",
38+
"baseName": "type",
39+
"type": "AssociationFinaliseRequest.TypeEnum"
40+
} ];
41+
42+
static getAttributeTypeMap() {
43+
return AssociationFinaliseRequest.attributeTypeMap;
44+
}
45+
}
46+
47+
export namespace AssociationFinaliseRequest {
48+
export enum TypeEnum {
49+
PaymentInstrument = 'PaymentInstrument'
50+
}
51+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 AssociationFinaliseResponse {
12+
/**
13+
* The unique identifier of the SCA device you associated with a resource.
14+
*/
15+
'deviceId'?: string;
16+
/**
17+
* The list of unique identifiers of the resources that you associated with the SCA device.
18+
*/
19+
'ids'?: Array<string>;
20+
/**
21+
* The type of resource that you associated with the SCA device.
22+
*/
23+
'type': AssociationFinaliseResponse.TypeEnum;
24+
25+
static discriminator: string | undefined = undefined;
26+
27+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
28+
{
29+
"name": "deviceId",
30+
"baseName": "deviceId",
31+
"type": "string"
32+
},
33+
{
34+
"name": "ids",
35+
"baseName": "ids",
36+
"type": "Array<string>"
37+
},
38+
{
39+
"name": "type",
40+
"baseName": "type",
41+
"type": "AssociationFinaliseResponse.TypeEnum"
42+
} ];
43+
44+
static getAttributeTypeMap() {
45+
return AssociationFinaliseResponse.attributeTypeMap;
46+
}
47+
}
48+
49+
export namespace AssociationFinaliseResponse {
50+
export enum TypeEnum {
51+
PaymentInstrument = 'PAYMENT_INSTRUMENT'
52+
}
53+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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 AssociationInitiateRequest {
12+
/**
13+
* The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings.
14+
*/
15+
'ids': Array<string>;
16+
/**
17+
* The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument**
18+
*/
19+
'type': AssociationInitiateRequest.TypeEnum;
20+
21+
static discriminator: string | undefined = undefined;
22+
23+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
24+
{
25+
"name": "ids",
26+
"baseName": "ids",
27+
"type": "Array<string>"
28+
},
29+
{
30+
"name": "type",
31+
"baseName": "type",
32+
"type": "AssociationInitiateRequest.TypeEnum"
33+
} ];
34+
35+
static getAttributeTypeMap() {
36+
return AssociationInitiateRequest.attributeTypeMap;
37+
}
38+
}
39+
40+
export namespace AssociationInitiateRequest {
41+
export enum TypeEnum {
42+
PaymentInstrument = 'PaymentInstrument'
43+
}
44+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 AssociationInitiateResponse {
12+
/**
13+
* A string that you must pass to the authentication SDK to continue with the association process.
14+
*/
15+
'sdkInput'?: string;
16+
17+
static discriminator: string | undefined = undefined;
18+
19+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
20+
{
21+
"name": "sdkInput",
22+
"baseName": "sdkInput",
23+
"type": "string"
24+
} ];
25+
26+
static getAttributeTypeMap() {
27+
return AssociationInitiateResponse.attributeTypeMap;
28+
}
29+
}
30+

0 commit comments

Comments
 (0)