Skip to content

Commit b8e6e2c

Browse files
authored
Merge pull request #1602 from Adyen/sdk-automation/legalentitymanagement
[legalentitymanagement] Code generation: update services and models
2 parents 4016eaf + 0a45a0f commit b8e6e2c

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

src/__tests__/legalEntityManagement.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,28 @@ describe("Legal Entity Management", (): void => {
122122
expect(response.businessLines[0].sourceOfFunds?.adyenProcessedFunds).toBe(false);
123123
});
124124

125+
it("should support POST /legalEntities/{id}/requestPeriodicReview", async (): Promise<void> => {
126+
scope.post(`/legalEntities/${id}/requestPeriodicReview`)
127+
.reply(200);
128+
129+
await expect(legalEntityManagement.LegalEntitiesApi.requestPeriodicReview(id)).resolves.not.toThrow();
130+
});
131+
132+
it("should support POST /legalEntities/{id}/confirmDataReview", async (): Promise<void> => {
133+
const dataReviewResponse: models.DataReviewConfirmationResponse = {
134+
dataReviewedAt: "2023-11-13T15:19:02Z"
135+
};
136+
137+
scope.post(`/legalEntities/${id}/confirmDataReview`)
138+
.reply(200, dataReviewResponse);
139+
140+
const response: models.DataReviewConfirmationResponse = await legalEntityManagement.LegalEntitiesApi.confirmDataReview(id);
141+
142+
expect(response.dataReviewedAt).toBe("2023-11-13T15:19:02Z");
143+
});
144+
145+
146+
125147
});
126148

127149
describe("Transfer Instruments", (): void => {

src/services/legalEntityManagement/legalEntitiesApi.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,24 @@ export class LegalEntitiesApi extends Service {
135135
return ObjectSerializer.deserialize(response, "LegalEntity");
136136
}
137137

138+
/**
139+
* @summary Request periodic data review.
140+
* @param id {@link string } The unique identifier of the legal entity.
141+
* @param requestOptions {@link IRequest.Options }
142+
* @return {@link void }
143+
*/
144+
public async requestPeriodicReview(id: string, requestOptions?: IRequest.Options): Promise<void> {
145+
const endpoint = `${this.baseUrl}/legalEntities/{id}/requestPeriodicReview`
146+
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
147+
const resource = new Resource(this, endpoint);
148+
149+
await getJsonResponse<string, void>(
150+
resource,
151+
"",
152+
{ ...requestOptions, method: "POST" }
153+
);
154+
}
155+
138156
/**
139157
* @summary Update a legal entity
140158
* @param id {@link string } The unique identifier of the legal entity.

src/typings/legalEntityManagement/financialReport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class FinancialReport {
2424
/**
2525
* The date the financial data were provided, in YYYY-MM-DD format.
2626
*/
27-
"dateOfFinancialData": string;
27+
"dateOfFinancialData"?: string;
2828
/**
2929
* The number of employees of the business.
3030
*/

src/typings/legalEntityManagement/getTermsOfServiceDocumentRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
export class GetTermsOfServiceDocumentRequest {
1212
/**
13-
* The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English.
13+
* The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible values: **en** for English or **fr** for French.
1414
*/
1515
"language": string;
1616
/**

src/typings/legalEntityManagement/support.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { PhoneNumber } from "./phoneNumber";
1212

1313
export class Support {
1414
/**
15-
* The support email address of the legal entity.
15+
* The support email address of the legal entity. Required if you have a platform setup.
1616
*/
1717
"email"?: string;
1818
"phone"?: PhoneNumber | null;

0 commit comments

Comments
 (0)