turf-common 1.2.1-beta.5 → 1.2.1-beta.7
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IBookingDetailsWithBookingCodes, IChargeModel } from "../../@type";
|
|
2
2
|
import { IModifyEntity } from "../modify-entity.interface";
|
|
3
|
-
export interface
|
|
3
|
+
export interface IBookingDetailsData extends IModifyEntity<IBookingDetailsWithBookingCodes>, IChargeModel {
|
|
4
4
|
code?: string;
|
|
5
5
|
slot_cost?: string;
|
|
6
6
|
}
|
|
@@ -26,8 +26,8 @@ export declare class ChargesModel implements IChargeModel {
|
|
|
26
26
|
private modifyMove;
|
|
27
27
|
clone(): ChargesModel;
|
|
28
28
|
private modifyDelete;
|
|
29
|
-
static getInstance(
|
|
30
|
-
static assignByInterface(
|
|
29
|
+
static getInstance(chargeData: IChargeModel, discountPolicy?: ModificationDiscountPolicy): ChargesModel;
|
|
30
|
+
static assignByInterface(chargeData: IChargeModel, discountPolicy?: ModificationDiscountPolicy): ChargesModel;
|
|
31
31
|
getTotalAmount(): number;
|
|
32
32
|
getPaymentStatus(): "Refund" | "Paid" | "Pending";
|
|
33
33
|
getTotalNetAmount(): number;
|
|
@@ -185,30 +185,29 @@ var ChargesModel = /** @class */ (function () {
|
|
|
185
185
|
}
|
|
186
186
|
return newChargeModel;
|
|
187
187
|
};
|
|
188
|
-
ChargesModel.getInstance = function (
|
|
188
|
+
ChargesModel.getInstance = function (chargeData, discountPolicy) {
|
|
189
189
|
if (discountPolicy === void 0) { discountPolicy = modification_discount_policy_enum_1.ModificationDiscountPolicy.DISCOUNT_CONDITIONAL; }
|
|
190
|
-
var chargesModel = new ChargesModel(
|
|
191
|
-
Object.assign(chargesModel,
|
|
190
|
+
var chargesModel = new ChargesModel(chargeData.initialBookingGrossAmount, chargeData.amountPaid, chargeData.couponCode, discountPolicy);
|
|
191
|
+
Object.assign(chargesModel, chargeData);
|
|
192
192
|
return chargesModel;
|
|
193
193
|
};
|
|
194
|
-
ChargesModel.assignByInterface = function (
|
|
194
|
+
ChargesModel.assignByInterface = function (chargeData, discountPolicy) {
|
|
195
195
|
if (discountPolicy === void 0) { discountPolicy = modification_discount_policy_enum_1.ModificationDiscountPolicy.DISCOUNT_CONDITIONAL; }
|
|
196
|
-
var newChargeModel = new ChargesModel(
|
|
196
|
+
var newChargeModel = new ChargesModel(chargeData.initialBookingGrossAmount, chargeData.amountPaid, chargeData.couponCode, discountPolicy);
|
|
197
197
|
newChargeModel.additionalBookingGrossAmount =
|
|
198
|
-
|
|
198
|
+
chargeData.additionalBookingGrossAmount;
|
|
199
199
|
newChargeModel.initialBookingGrossAmount =
|
|
200
|
-
|
|
200
|
+
chargeData.initialBookingGrossAmount;
|
|
201
201
|
newChargeModel.cancelledBookingGrossAmount =
|
|
202
|
-
|
|
203
|
-
newChargeModel.refundPayable =
|
|
204
|
-
newChargeModel.totalRefundedAmount =
|
|
205
|
-
|
|
206
|
-
newChargeModel.amountPaid = bookingDetailsEntity.amountPaid;
|
|
202
|
+
chargeData.cancelledBookingGrossAmount;
|
|
203
|
+
newChargeModel.refundPayable = chargeData.refundPayable;
|
|
204
|
+
newChargeModel.totalRefundedAmount = chargeData.totalRefundedAmount;
|
|
205
|
+
newChargeModel.amountPaid = chargeData.amountPaid;
|
|
207
206
|
newChargeModel.totalCancellationCharges =
|
|
208
|
-
|
|
209
|
-
newChargeModel.netTotal =
|
|
210
|
-
newChargeModel.couponCode =
|
|
211
|
-
newChargeModel.amountPayable =
|
|
207
|
+
chargeData.totalCancellationCharges;
|
|
208
|
+
newChargeModel.netTotal = chargeData.netTotal;
|
|
209
|
+
newChargeModel.couponCode = chargeData.couponCode;
|
|
210
|
+
newChargeModel.amountPayable = chargeData.amountPayable;
|
|
212
211
|
return newChargeModel;
|
|
213
212
|
};
|
|
214
213
|
ChargesModel.prototype.getTotalAmount = function () {
|