CalculateOrderRequest
Name | Type | Tags | Description | Getter |
---|---|---|---|---|
Order |
Order |
Contains all information related to a single order to process with Square, including line items that specify the products to purchase. Order objects also include information on any associated tenders, refunds, and returns. All Connect V2 Transactions have all been converted to Orders including all associated itemization data. |
Order getOrder() | |
ProposedRewards |
List<OrderReward> |
Optional | Identifies one or more loyalty reward tiers to apply during order calculation. The discounts defined by the reward tiers are added to the order only to preview the effect of applying the specified reward(s). The reward(s) do not correspond to actual redemptions, that is, no reward s are created. Therefore, the reward id s arerandom strings used only to reference the reward tier. |
List getProposedRewards() |
{
"idempotency_key": "b3e98fe3-b8de-471c-82f1-545f371e637c",
"order": {
"location_id": "D7AVYMEAPJ3A3",
"discounts": [
{
"name": "50% Off",
"percentage": "50",
"scope": "ORDER"
}
],
"line_items": [
{
"name": "Item 1",
"quantity": "1",
"base_price_money": {
"amount": 500,
"currency": "USD"
}
},
{
"name": "Item 2",
"quantity": "2",
"base_price_money": {
"amount": 300,
"currency": "USD"
}
}
]
}
}