@spritz-finance/service-client 0.3.130 → 0.3.131
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.
|
@@ -20,4 +20,9 @@ export declare function addPromotionCredit(input: {
|
|
|
20
20
|
amount: number;
|
|
21
21
|
code: string;
|
|
22
22
|
}): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<boolean>>;
|
|
23
|
+
export declare function addCashbackCredit(input: {
|
|
24
|
+
userId: string;
|
|
25
|
+
amount: number;
|
|
26
|
+
rewardId: string;
|
|
27
|
+
}): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<RewardTransaction>>;
|
|
23
28
|
export declare function getRewardTransactionsFor(userId: string): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<RewardTransaction[]>>;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getRewardTransactionsFor = exports.addPromotionCredit = exports.updateCheckbookVirtualCard = exports.getUserIdForDirectPayment = exports.getVirtualCardBalance = exports.createUSBillFromAccountNumber = exports.createCheckbookDigitalAccount = exports.createCheckbookDebitCard = exports.createCheckbookVirtualCard = exports.getCheckbookUser = exports.upsertCheckbookUser = exports.createCheckbookUser = exports.getMethodFiEntity = exports.createMethodFiEntity = exports.getRewardTransaction = exports.LiabilitiesClient = void 0;
|
|
26
|
+
exports.getRewardTransactionsFor = exports.addCashbackCredit = exports.addPromotionCredit = exports.updateCheckbookVirtualCard = exports.getUserIdForDirectPayment = exports.getVirtualCardBalance = exports.createUSBillFromAccountNumber = exports.createCheckbookDigitalAccount = exports.createCheckbookDebitCard = exports.createCheckbookVirtualCard = exports.getCheckbookUser = exports.upsertCheckbookUser = exports.createCheckbookUser = exports.getMethodFiEntity = exports.createMethodFiEntity = exports.getRewardTransaction = exports.LiabilitiesClient = void 0;
|
|
27
27
|
exports.LiabilitiesClient = __importStar(require("./liabilitiesServiceClient"));
|
|
28
28
|
const serviceClient_1 = require("../serviceClient");
|
|
29
29
|
const LIABILITIES_ENDPOINT = '/liabilities';
|
|
@@ -117,6 +117,12 @@ async function addPromotionCredit(input) {
|
|
|
117
117
|
.then((res) => res.data);
|
|
118
118
|
}
|
|
119
119
|
exports.addPromotionCredit = addPromotionCredit;
|
|
120
|
+
async function addCashbackCredit(input) {
|
|
121
|
+
return serviceClient_1.baseClient
|
|
122
|
+
.post(`${LIABILITIES_ENDPOINT}/rewards/cashback`, input)
|
|
123
|
+
.then((res) => res.data);
|
|
124
|
+
}
|
|
125
|
+
exports.addCashbackCredit = addCashbackCredit;
|
|
120
126
|
async function getRewardTransactionsFor(userId) {
|
|
121
127
|
return serviceClient_1.baseClient
|
|
122
128
|
.get(`${LIABILITIES_ENDPOINT}/rewards/user/${userId}/transactions`)
|