Skip to content

Commit 96c8312

Browse files
authored
Merge branch 'main' into improve-issue-templates
2 parents 09419d1 + 2053aa8 commit 96c8312

37 files changed

+520
-97
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24.0.0
1+
25.0.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adyen/api-library",
3-
"version": "24.0.0",
3+
"version": "25.0.0",
44
"description": "The Adyen API Library for NodeJS enables you to work with Adyen APIs.",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",

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/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export { default as RecurringAPI } from "./recurringApi";
66
export { default as BinLookupAPI } from "./binLookupApi";
77
export { default as PayoutAPI } from "./payout";
88
export { default as Platforms } from "./platforms";
9+
export { default as PosMobileAPI } from "./posMobileApi";
910
export { default as StoredValueAPI} from "./storedValueApi";
1011
export { default as TerminalManagementAPI } from "./terminalManagementApi";
1112
export { default as ManagementAPI } from "./management";

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
/**

0 commit comments

Comments
 (0)