Skip to content

DiscountAction ​

Type: schema

TypeScript Definition ​

typescript
DiscountAction: {{
            /** @constant */
            type: "discount";
            /** @enum {string} */
            mode: "percent" | "absolute";
            /** @description Percentage (0–100) or absolute amount off */
            value: number;
        };
        /** DiscountBasedPromotion */
}

OpenAPI Schema ​

json
{
  "title": "DiscountAction",
  "type": "object",
  "required": [
    "type",
    "mode",
    "value"
  ],
  "properties": {
    "type": {
      "type": "string",
      "const": "discount"
    },
    "mode": {
      "type": "string",
      "enum": [
        "percent",
        "absolute"
      ]
    },
    "value": {
      "description": "Percentage (0–100) or absolute amount off",
      "type": "number",
      "minimum": 0
    }
  },
  "additionalProperties": false
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: