Headers.fromJson constructor

Headers.fromJson(
  1. Map json_
)

Implementation

Headers.fromJson(core.Map json_)
    : this(
        locations: json_.containsKey('locations')
            ? (json_['locations'] as core.List)
                .map((value) => LocationIdSet.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        numberOfItems: json_.containsKey('numberOfItems')
            ? (json_['numberOfItems'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        postalCodeGroupNames: json_.containsKey('postalCodeGroupNames')
            ? (json_['postalCodeGroupNames'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        prices: json_.containsKey('prices')
            ? (json_['prices'] as core.List)
                .map((value) => Price.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        weights: json_.containsKey('weights')
            ? (json_['weights'] as core.List)
                .map((value) => Weight.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );