SpecialOffer¶
The SpecialOffer object represents a special offer in the storefront.
classDiagram
direction LR
SpecialOffer --> DateTime
VariantSpecialOffer --> SpecialOffer
class DateTime{
}
class VariantSpecialOffer{
}
class SpecialOffer{
int id
float discount
DateTime startDate
DateTime endDate
bool isPercentage
bool isAmount
}
Properties¶
Attribute name | Type | Description |
---|---|---|
id | int |
Returns the special offer identifier. |
discount | float |
Returns the discount. |
startDate | DateTime |
The DateTime object representing a promotion start date. |
endDate | DateTime |
The DateTime object representing a promotion end date. |
isPercentage | bool |
Indicates whether the discount is expressed as a percentage. It returns true if the discount is a percentage type, meaning the discount value is expressed as a percentage of the original price. Returns false if the discount is a fixed amount. |
isAmount | bool |
Indicates whether the discount is expressed as a fixed amount. It returns true if the discount is a fixed amount, meaning the discount value is specified as a fixed monetary value rather than a percentage of the original price. Returns false if the discount is percentage-based. |