Invoice Discount Base

Description

Properties

Property Description
created read-only

The date on which the entity was created.

description

A description of the discount for use as display text on the invoice.

discountType

The type of discount represented by the value.

id

An entity identifier. It may be either an integer or a universally unique identifier (UUID) represented as a string.

links required read-only

Each property defines a hypertext link relationship as indicated by a link object or array of link objects. The target URL of each hypertext link relationship is related to the current resource according to the defined semantics of the link relationship property name.

name

A short name to use for this discount.

type

The type of resource represented.

value

The amount this discount represents. This value may be a fixed amount (if discountType is "fixed") or a number between 0.0 and 100.0, representing a percentage of the total invoice (if discountType is "percent").

The discount value is allowed to be greater than the grand total of the invoice. In this case, the grand total will never be less than 0.00.

OpenAPI Schema

The following schema is based on OpenAPI 3.0 and is provided in our downloadable OpenAPI document.

{
  "properties": {
    "created": {
      "$ref": "#/components/schemas/Signature/properties/created"
    },
    "description": {
      "description": "A description of the discount for use as display text on the invoice.",
      "example": "Take 25% off your entire order as a special “Thank You” for your business.",
      "type": "string"
    },
    "discountType": {
      "description": "The type of discount represented by the value.",
      "enum": [
        "percent",
        "fixed"
      ],
      "type": "string"
    },
    "id": {
      "$ref": "#/components/schemas/Id"
    },
    "links": {
      "$ref": "#/components/schemas/Links"
    },
    "name": {
      "description": "A short name to use for this discount.",
      "example": "25% Off Special",
      "maxLength": 20,
      "type": "string"
    },
    "type": {
      "$ref": "#/components/schemas/Type"
    },
    "value": {
      "description": "The amount this discount represents. This value may be a fixed amount (if\n`discountType` is \"fixed\") or a number between `0.0` and `100.0`,\nrepresenting a percentage of the total invoice (if `discountType` is\n\"percent\").\n\nThe discount value is allowed to be greater than the grand total of the\ninvoice. In this case, the grand total will never be less than `0.00`.",
      "example": 25,
      "minimum": 0,
      "type": "number"
    }
  },
  "required": [
    "type",
    "name",
    "discountType",
    "value"
  ],
  "type": "object"
}