new module:models/Promotion()
Constructs a new Promotion
.
Document representing a promotion.
- Source:
Members
(inner) callout_msg :String
The localized call-out message of the promotion.
Type:
- String
- Source:
(inner) currency :String
The currency that a promotion can be applied to. A null value means that the promotion applies to all allowed currencies.
Type:
- String
- Source:
(inner) details :String
The localized detailed description of the promotion.
Type:
- String
- Source:
(inner) discounted_products_link :String
An optional product search link. Product promotions that are marked searchable provide a product search link with the promotion id as refinement.
Type:
- String
- Source:
(inner) end_date :Date
The end date of the promotion. This property follows the ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ . The time zone of the date time is always UTC.
Type:
- Date
- Source:
(inner) id :String
The unique id of the promotion.
Type:
- String
- Source:
(inner) image :String
The URL to the promotion image.
Type:
- String
- Source:
(inner) name :String
The localized name of the promotion.
Type:
- String
- Source:
(inner) start_date :Date
The start date of the promotion. This property follows the ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ. The time zone of the date time is always UTC.
Type:
- Date
- Source:
Methods
(static) constructFromObject(data, obj) → {module:models/Promotion}
Constructs a Promotion
from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data
to obj
if supplied or a new instance if not.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The plain JavaScript object bearing properties of interest. |
obj |
module:models/Promotion | Optional instance to populate. |
- Source:
Returns:
The populated Promotion
instance.