The discount detail for a particular campaign when conditions are satisfied.
Name | Type | Description | Notes |
---|---|---|---|
type | str | The type of discount | |
cap | float | The maximum discount dollar amount. It is not required and will be ignored when the `discount.type` is: - `net` - `delivery` - `freeItem` - `bundleSameNet` - `bundleSamePercentage` - `bundleSameFixPrice` - `bundleDiffNet` - `bundleDiffPercentage` - `bundleDiffFixPrice` | [optional] |
value | float | Specify the discount amount. Decimal number is not supported For VN, ID and TH. For example, `10.5` is not allowed and it should be `10.0`. * Dollar amount value when `discount.type` is `net`, `delivery`, `bundleSameNet`, `bundleSameFixPrice`, `bundleDiffNet`, `bundleDiffFixPrice`. * Percentage value (0-100) when `discount.type` is `percentage`, `bundleSamePercentage`, `bundleDiffPercentage`. * Not required when `discount.type` is `freeItem`. | [optional] |
scope | CampaignScope |
from grabfood.models.campaign_discount import CampaignDiscount
# TODO update the JSON string below
json = "{}"
# create an instance of CampaignDiscount from a JSON string
campaign_discount_instance = CampaignDiscount.from_json(json)
# print the JSON string representation of the object
print(CampaignDiscount.to_json())
# convert the object into a dict
campaign_discount_dict = campaign_discount_instance.to_dict()
# create an instance of CampaignDiscount from a dict
campaign_discount_from_dict = CampaignDiscount.from_dict(campaign_discount_dict)