@spritz-finance/service-client 0.3.6 → 0.3.8
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.
|
@@ -35,7 +35,7 @@ async function createDirectPayment(args) {
|
|
|
35
35
|
exports.createDirectPayment = createDirectPayment;
|
|
36
36
|
async function validateDirectPayment(args) {
|
|
37
37
|
return serviceClient_1.baseClient
|
|
38
|
-
.post(
|
|
38
|
+
.post(`${PAYMENTS_ENDPOINT}/direct-payments`, {
|
|
39
39
|
...args,
|
|
40
40
|
validateOnly: true,
|
|
41
41
|
})
|
|
@@ -56,25 +56,25 @@ async function getValidPaymentsForUser(userId) {
|
|
|
56
56
|
exports.getValidPaymentsForUser = getValidPaymentsForUser;
|
|
57
57
|
async function getRewardTransactionVolume(args) {
|
|
58
58
|
return serviceClient_1.baseClient
|
|
59
|
-
.post(
|
|
59
|
+
.post(`${PAYMENTS_ENDPOINT}/payments/rewards/volume`, args)
|
|
60
60
|
.then((res) => res.data);
|
|
61
61
|
}
|
|
62
62
|
exports.getRewardTransactionVolume = getRewardTransactionVolume;
|
|
63
63
|
async function getRewardFeeAmount(args) {
|
|
64
64
|
return serviceClient_1.baseClient
|
|
65
|
-
.post(
|
|
65
|
+
.post(`${PAYMENTS_ENDPOINT}/payments/rewards/fees`, args)
|
|
66
66
|
.then((res) => res.data);
|
|
67
67
|
}
|
|
68
68
|
exports.getRewardFeeAmount = getRewardFeeAmount;
|
|
69
69
|
async function initializeExternalPayment(args) {
|
|
70
70
|
return serviceClient_1.baseClient
|
|
71
|
-
.post(
|
|
71
|
+
.post(`${PAYMENTS_ENDPOINT}/external-payment/initialize`, args)
|
|
72
72
|
.then((res) => res.data);
|
|
73
73
|
}
|
|
74
74
|
exports.initializeExternalPayment = initializeExternalPayment;
|
|
75
75
|
async function scheduleExternalPayment(args) {
|
|
76
76
|
return serviceClient_1.baseClient
|
|
77
|
-
.post(
|
|
77
|
+
.post(`${PAYMENTS_ENDPOINT}/external-payment/schedule`, args)
|
|
78
78
|
.then((res) => res.data);
|
|
79
79
|
}
|
|
80
80
|
exports.scheduleExternalPayment = scheduleExternalPayment;
|
|
@@ -29,7 +29,7 @@ const serviceClient_1 = require("../serviceClient");
|
|
|
29
29
|
const UNBLOCK_ENDPOINT = '/unblock';
|
|
30
30
|
async function requestOTP(userId) {
|
|
31
31
|
return serviceClient_1.baseClient
|
|
32
|
-
.get(
|
|
32
|
+
.get(`${UNBLOCK_ENDPOINT}/user/${userId}/request-otp`)
|
|
33
33
|
.then((res) => res.data);
|
|
34
34
|
}
|
|
35
35
|
exports.requestOTP = requestOTP;
|
|
@@ -29,7 +29,7 @@ const serviceClient_1 = require("../serviceClient");
|
|
|
29
29
|
const USERS_ENDPOINT = '/users';
|
|
30
30
|
async function getUserById(id) {
|
|
31
31
|
return serviceClient_1.baseClient
|
|
32
|
-
.get(
|
|
32
|
+
.get(`${USERS_ENDPOINT}/id/${id}`)
|
|
33
33
|
.then((res) => res.data);
|
|
34
34
|
}
|
|
35
35
|
exports.getUserById = getUserById;
|