UNPKG

@eagleeye-solutions/integration-events-common

Version:
19 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTransactionAttributesFromWalletTransactionEntityCreateFulfil = getTransactionAttributesFromWalletTransactionEntityCreateFulfil; const date_fns_1 = require("date-fns"); const common_1 = require("./common"); const create_common_1 = require("./create-common"); function getTransactionAttributesFromWalletTransactionEntityCreateFulfil(entity) { const transactionAttributes = { storeLocation: (0, common_1.getStoreLocationAttributes)(entity), products: (0, create_common_1.getProductAttributes)(entity), totalBasketValueAfterDiscount: (0, create_common_1.getTotalBasketValueAfterDiscount)(entity), discountsReceived: (0, create_common_1.getDiscountsReceived)(entity), totalPointsEarned: (0, create_common_1.getTotalPointsEarned)(entity), transactionReference: entity.objectValue.reference, transactionDate: (0, date_fns_1.parseISO)(entity.objectValue.transactionDateTime), }; return transactionAttributes; } //# sourceMappingURL=create-fulfil.js.map