Invoice Discount Template Collection

Description

A collection (or list) of resources.

Properties

Property Description
items

A collection of resources returned in the current result set.

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.

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.

meta read-only

Metadata describing the current result set.

Property Description
currentPage

The current page of results returned.

rows

The number of rows returned per page for the current result set.

totalItems

The total number of items in the result set. This may be affected by active search/filter parameters.

totalPages

The total number of pages in the result set. This is affected by the rows parameter (totalItems / rows == totalPages).

type

The type of resource represented.

OpenAPI Schema

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

{
  "description": "A collection (or list) of resources.",
  "properties": {
    "items": {
      "description": "A collection of resources returned in the current result set.",
      "items": {
        "description": "An invoice discount template may be used when adding a discount to an\n[invoice](https://developer.shootproof.com/reference/studio/components/schemas/invoice/)\nor [invoice template](https://developer.shootproof.com/reference/studio/components/schemas/invoice-template/).\nIt is a useful way to store invoice discounts for repeated use.",
        "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": {
            "description": "The type of resource represented.",
            "enum": [
              "invoice-discount-template"
            ],
            "example": "resource-type",
            "title": "Resource Type",
            "type": "string"
          },
          "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"
        ],
        "title": "Invoice Discount Template",
        "type": "object"
      },
      "title": "Invoice Discount Template",
      "type": "array"
    },
    "links": {
      "$ref": "#/components/schemas/Links"
    },
    "meta": {
      "description": "Metadata describing the current result set.",
      "properties": {
        "currentPage": {
          "description": "The current page of results returned.",
          "type": "integer"
        },
        "rows": {
          "description": "The number of rows returned per page for the current result set.",
          "type": "integer"
        },
        "totalItems": {
          "description": "The total number of items in the result set. This may be\naffected by active search/filter parameters.",
          "type": "integer"
        },
        "totalPages": {
          "description": "The total number of pages in the result set. This is affected by\nthe `rows` parameter (`totalItems / rows == totalPages`).",
          "type": "integer"
        }
      },
      "readOnly": true,
      "type": "object"
    },
    "type": {
      "description": "The type of resource represented.",
      "enum": [
        "invoice-discount-template-collection"
      ],
      "example": "resource-type",
      "title": "Resource Type",
      "type": "string"
    }
  },
  "required": [
    "type",
    "items"
  ],
  "title": "Collection of Invoice Discount Templates",
  "type": "object"
}