@spritz-finance/service-client 0.2.18 → 0.2.20
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.
|
@@ -16,12 +16,20 @@ export declare type CheckbookAccountInput = {
|
|
|
16
16
|
ownedByUser?: boolean;
|
|
17
17
|
type: BankAccountSubType;
|
|
18
18
|
};
|
|
19
|
+
declare type VirtualCardDetails = {
|
|
20
|
+
number: string;
|
|
21
|
+
cvv: string;
|
|
22
|
+
expirationMonth: string;
|
|
23
|
+
expirationYear: string;
|
|
24
|
+
};
|
|
19
25
|
declare type PayableAccountTypename = {
|
|
20
26
|
__t: PayableAccountType;
|
|
21
27
|
};
|
|
22
28
|
declare type BankAcountModel = Omit<BankAccount, 'type'> & PayableAccountTypename;
|
|
23
29
|
declare type VirtualCardModel = Omit<VirtualCard, 'type'> & PayableAccountTypename;
|
|
24
30
|
export declare type PayableAccount = BankAcountModel | VirtualCardModel;
|
|
31
|
+
export declare type PayableAccountBankAccount = BankAcountModel;
|
|
32
|
+
export declare type PayableAccountVirtualCard = VirtualCardModel;
|
|
25
33
|
export declare class PayableAccountsServiceClient {
|
|
26
34
|
client: AxiosInstance;
|
|
27
35
|
constructor();
|
|
@@ -32,5 +40,6 @@ export declare class PayableAccountsServiceClient {
|
|
|
32
40
|
getAccounts(accountIds: string[]): Promise<PayableAccount[]>;
|
|
33
41
|
createFromCheckbook(input: CheckbookAccountInput): Promise<BankAcountModel>;
|
|
34
42
|
createCardFromCheckbook(input: CheckbookCardResponse): Promise<VirtualCardModel>;
|
|
43
|
+
getVirtualCardDetails(accountId: string): Promise<VirtualCardDetails>;
|
|
35
44
|
}
|
|
36
45
|
export {};
|
|
@@ -50,5 +50,10 @@ class PayableAccountsServiceClient {
|
|
|
50
50
|
.post(`/create-card-from-checkbook`, input)
|
|
51
51
|
.then((res) => res.data);
|
|
52
52
|
}
|
|
53
|
+
async getVirtualCardDetails(accountId) {
|
|
54
|
+
return this.client
|
|
55
|
+
.get(`/virtual-card/${accountId}/details`)
|
|
56
|
+
.then((res) => res.data);
|
|
57
|
+
}
|
|
53
58
|
}
|
|
54
59
|
exports.PayableAccountsServiceClient = PayableAccountsServiceClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spritz-finance/service-client",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"description": "Service client",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"coverageDirectory": "../coverage",
|
|
52
52
|
"testEnvironment": "node"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "2e258425593941e55e5f4ffbccdda4bca4a25ca4"
|
|
55
55
|
}
|