RateGroup.fromJson constructor

RateGroup.fromJson(
  1. Map json_
)

Implementation

RateGroup.fromJson(core.Map json_)
    : this(
        applicableShippingLabels:
            json_.containsKey('applicableShippingLabels')
                ? (json_['applicableShippingLabels'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        carrierRates: json_.containsKey('carrierRates')
            ? (json_['carrierRates'] as core.List)
                .map((value) => CarrierRate.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        mainTable: json_.containsKey('mainTable')
            ? Table.fromJson(
                json_['mainTable'] as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        singleValue: json_.containsKey('singleValue')
            ? Value.fromJson(
                json_['singleValue'] as core.Map<core.String, core.dynamic>)
            : null,
        subtables: json_.containsKey('subtables')
            ? (json_['subtables'] as core.List)
                .map((value) => Table.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );