turf-common 1.2.1-beta.4 → 1.2.1-beta.6
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.
|
@@ -26,10 +26,9 @@ export declare class ChargesModel implements IChargeModel {
|
|
|
26
26
|
private modifyMove;
|
|
27
27
|
clone(): ChargesModel;
|
|
28
28
|
private modifyDelete;
|
|
29
|
-
static
|
|
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
|
-
static getInstance(data: Partial<ChargesModel>, discountPolicy?: ModificationDiscountPolicy): ChargesModel;
|
|
34
33
|
getTotalNetAmount(): number;
|
|
35
34
|
}
|
|
@@ -185,30 +185,29 @@ var ChargesModel = /** @class */ (function () {
|
|
|
185
185
|
}
|
|
186
186
|
return newChargeModel;
|
|
187
187
|
};
|
|
188
|
-
ChargesModel.
|
|
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 () {
|
|
@@ -222,13 +221,6 @@ var ChargesModel = /** @class */ (function () {
|
|
|
222
221
|
? "Paid"
|
|
223
222
|
: "Pending";
|
|
224
223
|
};
|
|
225
|
-
ChargesModel.getInstance = function (data, discountPolicy) {
|
|
226
|
-
if (discountPolicy === void 0) { discountPolicy = modification_discount_policy_enum_1.ModificationDiscountPolicy.DISCOUNT_CONDITIONAL; }
|
|
227
|
-
var chargesModel = new ChargesModel(data.initialBookingGrossAmount, data.amountPaid, data.couponCode, discountPolicy);
|
|
228
|
-
// set values
|
|
229
|
-
Object.assign(chargesModel, data);
|
|
230
|
-
return chargesModel;
|
|
231
|
-
};
|
|
232
224
|
ChargesModel.prototype.getTotalNetAmount = function () {
|
|
233
225
|
return this.getNetAmount() + this.totalCancellationCharges;
|
|
234
226
|
};
|