Promotion.fromJson constructor
Promotion.fromJson(
- Map json_
Implementation
Promotion.fromJson(core.Map json_)
: this(
attributes:
json_.containsKey('attributes')
? Attributes.fromJson(
json_['attributes'] as core.Map<core.String, core.dynamic>,
)
: null,
contentLanguage: json_['contentLanguage'] as core.String?,
customAttributes:
(json_['customAttributes'] as core.List?)
?.map(
(value) => CustomAttribute.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
dataSource: json_['dataSource'] as core.String?,
name: json_['name'] as core.String?,
promotionId: json_['promotionId'] as core.String?,
promotionStatus:
json_.containsKey('promotionStatus')
? PromotionStatus.fromJson(
json_['promotionStatus']
as core.Map<core.String, core.dynamic>,
)
: null,
redemptionChannel:
(json_['redemptionChannel'] as core.List?)
?.map((value) => value as core.String)
.toList(),
targetCountry: json_['targetCountry'] as core.String?,
versionNumber: json_['versionNumber'] as core.String?,
);