Skip to content

Commit 7ed4a20

Browse files
authored
Merge pull request #1544 from Adyen/lem-v4-generation
LEM v4
2 parents 9367eba + 996ea82 commit 7ed4a20

File tree

106 files changed

+472
-222
lines changed

Some content is hidden

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

106 files changed

+472
-222
lines changed

src/__mocks__/legalEntityManagement/responses.ts

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
export const businessLine = {
2-
"capability": "receivePayments",
3-
"id": "123456789",
4-
"industryCode": "123456789",
5-
"legalEntityId": "123456789",
6-
"salesChannels": ["string"],
7-
"sourceOfFunds": {
8-
"acquiringBusinessLineId": "string",
9-
"adyenProcessedFunds": false,
10-
"description": "string",
11-
"type": "business"
12-
},
13-
"webData": [{ "webAddress": "string" }],
14-
"webDataExemption": { "reason": "noOnlinePresence" }
2+
"service": "banking",
3+
"industryCode": "4531",
4+
"legalEntityId": "LE00000000000000000000001",
5+
"sourceOfFunds": {
6+
"adyenProcessedFunds": false,
7+
"description": "Funds from my flower shop business",
8+
"type": "business"
9+
},
10+
"webData": [
11+
{
12+
"webAddress": "https://www.adyen.com",
13+
"webAddressId": "SE322JV223222J5H8V87B3DHN"
14+
}
15+
],
16+
"id": "SE322KH223222F5GV2SQ924F6"
1517
};
1618

1719
export const document = {
@@ -235,21 +237,25 @@ export const legalEntityUnknownEnum = {
235237
};
236238

237239
export const businessLines = {
238-
"businessLines": [{
239-
"capability": "receivePayments",
240-
"id": "123456789",
241-
"industryCode": "123456789",
242-
"legalEntityId": "123456789",
243-
"salesChannels": ["string"],
244-
"sourceOfFunds": {
245-
"acquiringBusinessLineId": "string",
246-
"adyenProcessedFunds": false,
247-
"description": "string",
248-
"type": "business"
249-
},
250-
"webData": [{ "webAddress": "string" }],
251-
"webDataExemption": { "reason": "noOnlinePresence" }
252-
}]
240+
"businessLines": [
241+
businessLine,
242+
{
243+
"service": "paymentProcessing",
244+
"industryCode": "339E",
245+
"legalEntityId": "LE00000000000000000000001",
246+
"salesChannels": [
247+
"eCommerce",
248+
"ecomMoto"
249+
],
250+
"webData": [
251+
{
252+
"webAddress": "https://yoururl.com",
253+
"webAddressId": "SE908HJ723222F5GVGPNR55YH"
254+
}
255+
],
256+
"id": "SE322JV223222F5GVGPNRB9GJ"
257+
}
258+
]
253259
};
254260

255261
export const transferInstrument = {

src/__tests__/legalEntityManagement.spec.ts

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ beforeEach((): void => {
3333
nock.activate();
3434
}
3535
client = createClient();
36-
scope = nock("https://kyc-test.adyen.com/lem/v3");
36+
scope = nock("https://kyc-test.adyen.com/lem/v4");
3737
legalEntityManagement = new LegalEntityManagementAPI(client);
3838
});
3939

@@ -115,21 +115,11 @@ describe("Legal Entity Management", (): void => {
115115

116116
const response: models.BusinessLines = await legalEntityManagement.LegalEntitiesApi.getAllBusinessLinesUnderLegalEntity(id);
117117

118-
expect(response.businessLines).toEqual( [{
119-
"capability": "receivePayments",
120-
"id": "123456789",
121-
"industryCode": "123456789",
122-
"legalEntityId": "123456789",
123-
"salesChannels": ["string"],
124-
"sourceOfFunds": {
125-
"acquiringBusinessLineId": "string",
126-
"adyenProcessedFunds": false,
127-
"description": "string",
128-
"type": "business"
129-
},
130-
"webData": [{ "webAddress": "string" }],
131-
"webDataExemption": { "reason": "noOnlinePresence" }
132-
}]);
118+
expect(response.businessLines.length).toBe(2);
119+
expect(response.businessLines[0]).toBeTruthy;
120+
expect(response.businessLines[0].id).toBe("SE322KH223222F5GV2SQ924F6");
121+
expect(response.businessLines[0].industryCode).toBe("4531");
122+
expect(response.businessLines[0].sourceOfFunds?.adyenProcessedFunds).toBe(false);
133123
});
134124

135125
});
@@ -207,18 +197,16 @@ describe("Legal Entity Management", (): void => {
207197
.reply(200, businessLine);
208198

209199
const request: models.BusinessLineInfo = {
210-
capability: models.BusinessLineInfo.CapabilityEnum.ReceivePayments,
211200
industryCode: id,
212201
legalEntityId: id,
213202
service: models.BusinessLine.ServiceEnum.Banking
214203
};
215204

216205
const response: models.BusinessLine = await legalEntityManagement.BusinessLinesApi.createBusinessLine(request);
217206

218-
expect(response.id).toBe(id);
219-
expect(response.capability).toBe(models.BusinessLineInfo.CapabilityEnum.ReceivePayments);
220-
expect(response.industryCode).toBe(id);
221-
expect(response.legalEntityId).toBe(id);
207+
expect(response.id).toBe("SE322KH223222F5GV2SQ924F6");
208+
expect(response.industryCode).toBe("4531");
209+
expect(response.legalEntityId).toBe("LE00000000000000000000001");
222210
});
223211

224212
it("should support GET /businessLines/{id}", async (): Promise<void> => {
@@ -227,27 +215,25 @@ describe("Legal Entity Management", (): void => {
227215

228216
const response: models.BusinessLine = await legalEntityManagement.BusinessLinesApi.getBusinessLine(id);
229217

230-
expect(response.id).toBe(id);
231-
expect(response.capability).toBe("receivePayments");
218+
expect(response.id).toBe("SE322KH223222F5GV2SQ924F6");
219+
expect(response.service).toBe("banking");
232220
});
233221

234222
it("should support PATCH /businessLines/{id}", async (): Promise<void> => {
235223
scope.patch(`/businessLines/${id}`)
236224
.reply(200, businessLine);
237225

238226
const request: models.BusinessLineInfo = {
239-
capability: models.BusinessLineInfo.CapabilityEnum.ReceivePayments,
240227
industryCode: id,
241228
service: models.BusinessLine.ServiceEnum.Banking,
242229
legalEntityId: id
243230
};
244231

245232
const response: models.BusinessLine = await legalEntityManagement.BusinessLinesApi.updateBusinessLine(id, request);
246233

247-
expect(response.id).toBe(id);
248-
expect(response.capability).toBe(models.BusinessLineInfo.CapabilityEnum.ReceivePayments);
249-
expect(response.industryCode).toBe(id);
250-
expect(response.legalEntityId).toBe(id);
234+
expect(response.id).toBe("SE322KH223222F5GV2SQ924F6");
235+
expect(response.industryCode).toBe("4531");
236+
expect(response.legalEntityId).toBe("LE00000000000000000000001");
251237
});
252238
});
253239

src/services/legalEntityManagement/businessLinesApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The version of the OpenAPI document: v3
2+
* The version of the OpenAPI document: v4
33
*
44
*
55
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -24,7 +24,7 @@ import { BusinessLineInfoUpdate } from "../../typings/legalEntityManagement/mode
2424
*/
2525
export class BusinessLinesApi extends Service {
2626

27-
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
27+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v4";
2828
private baseUrl: string;
2929

3030
public constructor(client: Client){

src/services/legalEntityManagement/documentsApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The version of the OpenAPI document: v3
2+
* The version of the OpenAPI document: v4
33
*
44
*
55
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,7 +22,7 @@ import { Document } from "../../typings/legalEntityManagement/models";
2222
*/
2323
export class DocumentsApi extends Service {
2424

25-
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
25+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v4";
2626
private baseUrl: string;
2727

2828
public constructor(client: Client){

src/services/legalEntityManagement/hostedOnboardingApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The version of the OpenAPI document: v3
2+
* The version of the OpenAPI document: v4
33
*
44
*
55
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -25,7 +25,7 @@ import { OnboardingThemes } from "../../typings/legalEntityManagement/models";
2525
*/
2626
export class HostedOnboardingApi extends Service {
2727

28-
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
28+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v4";
2929
private baseUrl: string;
3030

3131
public constructor(client: Client){

src/services/legalEntityManagement/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The version of the OpenAPI document: v3
2+
* The version of the OpenAPI document: v4
33
*
44
*
55
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/services/legalEntityManagement/legalEntitiesApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The version of the OpenAPI document: v3
2+
* The version of the OpenAPI document: v4
33
*
44
*
55
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -27,7 +27,7 @@ import { VerificationErrors } from "../../typings/legalEntityManagement/models";
2727
*/
2828
export class LegalEntitiesApi extends Service {
2929

30-
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
30+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v4";
3131
private baseUrl: string;
3232

3333
public constructor(client: Client){

src/services/legalEntityManagement/pCIQuestionnairesApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The version of the OpenAPI document: v3
2+
* The version of the OpenAPI document: v4
33
*
44
*
55
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -29,7 +29,7 @@ import { PciSigningResponse } from "../../typings/legalEntityManagement/models";
2929
*/
3030
export class PCIQuestionnairesApi extends Service {
3131

32-
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
32+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v4";
3333
private baseUrl: string;
3434

3535
public constructor(client: Client){

src/services/legalEntityManagement/taxEDeliveryConsentApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The version of the OpenAPI document: v3
2+
* The version of the OpenAPI document: v4
33
*
44
*
55
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -23,7 +23,7 @@ import { SetTaxElectronicDeliveryConsentRequest } from "../../typings/legalEntit
2323
*/
2424
export class TaxEDeliveryConsentApi extends Service {
2525

26-
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
26+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v4";
2727
private baseUrl: string;
2828

2929
public constructor(client: Client){

src/services/legalEntityManagement/termsOfServiceApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The version of the OpenAPI document: v3
2+
* The version of the OpenAPI document: v4
33
*
44
*
55
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,7 +28,7 @@ import { GetTermsOfServiceDocumentResponse } from "../../typings/legalEntityMana
2828
*/
2929
export class TermsOfServiceApi extends Service {
3030

31-
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v3";
31+
private readonly API_BASEPATH: string = "https://kyc-test.adyen.com/lem/v4";
3232
private baseUrl: string;
3333

3434
public constructor(client: Client){

0 commit comments

Comments
 (0)