Promotion.fromJson constructor
Promotion.fromJson(
- Map json_
Implementation
Promotion.fromJson(core.Map json_)
: this(
applicableProducts:
(json_['applicableProducts'] as core.List?)
?.map((value) => value as core.String)
.toList(),
endTime: json_['endTime'] as core.String?,
freeTrialDuration:
json_.containsKey('freeTrialDuration')
? Duration.fromJson(
json_['freeTrialDuration']
as core.Map<core.String, core.dynamic>,
)
: null,
introductoryPricingDetails:
json_.containsKey('introductoryPricingDetails')
? PromotionIntroductoryPricingDetails.fromJson(
json_['introductoryPricingDetails']
as core.Map<core.String, core.dynamic>,
)
: null,
name: json_['name'] as core.String?,
promotionType: json_['promotionType'] as core.String?,
regionCodes:
(json_['regionCodes'] as core.List?)
?.map((value) => value as core.String)
.toList(),
startTime: json_['startTime'] as core.String?,
titles:
(json_['titles'] as core.List?)
?.map(
(value) => GoogleTypeLocalizedText.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);