ia-common 1.0.1-beta.46 → 1.0.1-beta.48
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.
|
@@ -57,63 +57,3 @@ var BillingCycleModel = /** @class */ (function () {
|
|
|
57
57
|
return BillingCycleModel;
|
|
58
58
|
}());
|
|
59
59
|
exports.BillingCycleModel = BillingCycleModel;
|
|
60
|
-
// export interface IPricingPlanModel {
|
|
61
|
-
// id: number;
|
|
62
|
-
// effectiveFromDate: number;
|
|
63
|
-
// effectiveToDate: number;
|
|
64
|
-
// basePrice: number;
|
|
65
|
-
// billingCycle: {
|
|
66
|
-
// [key: string]: {
|
|
67
|
-
// noOfMonths: number;
|
|
68
|
-
// discount: string;
|
|
69
|
-
// name: string;
|
|
70
|
-
// key: string;
|
|
71
|
-
// };
|
|
72
|
-
// };
|
|
73
|
-
// }
|
|
74
|
-
// export class PricingPlanModel implements IPricingPlanModel {
|
|
75
|
-
// id: number;
|
|
76
|
-
// effectiveFromDate: number;
|
|
77
|
-
// effectiveToDate: number;
|
|
78
|
-
// basePrice: number;
|
|
79
|
-
// billingCycle: {
|
|
80
|
-
// [key: string]: {
|
|
81
|
-
// noOfMonths: number;
|
|
82
|
-
// discount: string;
|
|
83
|
-
// name: string;
|
|
84
|
-
// key: string;
|
|
85
|
-
// };
|
|
86
|
-
// };
|
|
87
|
-
// constructor(data: IGetPricingPlanByDateResponse) {
|
|
88
|
-
// Object.assign(this, data);
|
|
89
|
-
// }
|
|
90
|
-
// getBillingCycleKeys(): string[] {
|
|
91
|
-
// return Object.values(this.billingCycle).map(
|
|
92
|
-
// (billingCycleObj) => billingCycleObj.key
|
|
93
|
-
// );
|
|
94
|
-
// }
|
|
95
|
-
// getNoOfSubscriptionDays(type: string): number {
|
|
96
|
-
// const billingCycleModel = this.getBillCycleByKey(type);
|
|
97
|
-
// return billingCycleModel!.noOfMonths * 30 - 1;
|
|
98
|
-
// }
|
|
99
|
-
// getBillCycleByKey(type: string): {
|
|
100
|
-
// noOfMonths: number;
|
|
101
|
-
// discount: string;
|
|
102
|
-
// name: string;
|
|
103
|
-
// key: string;
|
|
104
|
-
// } {
|
|
105
|
-
// return Object.values(this.billingCycle).filter(
|
|
106
|
-
// (billingCycleObj) => billingCycleObj.key === type
|
|
107
|
-
// )[0];
|
|
108
|
-
// }
|
|
109
|
-
// validateBillingCycleKey(key: string): void {
|
|
110
|
-
// if (!this.getBillingCycleKeys().includes(key)) {
|
|
111
|
-
// throw new AppBadRequestException({
|
|
112
|
-
// key: "type",
|
|
113
|
-
// message: [
|
|
114
|
-
// `subscription with type:'${key}' is wrong,type should be one of the ${this.getBillingCycleKeys()}`,
|
|
115
|
-
// ],
|
|
116
|
-
// });
|
|
117
|
-
// }
|
|
118
|
-
// }
|
|
119
|
-
// }
|