type: object
properties:
  reference:
    type: string
  currency:
    type: string
  total:
    type: number
    description: "Total amount of the invoice, after discounts"
  itemsTotal:
    type: number
    description: "Total items price before discounts application"
  shippingTotal:
    type: number
    description: "The shipping price"
  senderAddress:
    $ref: './Address.yaml'
  billingAddress:
    $ref: './Address.yaml'
  shippingAddress:
    $ref: './Address.yaml'
  items:
    type: array
    items:
      $ref: './Item.yaml'
  discounts:
    type: array
    items:
      $ref: './Discount.yaml'

required:
  - reference
  - total
  - itemsTotal
  - shippingTotal
  - currency
  - senderAddress
  - shippingAddress
  - items

