iglooX DocsDevelopers

Schema

Calculation

The fixed-value or percentage benefit for vouchers, direct quantity discounts and cashback earning. Fields that do not apply are returned as null. Percentage benefits round half up once to minor units before applying an optional cap.

  • Models

Overview

object · 4 properties · 4 required

Properties

type

string Required

Allowed values

fixedpercentage

fixed_value

oneOf Required
Nullable Yes
One of

One of 1

null

One of 2

reference

References Positive Money.

percentage

oneOf Required
Nullable Yes
One of

One of 1

null

One of 2

string

The percentage discount, supplied as a string.

Example 10
Pattern ^(?:0\.[1-9]|[1-9][0-9]?(?:\.[0-9])?|100)$

percentage_cap

oneOf Required
Nullable Yes
One of

One of 1

null

One of 2

reference

References Positive Money.

Composition

One of

One of 1

object
Nested properties
type
string Required

Allowed values

fixed
fixed_value
reference Required

References Positive Money.

percentage
null
percentage_cap
null

One of 2

object
Nested properties
type
string Required

Allowed values

percentage
fixed_value
null
percentage
string Required

The percentage discount, supplied as a string.

Example 10
Pattern ^(?:0\.[1-9]|[1-9][0-9]?(?:\.[0-9])?|100)$
percentage_cap
oneOf
Nullable Yes
One of
One of 1
null
One of 2
reference

References Positive Money.

Used by

Raw YAML
Download source
title: Calculation
type: object
x-tags:
  - Models
description: The fixed-value or percentage benefit for vouchers, direct quantity discounts and cashback
  earning. Fields that do not apply are returned as null. Percentage benefits round half up once to minor
  units before applying an optional cap.
required:
  - type
  - fixed_value
  - percentage
  - percentage_cap
properties:
  type:
    type: string
    enum:
      - fixed
      - percentage
  fixed_value:
    oneOf:
      - type: "null"
      - $ref: ./PositiveMoney.yaml
  percentage:
    oneOf:
      - type: "null"
      - &a1
        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
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: *a1
      percentage_cap:
        oneOf:
          - type: "null"
          - $ref: ./PositiveMoney.yaml

Search documentation

Search across this documentation site.