Skip to content

Commit

Permalink
feat(enums): update the EventName enum
Browse files Browse the repository at this point in the history
  • Loading branch information
meriamBenSassi committed Mar 15, 2021
1 parent d8a1bbf commit 14609bb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
27 changes: 17 additions & 10 deletions src/core/ServiceAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,22 @@ export class ServiceAccount {
*/
private readonly requestBuilder: RequestBuilder;

constructor(baseUrl: string, params: IServiceAccount, options?: { apiVersion?: number; }) {
constructor(baseUrl: string, params: IServiceAccount, options?: { apiVersion?: number }) {
this.id = params.id;
this.clientId = params.clientId;
this.clientSecret = params.clientSecret;
this.createdAt = new Date(params.createdAt);
this.subscriptions = [];
this.requestBuilder = new RequestBuilder(baseUrl, {
clientId: params.clientId,
clientSecret: params.clientSecret,
}, {
version: options?.apiVersion,
});
this.requestBuilder = new RequestBuilder(
baseUrl,
{
clientId: params.clientId,
clientSecret: params.clientSecret,
},
{
version: options?.apiVersion,
},
);
this.config = params.config;
}

Expand All @@ -74,9 +78,12 @@ export class ServiceAccount {
url: '/v1/service-accounts',
});

return serviceAccounts.map((sa: IServiceAccount) => new ServiceAccount(baseUrl, sa, {
apiVersion: requestBuilder.apiVersion,
}));
return serviceAccounts.map(
(sa: IServiceAccount) =>
new ServiceAccount(baseUrl, sa, {
apiVersion: requestBuilder.apiVersion,
}),
);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/lib/Algoan.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export enum EventName {
KYC_OTHERS_LINK_REQUIRED = 'kyc_others_link_required',
KYC_OTHERS_COMPLETED = 'kyc_others_completed',
KYC_OTHERS_CONFIGURATION_REQUIRED = 'kyc_others_configuration_required',

// V2 events
AGGREGATOR_LINK_REQUIRED = 'aggregator_link_required',
BANK_DETAILS_REQUIRED = 'bank_details_required',
}

/**
Expand Down

0 comments on commit 14609bb

Please sign in to comment.