ia-common 1.0.1-beta.66 → 1.0.1-beta.67

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.
@@ -23,4 +23,5 @@ export declare class SubscribedPricingPlanModel {
23
23
  validateNetAmount(netAmount: number, config?: {
24
24
  roundDown: boolean;
25
25
  }): number;
26
+ validateGetBillingCycleDiscount(discount: string): number;
26
27
  }
@@ -65,6 +65,17 @@ var SubscribedPricingPlanModel = /** @class */ (function () {
65
65
  }
66
66
  return calculatedNetAmount;
67
67
  };
68
+ SubscribedPricingPlanModel.prototype.validateGetBillingCycleDiscount = function (discount) {
69
+ if (Number(discount.replace("P", "")) !== this.getBillingDiscount()) {
70
+ throw new _model_1.AppBadRequestException({
71
+ key: "discount",
72
+ message: [
73
+ "calculated discount:'".concat(this.getBillingDiscount(), "' is not matches with discount you entered"),
74
+ ],
75
+ });
76
+ }
77
+ return this.getBillingDiscount();
78
+ };
68
79
  return SubscribedPricingPlanModel;
69
80
  }());
70
81
  exports.SubscribedPricingPlanModel = SubscribedPricingPlanModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ia-common",
3
- "version": "1.0.1-beta.66",
3
+ "version": "1.0.1-beta.67",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",