Skip to content

Commit 443fef5

Browse files
AdyenAutomationBotAdyenAutomationBotDjoykeAbyah
authored
Update all services (#1347)
* [reformat][adyen-sdk-automation] automated change * style(fmt): code formatted * Update transferRoute.ts removed import statement --------- Co-authored-by: AdyenAutomationBot <Adyen Automation [email protected]> Co-authored-by: Djoyke Reijans <[email protected]>
1 parent 862742e commit 443fef5

File tree

184 files changed

+2291
-918
lines changed

Some content is hidden

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

184 files changed

+2291
-918
lines changed

src/__tests__/httpClient.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ describe("HTTP Client", function (): void {
7979
const binLookupService = new BinLookupAPI(client);
8080
const scope = nock("https://pal-test.adyen.com/pal/servlet/BinLookup/v54", {
8181
reqheaders: {
82-
'Content-Type' : ApiConstants.APPLICATION_JSON_TYPE,
82+
"Content-Type" : ApiConstants.APPLICATION_JSON_TYPE,
8383
"foo" : "bar"
8484
},
8585
})
86-
.get('/')
87-
.reply(200)
86+
.get("/")
87+
.reply(200);
8888

8989
const threeDSAvailabilityRequest: binlookup.ThreeDSAvailabilityRequest = {
9090
merchantAccount: process.env.ADYEN_MERCHANT!,
@@ -95,7 +95,7 @@ describe("HTTP Client", function (): void {
9595
scope.post("/get3dsAvailability")
9696
.reply(200, threeDSAvailabilitySuccessResponse);
9797

98-
const requestOptions = { headers: { foo : "bar" }}
98+
const requestOptions = { headers: { foo : "bar" }};
9999
const response = await binLookupService.get3dsAvailability(threeDSAvailabilityRequest, requestOptions);
100100
expect(response).toEqual< binlookup.ThreeDSAvailabilityResponse>(threeDSAvailabilitySuccessResponse);
101101
});

src/services/balancePlatform/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { CardOrdersApi } from "./cardOrdersApi";
1414
import { GrantAccountsApi } from "./grantAccountsApi";
1515
import { GrantOffersApi } from "./grantOffersApi";
1616
import { ManageCardPINApi } from "./manageCardPINApi";
17+
import { ManageSCADevicesApi } from "./manageSCADevicesApi";
1718
import { NetworkTokensApi } from "./networkTokensApi";
1819
import { PaymentInstrumentGroupsApi } from "./paymentInstrumentGroupsApi";
1920
import { PaymentInstrumentsApi } from "./paymentInstrumentsApi";
@@ -58,6 +59,10 @@ export default class BalancePlatformAPI extends Service {
5859
return new ManageCardPINApi(this.client);
5960
}
6061

62+
public get ManageSCADevicesApi() {
63+
return new ManageSCADevicesApi(this.client);
64+
}
65+
6166
public get NetworkTokensApi() {
6267
return new NetworkTokensApi(this.client);
6368
}
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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+
RegisterSCAFinalResponse,
15+
RegisterSCARequest,
16+
RegisterSCAResponse,
17+
SearchRegisteredDevicesResponse,
18+
ObjectSerializer
19+
} from "../../typings/balancePlatform/models";
20+
import { IRequest } from "../../typings/requestOptions";
21+
import Resource from "../resource";
22+
23+
export class ManageSCADevicesApi extends Service {
24+
25+
private readonly API_BASEPATH: string = "https://balanceplatform-api-test.adyen.com/bcl/v2";
26+
private baseUrl: string;
27+
28+
public constructor(client: Client){
29+
super(client);
30+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
31+
}
32+
33+
/**
34+
* @summary Complete the registration of an SCA device
35+
* @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.
36+
* @param registerSCARequest {@link RegisterSCARequest }
37+
* @param requestOptions {@link IRequest.Options }
38+
* @return {@link RegisterSCAFinalResponse }
39+
*/
40+
public async completeRegistrationOfScaDevice(id: string, registerSCARequest: RegisterSCARequest, requestOptions?: IRequest.Options): Promise<RegisterSCAFinalResponse> {
41+
const endpoint = `${this.baseUrl}/registeredDevices/{id}`
42+
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
43+
const resource = new Resource(this, endpoint);
44+
const request: RegisterSCARequest = ObjectSerializer.serialize(registerSCARequest, "RegisterSCARequest");
45+
const response = await getJsonResponse<RegisterSCARequest, RegisterSCAFinalResponse>(
46+
resource,
47+
request,
48+
{ ...requestOptions, method: "PATCH" }
49+
);
50+
return ObjectSerializer.deserialize(response, "RegisterSCAFinalResponse");
51+
}
52+
53+
/**
54+
* @summary Delete a registration of an SCA device
55+
* @param id {@link string } The unique identifier of the SCA device.
56+
* @param requestOptions {@link IRequest.Options }
57+
* @param paymentInstrumentId {@link string } The unique identifier of the payment instrument linked to the SCA device.
58+
*/
59+
public async deleteRegistrationOfScaDevice(id: string, paymentInstrumentId?: string, requestOptions?: IRequest.Options): Promise<void> {
60+
const endpoint = `${this.baseUrl}/registeredDevices/{id}`
61+
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
62+
const resource = new Resource(this, endpoint);
63+
const hasDefinedQueryParams = paymentInstrumentId;
64+
if(hasDefinedQueryParams) {
65+
if(!requestOptions) requestOptions = {};
66+
if(!requestOptions.params) requestOptions.params = {};
67+
if(paymentInstrumentId) requestOptions.params["paymentInstrumentId"] = paymentInstrumentId;
68+
}
69+
await getJsonResponse<string, void>(
70+
resource,
71+
"",
72+
{ ...requestOptions, method: "DELETE" }
73+
);
74+
}
75+
76+
/**
77+
* @summary Initiate the registration of an SCA device
78+
* @param registerSCARequest {@link RegisterSCARequest }
79+
* @param requestOptions {@link IRequest.Options }
80+
* @return {@link RegisterSCAResponse }
81+
*/
82+
public async initiateRegistrationOfScaDevice(registerSCARequest: RegisterSCARequest, requestOptions?: IRequest.Options): Promise<RegisterSCAResponse> {
83+
const endpoint = `${this.baseUrl}/registeredDevices`;
84+
const resource = new Resource(this, endpoint);
85+
const request: RegisterSCARequest = ObjectSerializer.serialize(registerSCARequest, "RegisterSCARequest");
86+
const response = await getJsonResponse<RegisterSCARequest, RegisterSCAResponse>(
87+
resource,
88+
request,
89+
{ ...requestOptions, method: "POST" }
90+
);
91+
return ObjectSerializer.deserialize(response, "RegisterSCAResponse");
92+
}
93+
94+
/**
95+
* @summary Get a list of registered SCA devices
96+
* @param requestOptions {@link IRequest.Options }
97+
* @param paymentInstrumentId {@link string } The unique identifier of a payment instrument. It limits the returned list to SCA devices associated to this payment instrument.
98+
* @param pageNumber {@link number } The index of the page to retrieve. The index of the first page is 0 (zero). Default: 0.
99+
* @param pageSize {@link number } The number of items to have on a page. Default: 20. Maximum: 100.
100+
* @return {@link SearchRegisteredDevicesResponse }
101+
*/
102+
public async listRegisteredScaDevices(paymentInstrumentId?: string, pageNumber?: number, pageSize?: number, requestOptions?: IRequest.Options): Promise<SearchRegisteredDevicesResponse> {
103+
const endpoint = `${this.baseUrl}/registeredDevices`;
104+
const resource = new Resource(this, endpoint);
105+
const hasDefinedQueryParams = paymentInstrumentId ?? pageNumber ?? pageSize;
106+
if(hasDefinedQueryParams) {
107+
if(!requestOptions) requestOptions = {};
108+
if(!requestOptions.params) requestOptions.params = {};
109+
if(paymentInstrumentId) requestOptions.params["paymentInstrumentId"] = paymentInstrumentId;
110+
if(pageNumber) requestOptions.params["pageNumber"] = pageNumber;
111+
if(pageSize) requestOptions.params["pageSize"] = pageSize;
112+
}
113+
const response = await getJsonResponse<string, SearchRegisteredDevicesResponse>(
114+
resource,
115+
"",
116+
{ ...requestOptions, method: "GET" }
117+
);
118+
return ObjectSerializer.deserialize(response, "SearchRegisteredDevicesResponse");
119+
}
120+
}

src/services/legalEntityManagement/termsOfServiceApi.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class TermsOfServiceApi extends Service {
3434

3535
/**
3636
* @summary Accept Terms of Service
37-
* @param id {@link string } The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner.
37+
* @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.
3838
* @param termsofservicedocumentid {@link string } The unique identifier of the Terms of Service document.
3939
* @param acceptTermsOfServiceRequest {@link AcceptTermsOfServiceRequest }
4040
* @param requestOptions {@link IRequest.Options }
@@ -56,7 +56,7 @@ export class TermsOfServiceApi extends Service {
5656

5757
/**
5858
* @summary Get Terms of Service document
59-
* @param id {@link string } The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner.
59+
* @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.
6060
* @param getTermsOfServiceDocumentRequest {@link GetTermsOfServiceDocumentRequest }
6161
* @param requestOptions {@link IRequest.Options }
6262
* @return {@link GetTermsOfServiceDocumentResponse }
@@ -76,7 +76,7 @@ export class TermsOfServiceApi extends Service {
7676

7777
/**
7878
* @summary Get Terms of Service information for a legal entity
79-
* @param id {@link string } The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner.
79+
* @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.
8080
* @param requestOptions {@link IRequest.Options }
8181
* @return {@link GetTermsOfServiceAcceptanceInfosResponse }
8282
*/
@@ -94,7 +94,7 @@ export class TermsOfServiceApi extends Service {
9494

9595
/**
9696
* @summary Get Terms of Service status
97-
* @param id {@link string } The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner.
97+
* @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.
9898
* @param requestOptions {@link IRequest.Options }
9999
* @return {@link CalculateTermsOfServiceStatusResponse }
100100
*/

src/services/posMobileApi.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* The version of the OpenAPI document: v68
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 Client from "../client";
11+
import getJsonResponse from "../helpers/getJsonResponse";
12+
import Service from "../service";
13+
import { CreateSessionRequest } from "../typings/posMobile/models";
14+
import { CreateSessionResponse } from "../typings/posMobile/models";
15+
import { IRequest } from "../typings/requestOptions";
16+
import Resource from "./resource";
17+
import { ObjectSerializer } from "../typings/posMobile/models";
18+
19+
export class PosMobileAPI extends Service {
20+
21+
private readonly API_BASEPATH: string = "https://checkout-test.adyen.com/checkout/possdk/v68";
22+
private baseUrl: string;
23+
24+
public constructor(client: Client) {
25+
super(client);
26+
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
27+
}
28+
29+
/**
30+
* @summary Create a communication session
31+
* @param createSessionRequest {@link CreateSessionRequest }
32+
* @param requestOptions {@link IRequest.Options }
33+
* @return {@link CreateSessionResponse }
34+
*/
35+
public async createCommunicationSession(createSessionRequest: CreateSessionRequest, requestOptions?: IRequest.Options): Promise<CreateSessionResponse> {
36+
const endpoint = `${this.baseUrl}/sessions`;
37+
const resource = new Resource(this, endpoint);
38+
const request: CreateSessionRequest = ObjectSerializer.serialize(createSessionRequest, "CreateSessionRequest");
39+
const response = await getJsonResponse<CreateSessionRequest, CreateSessionResponse>(
40+
resource,
41+
request,
42+
{ ...requestOptions, method: "POST" }
43+
);
44+
return ObjectSerializer.deserialize(response, "CreateSessionResponse");
45+
}
46+
}
47+
48+
export default PosMobileAPI;

src/typings/balancePlatform/aULocalAccountIdentification.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ export class AULocalAccountIdentification {
1818
*/
1919
'bsbCode': string;
2020
/**
21-
* The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**.
22-
*/
23-
'formFactor'?: string | null;
24-
/**
2521
* **auLocal**
2622
*/
2723
'type': AULocalAccountIdentification.TypeEnum;
@@ -39,11 +35,6 @@ export class AULocalAccountIdentification {
3935
"baseName": "bsbCode",
4036
"type": "string"
4137
},
42-
{
43-
"name": "formFactor",
44-
"baseName": "formFactor",
45-
"type": "string | null"
46-
},
4738
{
4839
"name": "type",
4940
"baseName": "type",

src/typings/balancePlatform/accountHolder.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class AccountHolder {
2222
'capabilities'?: { [key: string]: AccountHolderCapability; };
2323
'contactDetails'?: ContactDetails;
2424
/**
25-
* Your description for the account holder, maximum 300 characters.
25+
* Your description for the account holder.
2626
*/
2727
'description'?: string;
2828
/**
@@ -46,11 +46,11 @@ export class AccountHolder {
4646
*/
4747
'primaryBalanceAccount'?: string;
4848
/**
49-
* Your reference for the account holder, maximum 150 characters.
49+
* Your reference for the account holder.
5050
*/
5151
'reference'?: string;
5252
/**
53-
* The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **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.
53+
* 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.
5454
*/
5555
'status'?: AccountHolder.StatusEnum;
5656
/**
@@ -140,7 +140,6 @@ export namespace AccountHolder {
140140
export enum StatusEnum {
141141
Active = 'active',
142142
Closed = 'closed',
143-
Inactive = 'inactive',
144143
Suspended = 'suspended'
145144
}
146145
}

src/typings/balancePlatform/accountHolderInfo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class AccountHolderInfo {
2121
'capabilities'?: { [key: string]: AccountHolderCapability; };
2222
'contactDetails'?: ContactDetails;
2323
/**
24-
* Your description for the account holder, maximum 300 characters.
24+
* Your description for the account holder.
2525
*/
2626
'description'?: string;
2727
/**
@@ -37,7 +37,7 @@ export class AccountHolderInfo {
3737
*/
3838
'migratedAccountHolderCode'?: string;
3939
/**
40-
* Your reference for the account holder, maximum 150 characters.
40+
* Your reference for the account holder.
4141
*/
4242
'reference'?: string;
4343
/**

src/typings/balancePlatform/accountHolderUpdateRequest.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class AccountHolderUpdateRequest {
2222
'capabilities'?: { [key: string]: AccountHolderCapability; };
2323
'contactDetails'?: ContactDetails;
2424
/**
25-
* Your description for the account holder, maximum 300 characters.
25+
* Your description for the account holder.
2626
*/
2727
'description'?: string;
2828
/**
@@ -38,11 +38,11 @@ export class AccountHolderUpdateRequest {
3838
*/
3939
'primaryBalanceAccount'?: string;
4040
/**
41-
* Your reference for the account holder, maximum 150 characters.
41+
* Your reference for the account holder.
4242
*/
4343
'reference'?: string;
4444
/**
45-
* The status of the account holder. Possible values: * **active**: The account holder is active. This is the default status when creating an account holder. * **inactive (Deprecated)**: The account holder is temporarily inactive due to missing KYC details. You can set the account back to active by providing the missing KYC details. * **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.
45+
* 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.
4646
*/
4747
'status'?: AccountHolderUpdateRequest.StatusEnum;
4848
/**
@@ -122,7 +122,6 @@ export namespace AccountHolderUpdateRequest {
122122
export enum StatusEnum {
123123
Active = 'active',
124124
Closed = 'closed',
125-
Inactive = 'inactive',
126125
Suspended = 'suspended'
127126
}
128127
}

src/typings/balancePlatform/bRLocalAccountIdentification.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export class BRLocalAccountIdentification {
2222
*/
2323
'branchNumber': string;
2424
/**
25-
* The form factor of the account. Possible values: **physical**, **virtual**. Default value: **physical**.
25+
* The 8-digit ISPB, with leading zeros.
2626
*/
27-
'formFactor'?: string | null;
27+
'ispb'?: string;
2828
/**
2929
* **brLocal**
3030
*/
@@ -49,9 +49,9 @@ export class BRLocalAccountIdentification {
4949
"type": "string"
5050
},
5151
{
52-
"name": "formFactor",
53-
"baseName": "formFactor",
54-
"type": "string | null"
52+
"name": "ispb",
53+
"baseName": "ispb",
54+
"type": "string"
5555
},
5656
{
5757
"name": "type",

0 commit comments

Comments
 (0)