VolumeBasedTierPromotion
Type: schema
Description
Unit prices by quantity tier: a line pays the rate of the tier its quantity reaches.
TypeScript Definition
typescript
VolumeBasedTierPromotion: {{
/**
* @description discriminator enum property added by openapi-typescript
* @enum {string}
*/
promotion_type: "volume-based-tier";
slabs: {
quantity: number;
/**
* @description `less-or-equal` and `less` make the tier "up to" `quantity`; `greater-or-equal` and `greater` make it "from" `quantity`. A line gets the highest "from" tier its quantity reaches; below the first, the "up to" tier that covers it; otherwise the product's price. A promotion has at most one "up to" tier, ending below its first "from" tier, and no two tiers starting from the same quantity.
* @enum {unknown}
*/
quantity_condition: "less" | "less-or-equal" | "greater" | "greater-or-equal";
/** @description The unit price of a line in this tier. Applies when lower than the product's price. */
rate: number;
}[];
};
/** WalletPayment */
}OpenAPI Schema
json
{
"description": "Unit prices by quantity tier: a line pays the `rate` of the tier its quantity reaches.",
"type": "object",
"properties": {
"promotion_type": {
"type": "string",
"const": "volume-based-tier"
},
"slabs": {
"type": "array",
"items": {
"type": "object",
"required": [
"quantity",
"quantity_condition",
"rate"
],
"properties": {
"quantity": {
"type": "integer"
},
"quantity_condition": {
"description": "`less-or-equal` and `less` make the tier \"up to\" `quantity`; `greater-or-equal` and `greater` make it \"from\" `quantity`. A line gets the highest \"from\" tier its quantity reaches; below the first, the \"up to\" tier that covers it; otherwise the product's price. A promotion has at most one \"up to\" tier, ending below its first \"from\" tier, and no two tiers starting from the same quantity.",
"enum": [
"less",
"less-or-equal",
"greater",
"greater-or-equal"
]
},
"rate": {
"description": "The unit price of a line in this tier. Applies when lower than the product's price.",
"type": "number",
"minimum": 0.01
}
}
}
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/schemas/VolumeBasedTierPromotion"
},
"required": [
"promotion_type",
"slabs"
],
"title": "VolumeBasedTierPromotion"
}Auto-generated from OpenAPI spec and TypeScript definitions