AmountsBreakdown

March 7, 2021 ยท View on GitHub

This is the primary AmountsBreakdown Class used for all things Domnio's.

Really unless you are working on the core of this module you don't need to understand this class as it is not used outside of the internals of the Order Class itself.

extends DominosFormat class, see more in DominosFormat.md

Constructor

new AmountsBreakdown(params)

params.typerequired
.foodAndBeverageStringno
.adjustmentStringno
.surchargeStringno
.deliveryFeeStringno
.taxNumberno
.tax1Numberno
.tax2Numberno
.tax3Numberno
.tax4Numberno
.tax5Numberno
.bottleNumberno
.customerNumberno
.roundingAdjustmentNumberno
.cashNumberno
.savingsStringno

Instance

Also check the DominosFormat.md as this class extends it.

member/methodtypedescription
.foodAndBeverageStringcost of the food and beverage.
.adjustmentString? maybe related to coupons ?
.surchargeString?
.deliveryFeeStringdelivery fee
.taxNumbertax
.tax1Numbermain tax
.tax2Number?
.tax3Number?
.tax4Number?
.tax5Number?
.bottleNumber? maybe a recycling crv?
.customerNumberTotal order price for the customer
.roundingAdjustmentNumber?
.cashNumber?
.savingsString? maybe related to coupons ?

  //this is a sample AmountsBreakdown from a dominos order

  AmountsBreakdown {
      foodAndBeverage: '31.98',
      adjustment: '0.00',
      surcharge: '0.00',
      deliveryFee: '0.00',
      tax: 2.96,
      tax1: 2.96,
      tax2: 0,
      tax3: 0,
      tax4: 0,
      tax5: 0,
      bottle: 0,
      customer: 34.94,
      roundingAdjustment: 0,
      cash: 0,
      savings: '0.00'
  }