Service.fromJson constructor

Service.fromJson(
  1. Map json_
)

Implementation

Service.fromJson(core.Map json_)
    : this(
        active:
            json_.containsKey('active') ? json_['active'] as core.bool : null,
        currency: json_.containsKey('currency')
            ? json_['currency'] as core.String
            : null,
        deliveryCountry: json_.containsKey('deliveryCountry')
            ? json_['deliveryCountry'] as core.String
            : null,
        deliveryTime: json_.containsKey('deliveryTime')
            ? DeliveryTime.fromJson(
                json_['deliveryTime'] as core.Map<core.String, core.dynamic>)
            : null,
        eligibility: json_.containsKey('eligibility')
            ? json_['eligibility'] as core.String
            : null,
        minimumOrderValue: json_.containsKey('minimumOrderValue')
            ? Price.fromJson(json_['minimumOrderValue']
                as core.Map<core.String, core.dynamic>)
            : null,
        minimumOrderValueTable: json_.containsKey('minimumOrderValueTable')
            ? MinimumOrderValueTable.fromJson(json_['minimumOrderValueTable']
                as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        pickupService: json_.containsKey('pickupService')
            ? PickupCarrierService.fromJson(
                json_['pickupService'] as core.Map<core.String, core.dynamic>)
            : null,
        rateGroups: json_.containsKey('rateGroups')
            ? (json_['rateGroups'] as core.List)
                .map((value) => RateGroup.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        shipmentType: json_.containsKey('shipmentType')
            ? json_['shipmentType'] as core.String
            : null,
        storeConfig: json_.containsKey('storeConfig')
            ? ServiceStoreConfig.fromJson(
                json_['storeConfig'] as core.Map<core.String, core.dynamic>)
            : null,
      );