@chevre/domain
Version:
Chevre Domain Library for Node.js
28 lines (27 loc) • 1.58 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.createPointAwardIdentifier = createPointAwardIdentifier;
exports.createPointAwardPurposeIdentifier4reservation = createPointAwardPurposeIdentifier4reservation;
exports.createReturnPointAwardIdentifier = createReturnPointAwardIdentifier;
exports.createPayIdentifier = createPayIdentifier;
exports.createRefundIdentifier = createRefundIdentifier;
exports.createReturnMoneyTransferIdentifier = createReturnMoneyTransferIdentifier;
const util = require("util");
function createPointAwardIdentifier(params) {
return util.format('%s:%s:%s:%s', params.project.id, 'givePointAward', params.purpose.orderNumber, params.toLocation.identifier);
}
function createPointAwardPurposeIdentifier4reservation(params) {
return util.format('%s:%s:%s:%s:%s', params.project.id, 'givePointAward', params.assetTransaction.typeOf, params.reservation.id, params.toLocation.identifier);
}
function createReturnPointAwardIdentifier(params) {
return util.format('%s:%s:%s', params.project.id, 'returnPointAward', params.accountTransaction4givePointAward.transactionNumber);
}
function createPayIdentifier(params) {
return util.format('%s:%s:%s', params.project.id, 'pay', params.paymentMethodId);
}
function createRefundIdentifier(params) {
return util.format('%s:%s:%s', params.project.id, 'refund', params.paymentMethodId);
}
function createReturnMoneyTransferIdentifier(params) {
return util.format('%s:%s:%s', params.project.id, 'returnMoneyTransfer', params.depositTransaction.transactionNumber);
}
;