LoyaltyObject.fromJson constructor
LoyaltyObject.fromJson(
- Map json_
Implementation
LoyaltyObject.fromJson(core.Map json_)
: this(
accountId: json_.containsKey('accountId')
? json_['accountId'] as core.String
: null,
accountName: json_.containsKey('accountName')
? json_['accountName'] as core.String
: null,
appLinkData: json_.containsKey('appLinkData')
? AppLinkData.fromJson(
json_['appLinkData'] as core.Map<core.String, core.dynamic>)
: null,
barcode: json_.containsKey('barcode')
? Barcode.fromJson(
json_['barcode'] as core.Map<core.String, core.dynamic>)
: null,
classId: json_.containsKey('classId')
? json_['classId'] as core.String
: null,
classReference: json_.containsKey('classReference')
? LoyaltyClass.fromJson(json_['classReference']
as core.Map<core.String, core.dynamic>)
: null,
disableExpirationNotification:
json_.containsKey('disableExpirationNotification')
? json_['disableExpirationNotification'] as core.bool
: null,
groupingInfo: json_.containsKey('groupingInfo')
? GroupingInfo.fromJson(
json_['groupingInfo'] as core.Map<core.String, core.dynamic>)
: null,
hasLinkedDevice: json_.containsKey('hasLinkedDevice')
? json_['hasLinkedDevice'] as core.bool
: null,
hasUsers: json_.containsKey('hasUsers')
? json_['hasUsers'] as core.bool
: null,
heroImage: json_.containsKey('heroImage')
? Image.fromJson(
json_['heroImage'] as core.Map<core.String, core.dynamic>)
: null,
id: json_.containsKey('id') ? json_['id'] as core.String : null,
imageModulesData: json_.containsKey('imageModulesData')
? (json_['imageModulesData'] as core.List)
.map((value) => ImageModuleData.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
infoModuleData: json_.containsKey('infoModuleData')
? InfoModuleData.fromJson(json_['infoModuleData']
as core.Map<core.String, core.dynamic>)
: null,
kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
linkedOfferIds: json_.containsKey('linkedOfferIds')
? (json_['linkedOfferIds'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
linksModuleData: json_.containsKey('linksModuleData')
? LinksModuleData.fromJson(json_['linksModuleData']
as core.Map<core.String, core.dynamic>)
: null,
locations: json_.containsKey('locations')
? (json_['locations'] as core.List)
.map((value) => LatLongPoint.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
loyaltyPoints: json_.containsKey('loyaltyPoints')
? LoyaltyPoints.fromJson(
json_['loyaltyPoints'] as core.Map<core.String, core.dynamic>)
: null,
messages: json_.containsKey('messages')
? (json_['messages'] as core.List)
.map((value) => Message.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
passConstraints: json_.containsKey('passConstraints')
? PassConstraints.fromJson(json_['passConstraints']
as core.Map<core.String, core.dynamic>)
: null,
rotatingBarcode: json_.containsKey('rotatingBarcode')
? RotatingBarcode.fromJson(json_['rotatingBarcode']
as core.Map<core.String, core.dynamic>)
: null,
secondaryLoyaltyPoints: json_.containsKey('secondaryLoyaltyPoints')
? LoyaltyPoints.fromJson(json_['secondaryLoyaltyPoints']
as core.Map<core.String, core.dynamic>)
: null,
smartTapRedemptionValue: json_.containsKey('smartTapRedemptionValue')
? json_['smartTapRedemptionValue'] as core.String
: null,
state:
json_.containsKey('state') ? json_['state'] as core.String : null,
textModulesData: json_.containsKey('textModulesData')
? (json_['textModulesData'] as core.List)
.map((value) => TextModuleData.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
validTimeInterval: json_.containsKey('validTimeInterval')
? TimeInterval.fromJson(json_['validTimeInterval']
as core.Map<core.String, core.dynamic>)
: null,
version: json_.containsKey('version')
? json_['version'] as core.String
: null,
);