Product.fromJson constructor

Product.fromJson(
  1. Map json_
)

Implementation

Product.fromJson(core.Map json_)
    : this(
        attributes: json_.containsKey('attributes')
            ? Attributes.fromJson(
                json_['attributes'] as core.Map<core.String, core.dynamic>)
            : null,
        contentLanguage: json_.containsKey('contentLanguage')
            ? json_['contentLanguage'] as core.String
            : null,
        destinationStatuses: json_.containsKey('destinationStatuses')
            ? (json_['destinationStatuses'] as core.List)
                .map((value) => DestinationStatus.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        issues: json_.containsKey('issues')
            ? (json_['issues'] as core.List)
                .map((value) => Issue.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        parent: json_.containsKey('parent')
            ? json_['parent'] as core.String
            : null,
        productId: json_.containsKey('productId')
            ? json_['productId'] as core.String
            : null,
        targetCountry: json_.containsKey('targetCountry')
            ? json_['targetCountry'] as core.String
            : null,
      );