ia-common 1.0.1-beta.76 → 1.0.1-beta.78
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.
|
@@ -14,8 +14,8 @@ export declare class PricingPlanEntityModel implements IPricingPlanEntity {
|
|
|
14
14
|
constructor(data: IPricingPlanEntity);
|
|
15
15
|
toObject(): IGetPricingPlanByDateResponse;
|
|
16
16
|
static getBillingCycleString(billingCycle: IBillingCycle): string;
|
|
17
|
-
validateNoOfMonthsByBillingCycle(billingCycle: IBillingCycle): void;
|
|
18
|
-
validateBillingCycleIndexByBillingCycle(billingCycle: IBillingCycle): void;
|
|
17
|
+
static validateNoOfMonthsByBillingCycle(billingCycle: IBillingCycle): void;
|
|
18
|
+
static validateBillingCycleIndexByBillingCycle(billingCycle: IBillingCycle): void;
|
|
19
19
|
}
|
|
20
20
|
export declare class BillingCycleModel {
|
|
21
21
|
code: string;
|
|
@@ -37,7 +37,7 @@ var PricingPlanEntityModel = /** @class */ (function () {
|
|
|
37
37
|
});
|
|
38
38
|
return billingCycles.join(",");
|
|
39
39
|
};
|
|
40
|
-
PricingPlanEntityModel.
|
|
40
|
+
PricingPlanEntityModel.validateNoOfMonthsByBillingCycle = function (billingCycle) {
|
|
41
41
|
var billingCycleKeys = Object.keys(billingCycle);
|
|
42
42
|
var previousMonthCount = 0;
|
|
43
43
|
for (var _i = 0, billingCycleKeys_1 = billingCycleKeys; _i < billingCycleKeys_1.length; _i++) {
|
|
@@ -48,14 +48,14 @@ var PricingPlanEntityModel = /** @class */ (function () {
|
|
|
48
48
|
throw new _model_1.AppBadRequestException({
|
|
49
49
|
key: "noOfMonths.".concat(key),
|
|
50
50
|
message: [
|
|
51
|
-
"No of months should be greater than ".concat(previousMonthCount),
|
|
51
|
+
"No of months at index ".concat(key, " should be greater than ").concat(previousMonthCount),
|
|
52
52
|
],
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
previousMonthCount = currentMonthCount;
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
PricingPlanEntityModel.
|
|
58
|
+
PricingPlanEntityModel.validateBillingCycleIndexByBillingCycle = function (billingCycle) {
|
|
59
59
|
var billingCycleKeys = Object.keys(billingCycle);
|
|
60
60
|
for (var i = 0; i < billingCycleKeys.length; i++) {
|
|
61
61
|
var billingCycleIndex = Number(billingCycleKeys[i]);
|
|
@@ -64,7 +64,9 @@ var PricingPlanEntityModel = /** @class */ (function () {
|
|
|
64
64
|
if (recentBillingCycleIndex !== billingCycleIndex - 1) {
|
|
65
65
|
throw new _model_1.AppBadRequestException({
|
|
66
66
|
key: "billingCycleIndex.".concat(billingCycleIndex),
|
|
67
|
-
message: [
|
|
67
|
+
message: [
|
|
68
|
+
"billingCycleIndex should be ".concat(recentBillingCycleIndex + 1, " at index ").concat(billingCycleIndex),
|
|
69
|
+
],
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
72
|
}
|