@pmcretail/mapper-library 0.0.16 → 0.0.17
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.
- package/bundles/pmcretail-mapper-library.umd.js +14 -14
- package/bundles/pmcretail-mapper-library.umd.js.map +1 -1
- package/bundles/pmcretail-mapper-library.umd.min.js +1 -1
- package/bundles/pmcretail-mapper-library.umd.min.js.map +1 -1
- package/esm2015/lib/WebReturn-mapper.class.js +15 -15
- package/esm5/lib/WebReturn-mapper.class.js +15 -15
- package/fesm2015/pmcretail-mapper-library.js +14 -14
- package/fesm2015/pmcretail-mapper-library.js.map +1 -1
- package/fesm5/pmcretail-mapper-library.js +14 -14
- package/fesm5/pmcretail-mapper-library.js.map +1 -1
- package/package.json +1 -1
|
@@ -6626,25 +6626,25 @@
|
|
|
6626
6626
|
(/** @type {?} */ (this)).webReturnObject['customer']['shippingAddress']['postCode'] = ((/** @type {?} */ (this)).document.shipping_address && (/** @type {?} */ (this)).document.shipping_address.postcode) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.shipping_address.postcode) : '';
|
|
6627
6627
|
(/** @type {?} */ (this)).webReturnObject['customer']['shippingAddress']['country'] = ((/** @type {?} */ (this)).document.shipping_address && (/** @type {?} */ (this)).document.shipping_address.country) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.shipping_address.country) : '';
|
|
6628
6628
|
// basketSummary
|
|
6629
|
-
(/** @type {?} */ (this)).webReturnObject.basketSummary['discountTotal'] = (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.discount_amount);
|
|
6630
|
-
(/** @type {?} */ (this)).webReturnObject.basketSummary['VATTotal'] = (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.base_total_paid);
|
|
6631
|
-
(/** @type {?} */ (this)).webReturnObject.basketSummary['saleTotal'] = (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.base_total_invoiced);
|
|
6632
|
-
(/** @type {?} */ (this)).webReturnObject.basketSummary['basketTotal'] = (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.base_total_paid);
|
|
6633
|
-
(/** @type {?} */ (this)).webReturnObject.basketSummary['totalItems'] = (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.total_qty_ordered);
|
|
6634
|
-
(/** @type {?} */ (this)).webReturnObject.basketSummary['refundTotal'] = (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.base_total_refunded)
|
|
6629
|
+
(/** @type {?} */ (this)).webReturnObject.basketSummary['discountTotal'] = Number((/** @type {?} */ (this)).document.discount_amount ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.discount_amount) : 0);
|
|
6630
|
+
(/** @type {?} */ (this)).webReturnObject.basketSummary['VATTotal'] = Number((/** @type {?} */ (this)).document.base_total_paid ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.base_total_paid) : 0);
|
|
6631
|
+
(/** @type {?} */ (this)).webReturnObject.basketSummary['saleTotal'] = Number((/** @type {?} */ (this)).document.base_total_invoiced ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.base_total_invoiced) : 0);
|
|
6632
|
+
(/** @type {?} */ (this)).webReturnObject.basketSummary['basketTotal'] = Number((/** @type {?} */ (this)).document.base_total_paid ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.base_total_paid) : 0);
|
|
6633
|
+
(/** @type {?} */ (this)).webReturnObject.basketSummary['totalItems'] = Number((/** @type {?} */ (this)).document.total_qty_ordered ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.total_qty_ordered) : 0);
|
|
6634
|
+
(/** @type {?} */ (this)).webReturnObject.basketSummary['refundTotal'] = Number((/** @type {?} */ (this)).document.base_total_refunded ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.base_total_refunded) : 0);
|
|
6635
6635
|
// basket line discount
|
|
6636
6636
|
(/** @type {?} */ (this)).webReturnObject.basket['lineDiscount'] = [];
|
|
6637
6637
|
/** @type {?} */
|
|
6638
6638
|
var lineDiscount = {
|
|
6639
|
-
itemLineId: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.item_id) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items
|
|
6640
|
-
discountAmount: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.discount_amount) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items
|
|
6639
|
+
itemLineId: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.item_id) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.item_id) : 0,
|
|
6640
|
+
discountAmount: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.discount_amount) ? Number((/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.discount_amount)) : 0
|
|
6641
6641
|
};
|
|
6642
6642
|
(/** @type {?} */ (this)).webReturnObject.basket['lineDiscount'].push(lineDiscount);
|
|
6643
6643
|
// basket transaction discount
|
|
6644
6644
|
(/** @type {?} */ (this)).webReturnObject.basket['transactionDiscount'] = [];
|
|
6645
6645
|
/** @type {?} */
|
|
6646
6646
|
var transactionDiscount = {
|
|
6647
|
-
discountAmount: (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.discount_amount)
|
|
6647
|
+
discountAmount: ((/** @type {?} */ (this)).document && (/** @type {?} */ (this)).document.discount_amount) ? Number((/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.discount_amount)) : 0
|
|
6648
6648
|
};
|
|
6649
6649
|
(/** @type {?} */ (this)).webReturnObject.basket['transactionDiscount'].push(transactionDiscount);
|
|
6650
6650
|
// basket products
|
|
@@ -6653,11 +6653,11 @@
|
|
|
6653
6653
|
var product = {
|
|
6654
6654
|
description: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.name) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.name) : '',
|
|
6655
6655
|
SKU: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.sku) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.sku) : '',
|
|
6656
|
-
quantity: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.qty_ordered) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.qty_ordered) :
|
|
6657
|
-
refundedQuantity: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.qty_refunded) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.qty_refunded) :
|
|
6658
|
-
price: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.original_price) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.original_price) :
|
|
6659
|
-
itemLineId: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.item_id) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.item_id) :
|
|
6660
|
-
totalLinePrice: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.row_invoiced) ? (/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.row_invoiced) :
|
|
6656
|
+
quantity: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.qty_ordered) ? Number((/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.qty_ordered)) : 0,
|
|
6657
|
+
refundedQuantity: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.qty_refunded) ? Number((/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.qty_refunded)) : 0,
|
|
6658
|
+
price: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.original_price) ? Number((/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.original_price)) : 0,
|
|
6659
|
+
itemLineId: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.item_id) ? Number((/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.item_id)) : 0,
|
|
6660
|
+
totalLinePrice: ((/** @type {?} */ (this)).document.items && (/** @type {?} */ (this)).document.items.item && (/** @type {?} */ (this)).document.items.item.row_invoiced) ? Number((/** @type {?} */ (this)).getText((/** @type {?} */ (this)).document.items.item.row_invoiced)) : 0,
|
|
6661
6661
|
};
|
|
6662
6662
|
(/** @type {?} */ (this)).webReturnObject.basket['products'].push(product);
|
|
6663
6663
|
return (/** @type {?} */ (this));
|