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 BookingDetailsData extends IModifyEntity<IBookingDetailsWithBookingCodes>, IChargeModel {
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(bookingDetailsEntity: IChargeModel, discountPolicy?: ModificationDiscountPolicy): ChargesModel;
30
- static assignByInterface(bookingDetailsEntity: IChargeModel, discountPolicy?: ModificationDiscountPolicy): ChargesModel;
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 (bookingDetailsEntity, discountPolicy) {
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(bookingDetailsEntity.initialBookingGrossAmount, bookingDetailsEntity.amountPaid, bookingDetailsEntity.couponCode, discountPolicy);
191
- Object.assign(chargesModel, bookingDetailsEntity);
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 (bookingDetailsEntity, discountPolicy) {
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(bookingDetailsEntity.initialBookingGrossAmount, bookingDetailsEntity.amountPaid, bookingDetailsEntity.couponCode, discountPolicy);
196
+ var newChargeModel = new ChargesModel(chargeData.initialBookingGrossAmount, chargeData.amountPaid, chargeData.couponCode, discountPolicy);
197
197
  newChargeModel.additionalBookingGrossAmount =
198
- bookingDetailsEntity.additionalBookingGrossAmount;
198
+ chargeData.additionalBookingGrossAmount;
199
199
  newChargeModel.initialBookingGrossAmount =
200
- bookingDetailsEntity.initialBookingGrossAmount;
200
+ chargeData.initialBookingGrossAmount;
201
201
  newChargeModel.cancelledBookingGrossAmount =
202
- bookingDetailsEntity.cancelledBookingGrossAmount;
203
- newChargeModel.refundPayable = bookingDetailsEntity.refundPayable;
204
- newChargeModel.totalRefundedAmount =
205
- bookingDetailsEntity.totalRefundedAmount;
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
- bookingDetailsEntity.totalCancellationCharges;
209
- newChargeModel.netTotal = bookingDetailsEntity.netTotal;
210
- newChargeModel.couponCode = bookingDetailsEntity.couponCode;
211
- newChargeModel.amountPayable = bookingDetailsEntity.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 () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turf-common",
3
- "version": "1.2.1-beta.5",
3
+ "version": "1.2.1-beta.7",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",