@nuskin/ns-product-lib 2.11.0 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [2.12.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.11.0...v2.12.0) (2023-09-22)
2
+
3
+
4
+ ### Update
5
+
6
+ * added subscription price flag to product (CX16-10044) ([341cb81](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/341cb81a15a70121f2370eb59913d0c77f0066b9))
7
+
1
8
  # [2.11.0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v2.10.1...v2.11.0) (2023-09-18)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-product-lib",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
4
  "description": "This project contains shared Product models and code between the backend and frontend.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/product.js CHANGED
@@ -69,6 +69,9 @@ const Product = function (productData) {
69
69
  this.marketAttributes = {};
70
70
  this.salesEventText = "";
71
71
 
72
+ // set if item is subscription priced and installments need to be restricted.
73
+ this.subPriceFlag = false;
74
+
72
75
  // agelocme stuff
73
76
  this.agelocme = null; // object containing agelocme information (like code, label, name)
74
77
 
@@ -552,6 +555,7 @@ const Product = function (productData) {
552
555
  retData.inventory = this.inventory;
553
556
  retData.equinoxProductId = this.equinoxProductId;
554
557
  retData.properties = this.properties;
558
+ retData.subPriceFlag = !!this.subPriceFlag;
555
559
  retData.equinox = {
556
560
  sku: {
557
561
  exists: this.equinox.sku.exists
@@ -618,6 +622,7 @@ const Product = function (productData) {
618
622
  this.contentSection = data.contentSection;
619
623
  this.scanQualified = data.scanQualified;
620
624
  this.status = data.status ? data.status : this.status;
625
+ this.subPriceFlag = !!data.subPriceFlag;
621
626
  if (data.availableQuantity) {
622
627
  this.availableQuantity = data.availableQuantity;
623
628
  }