Skip to content

Latest commit

 

History

History
95 lines (86 loc) · 4.21 KB

order-return.md

File metadata and controls

95 lines (86 loc) · 4.21 KB

Order Return

The set of line items, service charges, taxes, discounts, tips, and other items being returned in an order.

Structure

OrderReturn

Fields

Name Type Tags Description Getter
Uid String Optional A unique ID that identifies the return only within this order.
Constraints: Maximum Length: 60
String getUid()
SourceOrderId String Optional An order that contains the original sale of these return line items. This is unset
for unlinked returns.
String getSourceOrderId()
ReturnLineItems List<OrderReturnLineItem> Optional A collection of line items that are being returned. List getReturnLineItems()
ReturnServiceCharges List<OrderReturnServiceCharge> Optional A collection of service charges that are being returned. List getReturnServiceCharges()
ReturnTaxes List<OrderReturnTax> Optional A collection of references to taxes being returned for an order, including the total
applied tax amount to be returned. The taxes must reference a top-level tax ID from the source
order.
List getReturnTaxes()
ReturnDiscounts List<OrderReturnDiscount> Optional A collection of references to discounts being returned for an order, including the total
applied discount amount to be returned. The discounts must reference a top-level discount ID
from the source order.
List getReturnDiscounts()
ReturnTips List<OrderReturnTip> Optional A collection of references to tips being returned for an order. List getReturnTips()
RoundingAdjustment OrderRoundingAdjustment Optional A rounding adjustment of the money being returned. Commonly used to apply cash rounding
when the minimum unit of the account is smaller than the lowest physical denomination of the currency.
OrderRoundingAdjustment getRoundingAdjustment()
ReturnAmounts OrderMoneyAmounts Optional A collection of various money amounts. OrderMoneyAmounts getReturnAmounts()

Example (as JSON)

{
  "uid": "uid2",
  "source_order_id": "source_order_id0",
  "return_line_items": [
    {
      "uid": "uid0",
      "source_line_item_uid": "source_line_item_uid2",
      "name": "name0",
      "quantity": "quantity6",
      "quantity_unit": {
        "measurement_unit": {
          "custom_unit": {
            "name": "name2",
            "abbreviation": "abbreviation4"
          },
          "area_unit": "IMPERIAL_ACRE",
          "length_unit": "IMPERIAL_INCH",
          "volume_unit": "METRIC_LITER",
          "weight_unit": "IMPERIAL_WEIGHT_OUNCE"
        },
        "precision": 54,
        "catalog_object_id": "catalog_object_id0",
        "catalog_version": 12
      },
      "note": "note4"
    }
  ],
  "return_service_charges": [
    {
      "uid": "uid6",
      "source_service_charge_uid": "source_service_charge_uid0",
      "name": "name6",
      "catalog_object_id": "catalog_object_id0",
      "catalog_version": 12
    },
    {
      "uid": "uid6",
      "source_service_charge_uid": "source_service_charge_uid0",
      "name": "name6",
      "catalog_object_id": "catalog_object_id0",
      "catalog_version": 12
    }
  ],
  "return_taxes": [
    {
      "uid": "uid2",
      "source_tax_uid": "source_tax_uid0",
      "catalog_object_id": "catalog_object_id4",
      "catalog_version": 106,
      "name": "name2"
    },
    {
      "uid": "uid2",
      "source_tax_uid": "source_tax_uid0",
      "catalog_object_id": "catalog_object_id4",
      "catalog_version": 106,
      "name": "name2"
    },
    {
      "uid": "uid2",
      "source_tax_uid": "source_tax_uid0",
      "catalog_object_id": "catalog_object_id4",
      "catalog_version": 106,
      "name": "name2"
    }
  ]
}