@spritz-finance/service-client 0.2.44 → 0.2.45

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.
@@ -18,6 +18,22 @@ export declare enum RewardCreditSource {
18
18
  OTHER = "OTHER",
19
19
  REVENUE_SHARE = "REVENUE_SHARE"
20
20
  }
21
+ declare type Payment = {
22
+ _id: string;
23
+ accountId: string;
24
+ amount: number;
25
+ createdAt: string;
26
+ directPaymentId: string;
27
+ feeAmount: number;
28
+ id: string;
29
+ paymentProvider: string;
30
+ rewardsAmount: number;
31
+ status: string;
32
+ subscriptionId: string | null;
33
+ type: string;
34
+ updatedAt: string;
35
+ userId: string;
36
+ };
21
37
  export declare type CheckbookCardResponse = {
22
38
  userId: string;
23
39
  externalId: string;
@@ -179,5 +195,6 @@ export declare class LiabilitiesServiceClient {
179
195
  getVirtualCardBalance(cardExternalId: string, userId: string): Promise<number>;
180
196
  getVirtualCardTransactions(cardExternalId: string, userId: string): Promise<CardTransaction[]>;
181
197
  canUserMakeTestPayment(userId: string): Promise<boolean>;
198
+ getValidPaymentsForAccount(accountId: string): Promise<Payment[]>;
182
199
  }
183
200
  export {};
@@ -82,5 +82,10 @@ class LiabilitiesServiceClient {
82
82
  .get(`/direct-payments/test-payment-available/user/${userId}`)
83
83
  .then((res) => res.data);
84
84
  }
85
+ async getValidPaymentsForAccount(accountId) {
86
+ return this.client
87
+ .get(`/payments/valid-payments/account/${accountId}`)
88
+ .then((res) => res.data);
89
+ }
85
90
  }
86
91
  exports.LiabilitiesServiceClient = LiabilitiesServiceClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.2.44",
3
+ "version": "0.2.45",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",