@spritz-finance/service-client 0.2.52 → 0.2.53
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { CheckbookUser } from './lib/graphClient/generated';
|
|
2
|
+
import { CheckbookUser, CreateDirectPaymentInput, DirectPayment } from './lib/graphClient/generated';
|
|
3
3
|
import { ExternalBillInput } from './payableAccountsServiceClient';
|
|
4
4
|
export declare enum RewardProvider {
|
|
5
5
|
INTERNAL = "INTERNAL",
|
|
@@ -182,6 +182,10 @@ export declare type CreateCheckbookUserParams = {
|
|
|
182
182
|
countryCode?: string;
|
|
183
183
|
};
|
|
184
184
|
};
|
|
185
|
+
export interface CreateDirectPaymentArgs extends CreateDirectPaymentInput {
|
|
186
|
+
userId: string;
|
|
187
|
+
noFees?: boolean;
|
|
188
|
+
}
|
|
185
189
|
export declare class LiabilitiesServiceClient {
|
|
186
190
|
client: AxiosInstance;
|
|
187
191
|
constructor();
|
|
@@ -195,6 +199,7 @@ export declare class LiabilitiesServiceClient {
|
|
|
195
199
|
getVirtualCardBalance(cardExternalId: string, userId: string): Promise<number>;
|
|
196
200
|
getVirtualCardTransactions(cardExternalId: string, userId: string): Promise<CardTransaction[]>;
|
|
197
201
|
canUserMakeTestPayment(userId: string): Promise<boolean>;
|
|
202
|
+
createDirectPayment(args: CreateDirectPaymentArgs): Promise<DirectPayment>;
|
|
198
203
|
getValidPaymentsForAccount(accountId: string): Promise<Payment[]>;
|
|
199
204
|
}
|
|
200
205
|
export {};
|
|
@@ -82,6 +82,11 @@ class LiabilitiesServiceClient {
|
|
|
82
82
|
.get(`/direct-payments/test-payment-available/user/${userId}`)
|
|
83
83
|
.then((res) => res.data);
|
|
84
84
|
}
|
|
85
|
+
async createDirectPayment(args) {
|
|
86
|
+
return this.client
|
|
87
|
+
.post(`/direct-payments`, args)
|
|
88
|
+
.then((res) => res.data);
|
|
89
|
+
}
|
|
85
90
|
async getValidPaymentsForAccount(accountId) {
|
|
86
91
|
return this.client
|
|
87
92
|
.get(`/payments/valid-payments/account/${accountId}`)
|