title: Calculation Input
description: The fixed-value or percentage benefit for vouchers, direct quantity discounts and cashback
  earning. Supply the fields for the selected type in the merchant currency. Percentage benefits round half up
  once to minor units before applying an optional cap.
oneOf:
  - title: Fixed benefit
    type: object
    required:
      - type
      - fixed_value
    properties:
      type:
        type: string
        enum:
          - fixed
      fixed_value:
        $ref: ./PositiveMoney.yaml
      percentage:
        type: "null"
      percentage_cap:
        type: "null"
  - title: Percentage benefit
    type: object
    required:
      - type
      - percentage
    properties:
      type:
        type: string
        enum:
          - percentage
      fixed_value:
        type: "null"
      percentage:
        type: string
        pattern: ^(?:0\.[1-9]|[1-9][0-9]?(?:\.[0-9])?|100)$
        example: "10"
        description: The percentage discount, supplied as a string.
      percentage_cap:
        oneOf:
          - type: "null"
          - $ref: ./PositiveMoney.yaml
x-tags:
  - Models
