@spritz-finance/service-client 0.2.14 → 0.2.16

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,6 +16,25 @@ export declare enum RewardCreditSource {
16
16
  OTHER = "OTHER",
17
17
  REVENUE_SHARE = "REVENUE_SHARE"
18
18
  }
19
+ declare type CheckbookCardResponse = {
20
+ userId: string;
21
+ externalId: string;
22
+ mask: string;
23
+ renderSecret: string;
24
+ number: string;
25
+ cvv: string;
26
+ expiryYear: string;
27
+ expiryMonth: string;
28
+ address: {
29
+ line_1: string;
30
+ city: string;
31
+ state: string;
32
+ zip: string;
33
+ };
34
+ phone: string;
35
+ email: string;
36
+ holder: string;
37
+ };
19
38
  export interface RelatedCredit {
20
39
  creditId: string;
21
40
  amountSpent: number;
@@ -129,5 +148,6 @@ export declare class LiabilitiesServiceClient {
129
148
  constructor();
130
149
  getRewardTransaction(transactionId: string): Promise<RewardTransaction>;
131
150
  createMethodFiEntity(args: CreateEntityParams): Promise<MethodFiEntity>;
151
+ createCheckbookVirtualCard(userId: string): Promise<CheckbookCardResponse>;
132
152
  }
133
153
  export {};
@@ -39,5 +39,10 @@ class LiabilitiesServiceClient {
39
39
  .post(`/methodFi/entity`, args)
40
40
  .then((res) => res.data);
41
41
  }
42
+ async createCheckbookVirtualCard(userId) {
43
+ return this.client
44
+ .post(`/virtual-card/${userId}/create`)
45
+ .then((res) => res.data);
46
+ }
42
47
  }
43
48
  exports.LiabilitiesServiceClient = LiabilitiesServiceClient;
@@ -10,7 +10,7 @@ class UsersServiceClient {
10
10
  });
11
11
  }
12
12
  async getUserById(id) {
13
- return this.client.get(`/${id}`).then((res) => res.data);
13
+ return this.client.get(`/id/${id}`).then((res) => res.data);
14
14
  }
15
15
  async findOrInitialize(email) {
16
16
  return this.client
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -47,5 +47,5 @@
47
47
  "coverageDirectory": "../coverage",
48
48
  "testEnvironment": "node"
49
49
  },
50
- "gitHead": "c343bba7249906ccd73f2433a69ed3e33695d75e"
50
+ "gitHead": "e341b1cab0473f93d64fd6b6043fa426b079d813"
51
51
  }