turf-common 1.0.16-beta.2 → 1.0.16-beta.21
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/build/enums/booking-details-status.enum.d.ts +4 -0
- package/build/enums/booking-details-status.enum.js +8 -0
- package/build/enums/booking-history-operation-type.enum.d.ts +10 -0
- package/build/enums/booking-history-operation-type.enum.js +18 -0
- package/build/enums/faqs-status.enum.d.ts +3 -0
- package/build/enums/faqs-status.enum.js +7 -0
- package/build/enums/organization-status.enum.d.ts +15 -0
- package/build/enums/organization-status.enum.js +31 -0
- package/build/enums/payment-mode.enum.d.ts +4 -0
- package/build/enums/payment-mode.enum.js +8 -0
- package/build/enums/pricing-plan-status.enum copy.d.ts +4 -0
- package/build/enums/pricing-plan-status.enum copy.js +8 -0
- package/build/enums/pricing-plan-status.enum.d.ts +4 -0
- package/build/enums/pricing-plan-status.enum.js +8 -0
- package/build/enums/registration-status-enum.d.ts +12 -0
- package/build/enums/registration-status-enum.js +16 -0
- package/build/enums/user-status.enum.d.ts +11 -0
- package/build/enums/user-status.enum.js +15 -0
- package/build/enums/valid-type.enum.d.ts +6 -0
- package/build/enums/valid-type.enum.js +10 -0
- package/build/index.d.ts +0 -1
- package/build/index.js +1 -1
- package/build/interface/billing-cycle.interface.d.ts +7 -0
- package/build/interface/billing-cycle.interface.js +2 -0
- package/build/interface/booking-details-model.interface.d.ts +5 -0
- package/build/interface/booking-details-model.interface.js +2 -0
- package/build/interface/booking-entity-model.interface.d.ts +8 -0
- package/build/interface/booking-entity-model.interface.js +2 -0
- package/build/interface/cancellation-policy-model.interface.d.ts +4 -0
- package/build/interface/cancellation-policy-model.interface.js +2 -0
- package/build/interface/get-pricing-plan-by-date-response.interface copy.d.ts +23 -0
- package/build/interface/get-pricing-plan-by-date-response.interface copy.js +2 -0
- package/build/interface/get-pricing-plan-by-date-response.interface.d.ts +23 -0
- package/build/interface/get-pricing-plan-by-date-response.interface.js +2 -0
- package/build/interface/get-turf-entity.interface.d.ts +9 -2
- package/build/interface/pitch-slab.interface copy.d.ts +5 -0
- package/build/interface/pitch-slab.interface copy.js +2 -0
- package/build/interface/pitch-slab.interface.d.ts +5 -0
- package/build/interface/pitch-slab.interface.js +2 -0
- package/build/interface/price-model.interface.d.ts +3 -0
- package/build/interface/price-model.interface.js +2 -0
- package/build/interface/pricing-plan-entity-model.interface.d.ts +13 -0
- package/build/interface/pricing-plan-entity-model.interface.js +2 -0
- package/build/interface/pricing-plan-model.interface.d.ts +15 -0
- package/build/interface/pricing-plan-model.interface.js +2 -0
- package/build/interface/pricing-plan.interface.d.ts +15 -0
- package/build/interface/pricing-plan.interface.js +2 -0
- package/build/interface/subscription-status.interface.d.ts +20 -0
- package/build/interface/subscription-status.interface.js +24 -0
- package/build/interface/turf-model.interface.d.ts +7 -0
- package/build/interface/turf-model.interface.js +2 -0
- package/build/interface/user-model.interface.d.ts +3 -0
- package/build/interface/user-model.interface.js +2 -0
- package/build/models/billing-cycle-model.d.ts +10 -0
- package/build/models/billing-cycle-model.js +20 -0
- package/build/models/booking-details-model.d.ts +39 -0
- package/build/models/booking-details-model.js +69 -0
- package/build/models/booking-entity-model.d.ts +21 -0
- package/build/models/booking-entity-model.js +47 -0
- package/build/models/cancellation-policy-model.d.ts +18 -0
- package/build/models/cancellation-policy-model.js +32 -0
- package/build/models/pitch-slab-model.d.ts +9 -0
- package/build/models/pitch-slab-model.js +21 -0
- package/build/models/price-model.d.ts +11 -0
- package/build/models/price-model.js +15 -0
- package/build/models/pricing-plan-entity-model.d.ts +47 -0
- package/build/models/pricing-plan-entity-model.js +128 -0
- package/build/models/pricing-plan-model.d.ts +24 -0
- package/build/models/pricing-plan-model.js +67 -0
- package/build/models/subscribed-pricing-plan-model.d.ts +26 -0
- package/build/models/subscribed-pricing-plan-model.js +88 -0
- package/build/models/subscription-model.d.ts +30 -0
- package/build/models/subscription-model.js +51 -0
- package/build/models/turf-model.d.ts +34 -0
- package/build/models/turf-model.js +88 -0
- package/build/models/user-model.d.ts +31 -0
- package/build/models/user-model.js +19 -0
- package/build/types/bookingdetails-with-booking.type.d.ts +34 -0
- package/build/types/bookingdetails-with-booking.type.js +2 -0
- package/build/types/entity/bank-details-entity.type.d.ts +12 -0
- package/build/types/entity/bank-details-entity.type.js +2 -0
- package/build/types/entity/booking-cancellation-entity.type.d.ts +32 -0
- package/build/types/entity/booking-cancellation-entity.type.js +2 -0
- package/build/types/entity/booking-customer-entity.type.d.ts +8 -0
- package/build/types/entity/booking-customer-entity.type.js +2 -0
- package/build/types/entity/booking-details-entity.type.d.ts +27 -0
- package/build/types/entity/booking-details-entity.type.js +2 -0
- package/build/types/entity/bookings-entity.type.d.ts +6 -0
- package/build/types/entity/bookings-entity.type.js +2 -0
- package/build/types/entity/cancellation-policy-entity.type.d.ts +8 -0
- package/build/types/entity/cancellation-policy-entity.type.js +2 -0
- package/build/types/entity/coupon.entity.type.d.ts +10 -0
- package/build/types/entity/coupon.entity.type.js +2 -0
- package/build/types/entity/entity-audit-column.type.d.ts +6 -0
- package/build/types/entity/entity-audit-column.type.js +7 -0
- package/build/types/entity/faqs-entity.type.d.ts +10 -0
- package/build/types/entity/faqs-entity.type.js +2 -0
- package/build/types/entity/organization-entity.type.d.ts +23 -0
- package/build/types/entity/organization-entity.type.js +2 -0
- package/build/types/entity/pitch-entity.type.d.ts +9 -0
- package/build/types/entity/pitch-entity.type.js +2 -0
- package/build/types/entity/price-entity.type.d.ts +5 -0
- package/build/types/entity/price-entity.type.js +2 -0
- package/build/types/entity/pricing-plan-entity.d.ts +16 -0
- package/build/types/entity/pricing-plan-entity.js +2 -0
- package/build/types/entity/registration-entity.type.d.ts +12 -0
- package/build/types/entity/registration-entity.type.js +2 -0
- package/build/types/entity/subscription-entity.type.d.ts +20 -0
- package/build/types/entity/subscription-entity.type.js +2 -0
- package/build/types/entity/subscription-pitch-mapping.type.d.ts +7 -0
- package/build/types/entity/subscription-pitch-mapping.type.js +2 -0
- package/build/types/entity/turf-entity.type.d.ts +10 -12
- package/build/types/entity/user-entity.type.d.ts +24 -0
- package/build/types/entity/user-entity.type.js +2 -0
- package/package.json +2 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.BookingDetailsModel = void 0;
|
|
15
|
+
var booking_entity_model_1 = require("./booking-entity-model");
|
|
16
|
+
var BookingDetailsModel = /** @class */ (function () {
|
|
17
|
+
function BookingDetailsModel(data) {
|
|
18
|
+
Object.assign(this, data);
|
|
19
|
+
}
|
|
20
|
+
BookingDetailsModel.getIdAndCreatedBy = function (bookingDetailsEntities) {
|
|
21
|
+
var bookingDetailsIds = [];
|
|
22
|
+
var userIds = [];
|
|
23
|
+
bookingDetailsEntities.forEach(function (_a) {
|
|
24
|
+
var bookingDetailId = _a.id, createdBy = _a.createdBy;
|
|
25
|
+
bookingDetailsIds.push(bookingDetailId), userIds.push(createdBy);
|
|
26
|
+
});
|
|
27
|
+
return [bookingDetailsIds, userIds];
|
|
28
|
+
};
|
|
29
|
+
// static toMap(
|
|
30
|
+
// bookingDetailsEntities: IBookingDetailsEntity[],
|
|
31
|
+
// bookingsEntities: BookingsEntity[],
|
|
32
|
+
// ): IBookingDetailsWithBooking {
|
|
33
|
+
// const response: IBookingDetailsWithBooking = {};
|
|
34
|
+
// bookingDetailsEntities.forEach((bookingsDetailsEntity) => {
|
|
35
|
+
// const bookingDetailsId = bookingsDetailsEntity.id;
|
|
36
|
+
// if (!response[bookingDetailsId]) {
|
|
37
|
+
// response[bookingDetailsId] = {
|
|
38
|
+
// ...bookingsDetailsEntity,
|
|
39
|
+
// bookings: {},
|
|
40
|
+
// };
|
|
41
|
+
// }
|
|
42
|
+
// const filterBookingEntities = bookingsEntities.filter(
|
|
43
|
+
// (bookingEntity) => bookingEntity.bookingDetailsId === bookingDetailsId,
|
|
44
|
+
// );
|
|
45
|
+
// response[bookingDetailsId].bookings = BookingsEntity.toMap(
|
|
46
|
+
// filterBookingEntities,
|
|
47
|
+
// );
|
|
48
|
+
// });
|
|
49
|
+
// return response;
|
|
50
|
+
// }
|
|
51
|
+
BookingDetailsModel.prototype.assignCharges = function (chargeModel) {
|
|
52
|
+
this.discountAmount = chargeModel.getDiscountAmount();
|
|
53
|
+
Object.assign(this, chargeModel);
|
|
54
|
+
};
|
|
55
|
+
BookingDetailsModel.toMap = function (bookingDetailsEntities, bookingsEntities) {
|
|
56
|
+
var response = {};
|
|
57
|
+
bookingDetailsEntities.forEach(function (bookingsDetailsEntity) {
|
|
58
|
+
var bookingDetailsId = bookingsDetailsEntity.id;
|
|
59
|
+
if (!response[bookingDetailsId]) {
|
|
60
|
+
response[bookingDetailsId] = __assign(__assign({}, bookingsDetailsEntity), { bookings: {} });
|
|
61
|
+
}
|
|
62
|
+
var filterBookingEntities = bookingsEntities.filter(function (bookingEntity) { return bookingEntity.bookingDetailsId === bookingDetailsId; });
|
|
63
|
+
response[bookingDetailsId].bookings = booking_entity_model_1.BookingEntityModel.toMap(filterBookingEntities);
|
|
64
|
+
});
|
|
65
|
+
return response;
|
|
66
|
+
};
|
|
67
|
+
return BookingDetailsModel;
|
|
68
|
+
}());
|
|
69
|
+
exports.BookingDetailsModel = BookingDetailsModel;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IBookingsEntityModel } from "../interface/booking-entity-model.interface";
|
|
2
|
+
import { IBookingsEntity } from "../types/entity/bookings-entity.type";
|
|
3
|
+
import { BookingCode } from "./booking-code-model";
|
|
4
|
+
export declare class BookingEntityModel implements IBookingsEntityModel {
|
|
5
|
+
bookingDetailsId: number;
|
|
6
|
+
code: string;
|
|
7
|
+
cost: string;
|
|
8
|
+
createdOn: Date;
|
|
9
|
+
updatedOn: Date;
|
|
10
|
+
createdBy: number;
|
|
11
|
+
updatedBy: number;
|
|
12
|
+
constructor(data: IBookingsEntity);
|
|
13
|
+
getTotalCost(): number;
|
|
14
|
+
getBookingTimeInMinutes(): number;
|
|
15
|
+
isTimeExtended(newBookingEntities: IBookingsEntity[]): boolean;
|
|
16
|
+
getBookingCode(): BookingCode;
|
|
17
|
+
static toMap(bookingEntities: IBookingsEntity[]): {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
};
|
|
20
|
+
static findByCodeAndTurfId(bookingEntities: IBookingsEntity[], turfId: number, bookingCode: string): IBookingsEntity | undefined;
|
|
21
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BookingEntityModel = void 0;
|
|
4
|
+
var booking_code_model_1 = require("./booking-code-model");
|
|
5
|
+
var BookingEntityModel = /** @class */ (function () {
|
|
6
|
+
function BookingEntityModel(data) {
|
|
7
|
+
Object.assign(this, data);
|
|
8
|
+
}
|
|
9
|
+
BookingEntityModel.prototype.getTotalCost = function () {
|
|
10
|
+
return this.cost
|
|
11
|
+
.split(",")
|
|
12
|
+
.map(Number)
|
|
13
|
+
.reduce(function (accumulator, currentValue) { return accumulator + currentValue; }, 0);
|
|
14
|
+
};
|
|
15
|
+
BookingEntityModel.prototype.getBookingTimeInMinutes = function () {
|
|
16
|
+
var bookingCode = new booking_code_model_1.BookingCode(this.code);
|
|
17
|
+
return bookingCode.getBookingTimeInMinutes();
|
|
18
|
+
};
|
|
19
|
+
BookingEntityModel.prototype.isTimeExtended = function (newBookingEntities) {
|
|
20
|
+
var newTimeInMinutes = newBookingEntities
|
|
21
|
+
.map(function (bookingEntity) {
|
|
22
|
+
return new BookingEntityModel(bookingEntity).getBookingTimeInMinutes();
|
|
23
|
+
})
|
|
24
|
+
.reduce(function (accumulator, currentValue) { return accumulator + currentValue; }, 0);
|
|
25
|
+
return (newTimeInMinutes > new BookingEntityModel(this).getBookingTimeInMinutes());
|
|
26
|
+
};
|
|
27
|
+
BookingEntityModel.prototype.getBookingCode = function () {
|
|
28
|
+
return new booking_code_model_1.BookingCode(this.code, this.cost);
|
|
29
|
+
};
|
|
30
|
+
BookingEntityModel.toMap = function (bookingEntities) {
|
|
31
|
+
var response = {};
|
|
32
|
+
bookingEntities.forEach(function (bookingEntity) {
|
|
33
|
+
response[bookingEntity.code] =
|
|
34
|
+
response[bookingEntity.code] === undefined
|
|
35
|
+
? bookingEntity.cost
|
|
36
|
+
: response[bookingEntity.code];
|
|
37
|
+
});
|
|
38
|
+
return response;
|
|
39
|
+
};
|
|
40
|
+
BookingEntityModel.findByCodeAndTurfId = function (bookingEntities, turfId, bookingCode) {
|
|
41
|
+
return bookingEntities.find(function (bookingEntity) {
|
|
42
|
+
return bookingEntity.code === booking_code_model_1.BookingCode.getInstance(turfId, bookingCode).code;
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
return BookingEntityModel;
|
|
46
|
+
}());
|
|
47
|
+
exports.BookingEntityModel = BookingEntityModel;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ICancellationPolicyModel } from "../interface/cancellation-policy-model.interface";
|
|
2
|
+
import { ICancellationPolicyEntity } from "../types/entity/cancellation-policy-entity.type";
|
|
3
|
+
export declare class CancellationPolicyModel implements ICancellationPolicyModel {
|
|
4
|
+
id: number;
|
|
5
|
+
turfId: number;
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
charges: string;
|
|
9
|
+
createdOn: Date;
|
|
10
|
+
updatedOn: Date;
|
|
11
|
+
createdBy: number;
|
|
12
|
+
updatedBy: number;
|
|
13
|
+
constructor(data: ICancellationPolicyEntity);
|
|
14
|
+
unitOfCharges(): string;
|
|
15
|
+
chargesWithoutUnit(): string;
|
|
16
|
+
isInEffect(hours: number): boolean;
|
|
17
|
+
getCancellationCharges(cost: number): number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CancellationPolicyModel = void 0;
|
|
4
|
+
var CancellationPolicyModel = /** @class */ (function () {
|
|
5
|
+
function CancellationPolicyModel(data) {
|
|
6
|
+
Object.assign(this, data);
|
|
7
|
+
}
|
|
8
|
+
CancellationPolicyModel.prototype.unitOfCharges = function () {
|
|
9
|
+
return this.charges.slice(-1);
|
|
10
|
+
};
|
|
11
|
+
CancellationPolicyModel.prototype.chargesWithoutUnit = function () {
|
|
12
|
+
return this.charges.slice(0, -1);
|
|
13
|
+
};
|
|
14
|
+
CancellationPolicyModel.prototype.isInEffect = function (hours) {
|
|
15
|
+
return this.from <= hours && hours <= this.to;
|
|
16
|
+
};
|
|
17
|
+
CancellationPolicyModel.prototype.getCancellationCharges = function (cost) {
|
|
18
|
+
var cancellationCharges = 0;
|
|
19
|
+
var cancellationChargesModel = new CancellationPolicyModel(this);
|
|
20
|
+
if (cancellationChargesModel.unitOfCharges() === "P") {
|
|
21
|
+
var percentageValue = cancellationChargesModel.chargesWithoutUnit();
|
|
22
|
+
cancellationCharges = (cost * Number(percentageValue)) / 100;
|
|
23
|
+
}
|
|
24
|
+
else if (cancellationChargesModel.unitOfCharges() === "U") {
|
|
25
|
+
var unit = cancellationChargesModel.chargesWithoutUnit();
|
|
26
|
+
cancellationCharges = Number(unit);
|
|
27
|
+
}
|
|
28
|
+
return cancellationCharges;
|
|
29
|
+
};
|
|
30
|
+
return CancellationPolicyModel;
|
|
31
|
+
}());
|
|
32
|
+
exports.CancellationPolicyModel = CancellationPolicyModel;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPitchSlab } from "../interface/pitch-slab.interface";
|
|
2
|
+
export declare class PitchSlabModel implements IPitchSlab {
|
|
3
|
+
from: number;
|
|
4
|
+
to: number;
|
|
5
|
+
discount: string;
|
|
6
|
+
constructor(data: IPitchSlab);
|
|
7
|
+
getDiscount(): number;
|
|
8
|
+
getBasePrice(basePrice: number): number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PitchSlabModel = void 0;
|
|
4
|
+
var PitchSlabModel = /** @class */ (function () {
|
|
5
|
+
function PitchSlabModel(data) {
|
|
6
|
+
this.from = data.from;
|
|
7
|
+
this.to = data.to;
|
|
8
|
+
this.discount = data.discount;
|
|
9
|
+
}
|
|
10
|
+
PitchSlabModel.prototype.getDiscount = function () {
|
|
11
|
+
if (this.discount.indexOf("P") > -1) {
|
|
12
|
+
return parseFloat(this.discount.replace("P", ""));
|
|
13
|
+
}
|
|
14
|
+
return 0;
|
|
15
|
+
};
|
|
16
|
+
PitchSlabModel.prototype.getBasePrice = function (basePrice) {
|
|
17
|
+
return basePrice * (1 - this.getDiscount() / 100);
|
|
18
|
+
};
|
|
19
|
+
return PitchSlabModel;
|
|
20
|
+
}());
|
|
21
|
+
exports.PitchSlabModel = PitchSlabModel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPriceModel } from "../interface/price-model.interface";
|
|
2
|
+
import { IPriceEntity } from "../types/entity/price-entity.type";
|
|
3
|
+
export declare class PriceModel implements IPriceModel {
|
|
4
|
+
id: string;
|
|
5
|
+
price: number;
|
|
6
|
+
createdOn: Date;
|
|
7
|
+
updatedOn: Date;
|
|
8
|
+
createdBy: number;
|
|
9
|
+
updatedBy: number;
|
|
10
|
+
static sortByCode(priceEntities: IPriceEntity[]): IPriceEntity[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PriceModel = void 0;
|
|
4
|
+
var PriceModel = /** @class */ (function () {
|
|
5
|
+
function PriceModel() {
|
|
6
|
+
}
|
|
7
|
+
PriceModel.sortByCode = function (priceEntities) {
|
|
8
|
+
priceEntities = priceEntities.sort(function (a, b) {
|
|
9
|
+
return a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
|
|
10
|
+
});
|
|
11
|
+
return priceEntities;
|
|
12
|
+
};
|
|
13
|
+
return PriceModel;
|
|
14
|
+
}());
|
|
15
|
+
exports.PriceModel = PriceModel;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PricingPlanStatus } from "../enums/pricing-plan-status.enum copy";
|
|
2
|
+
import { IBillingCycle } from "../interface/billing-cycle.interface";
|
|
3
|
+
import { GetPricingPlanByDateResponse } from "../interface/get-pricing-plan-by-date-response.interface";
|
|
4
|
+
import { IPitchSlab } from "../interface/pitch-slab.interface";
|
|
5
|
+
import { IPricingPlanEntityModel } from "../interface/pricing-plan-entity-model.interface";
|
|
6
|
+
import { IPricingPlanEntity } from "../types/entity/pricing-plan-entity";
|
|
7
|
+
import { BillingCycleModel } from "./billing-cycle-model";
|
|
8
|
+
import { PricingPlanModel } from "./pricing-plan-model";
|
|
9
|
+
export declare class PricingPlanEntityModel implements IPricingPlanEntityModel {
|
|
10
|
+
id: number;
|
|
11
|
+
effectiveFrom: Date;
|
|
12
|
+
effectiveTo: Date;
|
|
13
|
+
costCode: string;
|
|
14
|
+
status: PricingPlanStatus;
|
|
15
|
+
createdBy: number;
|
|
16
|
+
createdOn: Date;
|
|
17
|
+
updatedBy: number;
|
|
18
|
+
updatedOn: Date;
|
|
19
|
+
basePrice: number;
|
|
20
|
+
billingCycle: string;
|
|
21
|
+
unit: string;
|
|
22
|
+
constructor(data: IPricingPlanEntity);
|
|
23
|
+
getBillingCycleKeys(): string[];
|
|
24
|
+
toModel(): PricingPlanModel;
|
|
25
|
+
arrayToIndexedObject<T>(arr: T[]): {
|
|
26
|
+
[key: string]: T;
|
|
27
|
+
};
|
|
28
|
+
toObject(): GetPricingPlanByDateResponse;
|
|
29
|
+
toPitchSlabs(): IPitchSlab[];
|
|
30
|
+
toBillingCycles(): IBillingCycle[];
|
|
31
|
+
}
|
|
32
|
+
export declare class PitchSlabParser {
|
|
33
|
+
code: string;
|
|
34
|
+
constructor(code: string);
|
|
35
|
+
parseToModel(): IPitchSlab;
|
|
36
|
+
}
|
|
37
|
+
export declare class BillingCycleCodeParser {
|
|
38
|
+
code: string;
|
|
39
|
+
from: number;
|
|
40
|
+
to: number;
|
|
41
|
+
discount: string;
|
|
42
|
+
name: string;
|
|
43
|
+
constructor(code: string);
|
|
44
|
+
parse(): BillingCycleCodeParser;
|
|
45
|
+
parseToModel(): BillingCycleModel;
|
|
46
|
+
getKey(): string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingCycleCodeParser = exports.PitchSlabParser = exports.PricingPlanEntityModel = void 0;
|
|
4
|
+
var billing_cycle_model_1 = require("./billing-cycle-model");
|
|
5
|
+
var booking_code_model_1 = require("./booking-code-model");
|
|
6
|
+
var pitch_slab_model_1 = require("./pitch-slab-model");
|
|
7
|
+
var pricing_plan_model_1 = require("./pricing-plan-model");
|
|
8
|
+
var PricingPlanEntityModel = /** @class */ (function () {
|
|
9
|
+
function PricingPlanEntityModel(data) {
|
|
10
|
+
Object.assign(this, data);
|
|
11
|
+
}
|
|
12
|
+
PricingPlanEntityModel.prototype.getBillingCycleKeys = function () {
|
|
13
|
+
return this.toBillingCycles().map(function (billingCycle) { return billingCycle.key; });
|
|
14
|
+
};
|
|
15
|
+
PricingPlanEntityModel.prototype.toModel = function () {
|
|
16
|
+
return new pricing_plan_model_1.PricingPlanModel({
|
|
17
|
+
id: this.id,
|
|
18
|
+
base_price: this.basePrice,
|
|
19
|
+
effective_from_date: parseInt(booking_code_model_1.BookingCode.getDateCode(this.effectiveFrom)),
|
|
20
|
+
effective_to_date: parseInt(booking_code_model_1.BookingCode.getDateCode(this.effectiveTo)),
|
|
21
|
+
unit: this.unit,
|
|
22
|
+
billing_cycle: this.arrayToIndexedObject(this.toBillingCycles()),
|
|
23
|
+
pitch_slab: this.arrayToIndexedObject(this.toPitchSlabs()),
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
PricingPlanEntityModel.prototype.arrayToIndexedObject = function (arr) {
|
|
27
|
+
return arr.reduce(function (result, item, index) {
|
|
28
|
+
result[index.toString()] = item; //a, b, c
|
|
29
|
+
return result;
|
|
30
|
+
}, {});
|
|
31
|
+
};
|
|
32
|
+
PricingPlanEntityModel.prototype.toObject = function () {
|
|
33
|
+
var responseObj = {
|
|
34
|
+
id: this.id,
|
|
35
|
+
effective_from_date: 0,
|
|
36
|
+
effective_to_date: 0,
|
|
37
|
+
base_price: 0,
|
|
38
|
+
unit: "per_hour_per_pitch",
|
|
39
|
+
pitch_slab: {},
|
|
40
|
+
billing_cycle: {},
|
|
41
|
+
};
|
|
42
|
+
var billingCycle = this.billingCycle.split(",");
|
|
43
|
+
billingCycle.forEach(function (billing, index) {
|
|
44
|
+
var billingArray = billing.split("_");
|
|
45
|
+
responseObj.billing_cycle[index] = {
|
|
46
|
+
from: Number(billingArray[0].slice(0, 3)),
|
|
47
|
+
to: Number(billingArray[0].slice(3, 6)),
|
|
48
|
+
discount: billingArray[1],
|
|
49
|
+
name: billingArray.slice(2).join("_"),
|
|
50
|
+
key: billingArray.slice(2).join("-").toLowerCase().replace(/ /g, "-"),
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
this.costCode.split(",").forEach(function (code, index) {
|
|
54
|
+
var costCode = code.split("_");
|
|
55
|
+
responseObj.pitch_slab[index] = {
|
|
56
|
+
from: Number(costCode[0].slice(0, 3)),
|
|
57
|
+
to: Number(costCode[0].slice(3, 6)),
|
|
58
|
+
discount: costCode[1],
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
responseObj.effective_from_date = Number(booking_code_model_1.BookingCode.getDateCode(this.effectiveFrom));
|
|
62
|
+
responseObj.effective_to_date = Number(booking_code_model_1.BookingCode.getDateCode(this.effectiveTo));
|
|
63
|
+
responseObj.unit = this.unit;
|
|
64
|
+
responseObj.base_price = this.basePrice;
|
|
65
|
+
return responseObj;
|
|
66
|
+
};
|
|
67
|
+
PricingPlanEntityModel.prototype.toPitchSlabs = function () {
|
|
68
|
+
return this.costCode
|
|
69
|
+
.split(",")
|
|
70
|
+
.map(function (cost_code) { return new PitchSlabParser(cost_code).parseToModel(); });
|
|
71
|
+
};
|
|
72
|
+
PricingPlanEntityModel.prototype.toBillingCycles = function () {
|
|
73
|
+
return this.billingCycle
|
|
74
|
+
.split(",")
|
|
75
|
+
.map(function (billingCode) {
|
|
76
|
+
return new BillingCycleCodeParser(billingCode).parseToModel();
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return PricingPlanEntityModel;
|
|
80
|
+
}());
|
|
81
|
+
exports.PricingPlanEntityModel = PricingPlanEntityModel;
|
|
82
|
+
var PitchSlabParser = /** @class */ (function () {
|
|
83
|
+
function PitchSlabParser(code) {
|
|
84
|
+
this.code = code;
|
|
85
|
+
}
|
|
86
|
+
PitchSlabParser.prototype.parseToModel = function () {
|
|
87
|
+
var costCodeComponents = this.code.split("_");
|
|
88
|
+
return new pitch_slab_model_1.PitchSlabModel({
|
|
89
|
+
discount: costCodeComponents[1],
|
|
90
|
+
from: parseInt(costCodeComponents[0].slice(0, 3)),
|
|
91
|
+
to: parseInt(costCodeComponents[0].slice(3)),
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
return PitchSlabParser;
|
|
95
|
+
}());
|
|
96
|
+
exports.PitchSlabParser = PitchSlabParser;
|
|
97
|
+
var BillingCycleCodeParser = /** @class */ (function () {
|
|
98
|
+
function BillingCycleCodeParser(code) {
|
|
99
|
+
this.code = code;
|
|
100
|
+
}
|
|
101
|
+
BillingCycleCodeParser.prototype.parse = function () {
|
|
102
|
+
var billingCycleComponents = this.code.split("_");
|
|
103
|
+
this.from = parseInt(billingCycleComponents[0].slice(0, 3));
|
|
104
|
+
this.to = parseInt(billingCycleComponents[0].slice(3, 6));
|
|
105
|
+
this.discount = billingCycleComponents[1];
|
|
106
|
+
this.name = billingCycleComponents[2];
|
|
107
|
+
return this;
|
|
108
|
+
};
|
|
109
|
+
BillingCycleCodeParser.prototype.parseToModel = function () {
|
|
110
|
+
var billingCycleComponents = this.code.split("_");
|
|
111
|
+
this.from = parseInt(billingCycleComponents[0].slice(0, 3));
|
|
112
|
+
this.to = parseInt(billingCycleComponents[0].slice(3, 6));
|
|
113
|
+
this.discount = billingCycleComponents[1];
|
|
114
|
+
this.name = billingCycleComponents[2];
|
|
115
|
+
return new billing_cycle_model_1.BillingCycleModel({
|
|
116
|
+
discount: this.discount,
|
|
117
|
+
from: this.from,
|
|
118
|
+
to: this.to,
|
|
119
|
+
name: this.name,
|
|
120
|
+
key: this.getKey(),
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
BillingCycleCodeParser.prototype.getKey = function () {
|
|
124
|
+
return this.name.toLowerCase().replace(" ", "-");
|
|
125
|
+
};
|
|
126
|
+
return BillingCycleCodeParser;
|
|
127
|
+
}());
|
|
128
|
+
exports.BillingCycleCodeParser = BillingCycleCodeParser;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IPricingPlan } from "../interface/pricing-plan.interface";
|
|
2
|
+
import { PitchSlabModel } from "./pitch-slab-model";
|
|
3
|
+
import { BillingCycleModel } from "./billing-cycle-model";
|
|
4
|
+
export declare class PricingPlanModel implements IPricingPlan {
|
|
5
|
+
id: number;
|
|
6
|
+
effective_from_date: number;
|
|
7
|
+
effective_to_date: number;
|
|
8
|
+
base_price: number;
|
|
9
|
+
unit: string;
|
|
10
|
+
pitch_slab: {
|
|
11
|
+
[key: string]: PitchSlabModel;
|
|
12
|
+
};
|
|
13
|
+
billing_cycle: {
|
|
14
|
+
[key: string]: BillingCycleModel;
|
|
15
|
+
};
|
|
16
|
+
constructor(data: IPricingPlan);
|
|
17
|
+
getPitchSlab(pitchCount: number): PitchSlabModel;
|
|
18
|
+
getBillingCycle(billingCycleKey: string): BillingCycleModel;
|
|
19
|
+
getMonth(billingCycleKey: string): number;
|
|
20
|
+
getNoOfSubscriptionDays(billingCycleKey: string): number;
|
|
21
|
+
getBillingCycleKeys(): string[];
|
|
22
|
+
validateBillingCycleKey(billingCycleKey: string): void;
|
|
23
|
+
getBillingCycleByDay(numberOfDay: number): BillingCycleModel | undefined;
|
|
24
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PricingPlanModel = void 0;
|
|
4
|
+
var common_1 = require("@nestjs/common");
|
|
5
|
+
var pitch_slab_model_1 = require("./pitch-slab-model");
|
|
6
|
+
var billing_cycle_model_1 = require("./billing-cycle-model");
|
|
7
|
+
var PricingPlanModel = /** @class */ (function () {
|
|
8
|
+
function PricingPlanModel(data) {
|
|
9
|
+
var _this = this;
|
|
10
|
+
this.id = data.id;
|
|
11
|
+
this.effective_from_date = data.effective_from_date;
|
|
12
|
+
this.effective_to_date = data.effective_to_date;
|
|
13
|
+
this.base_price = data.base_price;
|
|
14
|
+
this.unit = data.unit;
|
|
15
|
+
this.pitch_slab = {};
|
|
16
|
+
this.billing_cycle = {};
|
|
17
|
+
Object.keys(data.pitch_slab).forEach(function (key) {
|
|
18
|
+
_this.pitch_slab[key] = new pitch_slab_model_1.PitchSlabModel(data.pitch_slab[key]);
|
|
19
|
+
});
|
|
20
|
+
Object.keys(data.billing_cycle).forEach(function (key) {
|
|
21
|
+
_this.billing_cycle[key] = new billing_cycle_model_1.BillingCycleModel(data.billing_cycle[key]);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
PricingPlanModel.prototype.getPitchSlab = function (pitchCount) {
|
|
25
|
+
var pitchRangesMap = this.pitch_slab;
|
|
26
|
+
var pitchRanges = Object.values(pitchRangesMap);
|
|
27
|
+
var selectedPitchSlab = pitchRanges.filter(function (pitchRange) {
|
|
28
|
+
return pitchRange.from <= pitchCount && pitchCount <= pitchRange.to;
|
|
29
|
+
})[0];
|
|
30
|
+
return selectedPitchSlab;
|
|
31
|
+
};
|
|
32
|
+
PricingPlanModel.prototype.getBillingCycle = function (billingCycleKey) {
|
|
33
|
+
var billingCycleMap = this.billing_cycle;
|
|
34
|
+
var billingCycles = Object.values(billingCycleMap);
|
|
35
|
+
var selectedBillingCycle = billingCycles.filter(function (_a) {
|
|
36
|
+
var key = _a.key;
|
|
37
|
+
return key === billingCycleKey;
|
|
38
|
+
})[0];
|
|
39
|
+
return selectedBillingCycle;
|
|
40
|
+
};
|
|
41
|
+
PricingPlanModel.prototype.getMonth = function (billingCycleKey) {
|
|
42
|
+
return this.getBillingCycle(billingCycleKey).to;
|
|
43
|
+
};
|
|
44
|
+
PricingPlanModel.prototype.getNoOfSubscriptionDays = function (billingCycleKey) {
|
|
45
|
+
return this.getBillingCycle(billingCycleKey).to * 30 - 1;
|
|
46
|
+
};
|
|
47
|
+
PricingPlanModel.prototype.getBillingCycleKeys = function () {
|
|
48
|
+
return Object.values(this.billing_cycle).map(function (obj) { return obj.key; });
|
|
49
|
+
};
|
|
50
|
+
PricingPlanModel.prototype.validateBillingCycleKey = function (billingCycleKey) {
|
|
51
|
+
if (!this.getBillingCycleKeys().includes(billingCycleKey)) {
|
|
52
|
+
throw new common_1.BadRequestException({
|
|
53
|
+
key: "type",
|
|
54
|
+
message: ["pricing plan type:'".concat(billingCycleKey, "' is not found")],
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
PricingPlanModel.prototype.getBillingCycleByDay = function (numberOfDay) {
|
|
59
|
+
return Object.values(this.billing_cycle).find(function (obj) {
|
|
60
|
+
if (numberOfDay <= obj.to * 30) {
|
|
61
|
+
return obj;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
return PricingPlanModel;
|
|
66
|
+
}());
|
|
67
|
+
exports.PricingPlanModel = PricingPlanModel;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IPricingPlan } from "../interface/pricing-plan.interface";
|
|
2
|
+
import { BillingCycleModel } from "./billing-cycle-model";
|
|
3
|
+
import { PitchSlabModel } from "./pitch-slab-model";
|
|
4
|
+
import { PricingPlanModel } from "./pricing-plan-model";
|
|
5
|
+
export declare class SubscribedPricingPlanModel extends PricingPlanModel {
|
|
6
|
+
pitchCount: number;
|
|
7
|
+
billingCycle: string;
|
|
8
|
+
selectedPitchSlab: PitchSlabModel;
|
|
9
|
+
selectedBillingCycle: BillingCycleModel;
|
|
10
|
+
selectedPitchSlabBasePrice: number;
|
|
11
|
+
hourInMonth: number;
|
|
12
|
+
months: number | undefined;
|
|
13
|
+
constructor(data: IPricingPlan, pitchCount: number, billingCycle: string);
|
|
14
|
+
getMonths(): number;
|
|
15
|
+
getBasePrice(): number;
|
|
16
|
+
getGrossAmount(): number;
|
|
17
|
+
getNetAmount(): number;
|
|
18
|
+
getBillingDiscount(): number;
|
|
19
|
+
getMonthDifference(that: SubscribedPricingPlanModel): number;
|
|
20
|
+
getGrossAmountByMonth(month: number): number;
|
|
21
|
+
getNetAmountByMonth(month: number): number;
|
|
22
|
+
getGrossAmountByPitchDays(pitchCount: number, days: number): number;
|
|
23
|
+
getNetAmountByPitchDays(pitchCount: number, days: number): number;
|
|
24
|
+
getGrossAmountByPitchDaysBasePrice(basePrice: number, pitchCount: number, days: number): number;
|
|
25
|
+
getNetAmountByPitchDaysBasePrice(basePrice: number, pitchCount: number, days: number): number;
|
|
26
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SubscribedPricingPlanModel = void 0;
|
|
19
|
+
var pricing_plan_model_1 = require("./pricing-plan-model");
|
|
20
|
+
var SubscribedPricingPlanModel = /** @class */ (function (_super) {
|
|
21
|
+
__extends(SubscribedPricingPlanModel, _super);
|
|
22
|
+
function SubscribedPricingPlanModel(data, pitchCount, billingCycle) {
|
|
23
|
+
var _this = _super.call(this, data) || this;
|
|
24
|
+
_this.hourInMonth = 24 * 30;
|
|
25
|
+
_this.pitchCount = pitchCount;
|
|
26
|
+
_this.billingCycle = billingCycle;
|
|
27
|
+
_this.selectedPitchSlab = _this.getPitchSlab(_this.pitchCount);
|
|
28
|
+
_this.selectedBillingCycle = _this.getBillingCycle(_this.billingCycle);
|
|
29
|
+
_this.selectedPitchSlabBasePrice = _this.selectedPitchSlab.getBasePrice(_this.base_price);
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
SubscribedPricingPlanModel.prototype.getMonths = function () {
|
|
33
|
+
return this.selectedBillingCycle.to;
|
|
34
|
+
};
|
|
35
|
+
SubscribedPricingPlanModel.prototype.getBasePrice = function () {
|
|
36
|
+
return this.selectedPitchSlabBasePrice;
|
|
37
|
+
};
|
|
38
|
+
SubscribedPricingPlanModel.prototype.getGrossAmount = function () {
|
|
39
|
+
return Math.round(this.selectedPitchSlabBasePrice *
|
|
40
|
+
this.pitchCount *
|
|
41
|
+
this.hourInMonth *
|
|
42
|
+
this.selectedBillingCycle.to);
|
|
43
|
+
};
|
|
44
|
+
SubscribedPricingPlanModel.prototype.getNetAmount = function () {
|
|
45
|
+
return Math.round(this.selectedPitchSlabBasePrice *
|
|
46
|
+
(1 - this.getBillingDiscount() / 100) *
|
|
47
|
+
this.pitchCount *
|
|
48
|
+
this.hourInMonth *
|
|
49
|
+
this.selectedBillingCycle.to);
|
|
50
|
+
};
|
|
51
|
+
SubscribedPricingPlanModel.prototype.getBillingDiscount = function () {
|
|
52
|
+
return this.selectedBillingCycle.getDiscount();
|
|
53
|
+
};
|
|
54
|
+
SubscribedPricingPlanModel.prototype.getMonthDifference = function (that) {
|
|
55
|
+
return that.getMonths() - this.getMonths();
|
|
56
|
+
};
|
|
57
|
+
SubscribedPricingPlanModel.prototype.getGrossAmountByMonth = function (month) {
|
|
58
|
+
return Math.round(this.selectedPitchSlabBasePrice *
|
|
59
|
+
this.pitchCount *
|
|
60
|
+
this.hourInMonth *
|
|
61
|
+
month);
|
|
62
|
+
};
|
|
63
|
+
SubscribedPricingPlanModel.prototype.getNetAmountByMonth = function (month) {
|
|
64
|
+
return Math.round(this.selectedPitchSlabBasePrice *
|
|
65
|
+
(1 - this.getBillingDiscount() / 100) *
|
|
66
|
+
this.pitchCount *
|
|
67
|
+
this.hourInMonth *
|
|
68
|
+
month);
|
|
69
|
+
};
|
|
70
|
+
SubscribedPricingPlanModel.prototype.getGrossAmountByPitchDays = function (pitchCount, days) {
|
|
71
|
+
return Math.round(this.selectedPitchSlabBasePrice * pitchCount * days * 24);
|
|
72
|
+
};
|
|
73
|
+
SubscribedPricingPlanModel.prototype.getNetAmountByPitchDays = function (pitchCount, days) {
|
|
74
|
+
return Math.round(this.selectedPitchSlabBasePrice *
|
|
75
|
+
(1 - this.getBillingDiscount() / 100) *
|
|
76
|
+
pitchCount *
|
|
77
|
+
days *
|
|
78
|
+
24);
|
|
79
|
+
};
|
|
80
|
+
SubscribedPricingPlanModel.prototype.getGrossAmountByPitchDaysBasePrice = function (basePrice, pitchCount, days) {
|
|
81
|
+
return Math.round(basePrice * pitchCount * days * 24);
|
|
82
|
+
};
|
|
83
|
+
SubscribedPricingPlanModel.prototype.getNetAmountByPitchDaysBasePrice = function (basePrice, pitchCount, days) {
|
|
84
|
+
return Math.round(basePrice * (1 - this.getBillingDiscount() / 100) * pitchCount * days * 24);
|
|
85
|
+
};
|
|
86
|
+
return SubscribedPricingPlanModel;
|
|
87
|
+
}(pricing_plan_model_1.PricingPlanModel));
|
|
88
|
+
exports.SubscribedPricingPlanModel = SubscribedPricingPlanModel;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SubscriptionStatus } from "../interface/subscription-status.interface";
|
|
2
|
+
import { ISubscriptionEntity, ISubscriptionModel } from "../types/entity/subscription-entity.type";
|
|
3
|
+
export declare class SubscriptionModel implements ISubscriptionModel {
|
|
4
|
+
id: number;
|
|
5
|
+
organizationId: number;
|
|
6
|
+
from: Date;
|
|
7
|
+
to: Date;
|
|
8
|
+
type: string;
|
|
9
|
+
grossAmount: number;
|
|
10
|
+
discount: string;
|
|
11
|
+
netAmount: number;
|
|
12
|
+
amountPaid: number;
|
|
13
|
+
status: SubscriptionStatus;
|
|
14
|
+
noOfPitches: number;
|
|
15
|
+
remarks: string;
|
|
16
|
+
registrationId: number;
|
|
17
|
+
pricingPlanId: number;
|
|
18
|
+
previousSubscriptionIds: string;
|
|
19
|
+
createdOn: Date;
|
|
20
|
+
updatedOn: Date;
|
|
21
|
+
createdBy: number;
|
|
22
|
+
updatedBy: number;
|
|
23
|
+
constructor(data: ISubscriptionEntity);
|
|
24
|
+
remainingSubscriptionDays(): number;
|
|
25
|
+
static updateStatus(subscriptionEntities: ISubscriptionEntity[], status: SubscriptionStatus, userId: number): ISubscriptionEntity[];
|
|
26
|
+
remainingAmount(): number;
|
|
27
|
+
isAmountFullyPaid(): boolean;
|
|
28
|
+
isAmountPaidGreater(): boolean;
|
|
29
|
+
updateStatusIfPaymentDone(): void;
|
|
30
|
+
}
|