Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 2.51 KB

File metadata and controls

36 lines (27 loc) · 2.51 KB

OrderItem

Properties

Name Type Description Notes
id str The item's externalID in the partner system.
grab_item_id str The item's ID in Grab system. Partner can use this field in the `EditOrder` endpoint. Note: The index number (after `#`) is different for the same item with different modifiers. This helps identify items when editing complex orders. This is currently controlled by feature flag until full rollout, for non whitelisted partners, the '#' and index number will not be included.
quantity int The number of the item ordered.
price int The price for a single item along with its associated modifiers in minor unit and tax-inclusive. ``` price = Item price(tax inclusive) + Modifier price(tax inclusive) (22411.06)+(1651.06)=2550
tax int Tax in minor format for a single item total items along with its associated modifiers (multiply by quantity) . `0` if tax configuration is absent. Refer to FAQs for more details about tax. Note: Currently in Staging environment, the tax is calculated based on the single item. In Production environment, the tax is calculated based on the total items (multiply by quantity). There will be a change in the future to match the logic in Staging environment. ``` tax = Item tax + Modifier tax (22410.06)+(1650.06) * 1 =144
specifications str An extra note for the merchant. Empty if no note from consumer. [optional]
out_of_stock_instruction OutOfStockInstruction [optional]
modifiers List[OrderItemModifier] An array of JSON objects modifiers. [optional]

Example

from grabfood.models.order_item import OrderItem

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

# convert the object into a dict
order_item_dict = order_item_instance.to_dict()
# create an instance of OrderItem from a dict
order_item_from_dict = OrderItem.from_dict(order_item_dict)

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