Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 3.12 KB

OrderPrice.md

File metadata and controls

38 lines (29 loc) · 3.12 KB

OrderPrice

A JSON object containing order's price in the minor unit format.

Properties

Name Type Description Notes
subtotal int Total item and modifier price (tax-inclusive) in the minor unit. ``` subtotal = Sum of all (item price * quantity) 2550*1=2550
tax int GrabFood's tax in the minor unit. Refer to FAQs for more details about tax. ``` tax = (subtotal + merchantChargeFee - merchantFundPromo) * Tax / (1+Tax) (2550-475)*0.06/1.06=117
merchant_charge_fee int Any additional fee charged by merchant (tax-inclusive), which is 100% paid out to the merchant. Eg. Takeaway, packaging costs, dine-in charge. [optional]
grab_fund_promo int GrabFood's promo fund in the minor unit. Calculated based on funded ratio. Only present when `paymentType:CASH` or `orderType:DeliveredByRestaurant`. Otherwise, it will be set to `0`. [optional]
merchant_fund_promo int The merchant's promo fund in the minor unit. Calculated based on funded ratio. [optional]
basket_promo int The total amount promo applied to the basket items only (item level/order level) in the minor unit, excluding delivery fee. Only present when `paymentType: CASH` or `orderType: DeliveredByRestaurant`. Otherwise, it will be set to `0`. ``` basketPromo = (grabFundPromo + merchantFundPromo) 300 + 475 = 775
delivery_fee int The delivery fee in the minor unit. Only present when `paymentType:CASH` or `orderType:DeliveredByRestaurant`. Otherwise, it will be set to `0`. [optional]
small_order_fee int The fee charged by GrabFood for order that does not meet a certain minimum order value. Only present when `paymentType:CASH` and `orderType:DeliveredByRestaurant`. [optional]
eater_payment int The total amount paid by the consumer in the minor unit, excluding some additional fees charged by GrabFood. Only present when `paymentType:CASH` or `orderType:DeliveredByRestaurant`. Otherwise, it will be set to `0`. ``` eaterPayment = (subtotal + merchantChargeFee + deliveryFee) - (sum of all promo) (2550+400)-775=2175

Example

from grabfood.models.order_price import OrderPrice

# TODO update the JSON string below
json = "{}"
# create an instance of OrderPrice from a JSON string
order_price_instance = OrderPrice.from_json(json)
# print the JSON string representation of the object
print(OrderPrice.to_json())

# convert the object into a dict
order_price_dict = order_price_instance.to_dict()
# create an instance of OrderPrice from a dict
order_price_from_dict = OrderPrice.from_dict(order_price_dict)

[Back to Model list] [Back to API list] [Back to README]