@fiado/api-invoker 1.2.54 → 1.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/centralPayments/CentralPaymentsConnectorApi.d.ts +1 -1
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +3 -2
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +1 -1
- package/package.json +1 -1
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +3 -2
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +1 -1
|
@@ -28,7 +28,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
28
28
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
29
29
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
30
30
|
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
31
|
-
getCardsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
31
|
+
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
32
32
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
33
33
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
34
34
|
deleteCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
@@ -93,9 +93,10 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
93
93
|
const url = `${this.baseUrl}/cards/cardholders/${externalUserId}/secondary`;
|
|
94
94
|
return await this.httpRequest.put(url);
|
|
95
95
|
}
|
|
96
|
-
async getCardsByUserId(externalUserId) {
|
|
96
|
+
async getCardsByUserId(externalUserId, includeSecondary) {
|
|
97
97
|
const url = `${this.baseUrl}/cards/cardholders/${externalUserId}`;
|
|
98
|
-
|
|
98
|
+
const param = includeSecondary ? `?includeSecondary=${includeSecondary}` : null;
|
|
99
|
+
return await this.httpRequest.get(`${url}${param ?? ""}`);
|
|
99
100
|
}
|
|
100
101
|
async generateCardsInBatch(request) {
|
|
101
102
|
const url = `${this.baseUrl}/cards/batch`;
|
|
@@ -21,7 +21,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
21
21
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
22
22
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
23
23
|
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
24
|
-
getCardsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
24
|
+
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
25
25
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
26
26
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
27
27
|
deleteCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.55",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -133,9 +133,10 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
133
133
|
return await this.httpRequest.put(url);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
async getCardsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>> {
|
|
136
|
+
async getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>> {
|
|
137
137
|
const url = `${this.baseUrl}/cards/cardholders/${externalUserId}`;
|
|
138
|
-
|
|
138
|
+
const param = includeSecondary ? `?includeSecondary=${includeSecondary}` : null;
|
|
139
|
+
return await this.httpRequest.get(`${url}${param ?? ""}`);
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
async generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>> {
|
|
@@ -64,7 +64,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
64
64
|
|
|
65
65
|
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
66
66
|
|
|
67
|
-
getCardsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
67
|
+
getCardsByUserId(externalUserId: string, includeSecondary?: boolean): Promise<FiadoApiResponse<GetBankAccountCardResponse[]>>;
|
|
68
68
|
|
|
69
69
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
70
70
|
|