Product.fromJson constructor

Product.fromJson(
  1. Map _json
)

Implementation

Product.fromJson(core.Map _json)
    : this(
        availableEndTime: _json.containsKey('availableEndTime')
            ? _json['availableEndTime'] as core.String
            : null,
        availableStartTime: _json.containsKey('availableStartTime')
            ? _json['availableStartTime'] as core.String
            : null,
        createTime: _json.containsKey('createTime')
            ? _json['createTime'] as core.String
            : null,
        creatorContacts: _json.containsKey('creatorContacts')
            ? (_json['creatorContacts'] as core.List)
                .map<ContactInformation>((value) =>
                    ContactInformation.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        displayName: _json.containsKey('displayName')
            ? _json['displayName'] as core.String
            : null,
        hasCreatorSignedOff: _json.containsKey('hasCreatorSignedOff')
            ? _json['hasCreatorSignedOff'] as core.bool
            : null,
        productId: _json.containsKey('productId')
            ? _json['productId'] as core.String
            : null,
        productRevision: _json.containsKey('productRevision')
            ? _json['productRevision'] as core.String
            : null,
        publisherProfileId: _json.containsKey('publisherProfileId')
            ? _json['publisherProfileId'] as core.String
            : null,
        seller: _json.containsKey('seller')
            ? Seller.fromJson(
                _json['seller'] as core.Map<core.String, core.dynamic>)
            : null,
        syndicationProduct: _json.containsKey('syndicationProduct')
            ? _json['syndicationProduct'] as core.String
            : null,
        targetingCriterion: _json.containsKey('targetingCriterion')
            ? (_json['targetingCriterion'] as core.List)
                .map<TargetingCriteria>((value) => TargetingCriteria.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        terms: _json.containsKey('terms')
            ? DealTerms.fromJson(
                _json['terms'] as core.Map<core.String, core.dynamic>)
            : null,
        updateTime: _json.containsKey('updateTime')
            ? _json['updateTime'] as core.String
            : null,
        webPropertyCode: _json.containsKey('webPropertyCode')
            ? _json['webPropertyCode'] as core.String
            : null,
      );