YQueue DocsDevelopers

Schema

Discount (Order)

Represents a discount that has been applied against an order line item.

  • Orders

Overview

object · 6 properties · 0 required

Properties

uuid

string

The unique identifier.

Format uuid

source_discount_uuid

string | null

The UUID of the original (catalog) discount that was used to create this instance. For ad-hoc discounts, this field will be `null`.

Format uuid
Nullable Yes

name

string

The name of the discount at the time the order was placed.

Example Sunday Specials
Min length 1
Max length 255

promo_code

string | null

The promo code that was entered by the customer to activate discount, if any.

Example FREECOFFEE
Min length 1
Max length 255
Nullable Yes

scope

enum

Indicates whether the discount was applied against line items individually, or spread across the order.

Allowed values

orderitem

value

reference

The total value of the discount.

References Money.

Used by

Raw YAML
Download source
title: Discount (Order)
type: object
x-tags:
  - Orders
description: Represents a discount that has been applied against an order line item.
properties:
  uuid:
    type: string
    format: uuid
    description: The unique identifier.
  source_discount_uuid:
    type:
      - string
      - 'null'
    description: |-
      The UUID of the original (catalog) discount that was used to create this instance.

      For ad-hoc discounts, this field will be `null`.
    format: uuid
  name:
    type: string
    minLength: 1
    maxLength: 255
    example: Sunday Specials
    description: The name of the discount at the time the order was placed.
  promo_code:
    type:
      - string
      - 'null'
    maxLength: 255
    minLength: 1
    description: 'The promo code that was entered by the customer to activate discount, if any.'
    example: FREECOFFEE
  scope:
    enum:
      - order
      - item
    description: 'Indicates whether the discount was applied against line items individually, or spread across the order.'
  value:
    $ref: ./Money.yaml
    description: The total value of the discount.

Search documentation

Search across this documentation site.