title: Surcharge (Order)
type: object
properties:
  uuid:
    type: string
    format: uuid
    description: The unique identifier.
  source_surcharge_uuid:
    type:
      - string
      - 'null'
    description: |-
      The UUID of the original (catalog) surcharge that was used to create this instance.

      For ad-hoc surcharges, this field will be `null`.
    format: uuid
  name:
    type: string
    minLength: 1
    maxLength: 255
    example: Weekend Surcharge
    description: The name of the surcharge at the time the order was placed.
  type:
    enum:
      - generic
      - delivery_fee
      - cutlery_surcharge
    description: The type of surcharge that was levied.
  scope:
    enum:
      - order
      - item
    description: 'Indicates whether the surcharge was applied against line items individually, or spread across the order.'
  value:
    $ref: ./Money.yaml
    description: The total value of the surcharge.
  tax_exempt:
    type: boolean
    description: Indicates if this surcharge was exempt from tax calculations.
description: Represents a surcharge that has been levied against an order line item.
x-tags:
  - Orders
