Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/services/legalEntityManagement/legalEntitiesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,24 @@ export class LegalEntitiesApi extends Service {
return ObjectSerializer.deserialize(response, "LegalEntity");
}

/**
* @summary Request periodic data review.
* @param id {@link string } The unique identifier of the legal entity.
* @param requestOptions {@link IRequest.Options }
* @return {@link void }
*/
public async requestPeriodicReview(id: string, requestOptions?: IRequest.Options): Promise<void> {
const endpoint = `${this.baseUrl}/legalEntities/{id}/requestPeriodicReview`
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line can be simplified for better readability. The string concatenation for the path parameter placeholder is unnecessary and can be a direct string literal. Additionally, String(id) is redundant since id is already a string. These appear to be artifacts from the code generator that could be improved.

Suggested change
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
.replace("{id}", encodeURIComponent(id));

const resource = new Resource(this, endpoint);

await getJsonResponse<string, void>(
resource,
"",
{ ...requestOptions, method: "POST" }
);
}

/**
* @summary Update a legal entity
* @param id {@link string } The unique identifier of the legal entity.
Expand Down
2 changes: 1 addition & 1 deletion src/typings/legalEntityManagement/financialReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class FinancialReport {
/**
* The date the financial data were provided, in YYYY-MM-DD format.
*/
"dateOfFinancialData": string;
"dateOfFinancialData"?: string;
/**
* The number of employees of the business.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

export class GetTermsOfServiceDocumentRequest {
/**
* 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.
* 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.
*/
"language": string;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/typings/legalEntityManagement/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { PhoneNumber } from "./phoneNumber";

export class Support {
/**
* The support email address of the legal entity.
* The support email address of the legal entity. Required if you have a platform setup.
*/
"email"?: string;
"phone"?: PhoneNumber | null;
Expand Down