DeliveryTime.fromJson constructor

DeliveryTime.fromJson(
  1. Map json_
)

Implementation

DeliveryTime.fromJson(core.Map json_)
    : this(
        cutoffTime: json_.containsKey('cutoffTime')
            ? CutoffTime.fromJson(
                json_['cutoffTime'] as core.Map<core.String, core.dynamic>)
            : null,
        handlingBusinessDayConfig: json_
                .containsKey('handlingBusinessDayConfig')
            ? BusinessDayConfig.fromJson(json_['handlingBusinessDayConfig']
                as core.Map<core.String, core.dynamic>)
            : null,
        holidayCutoffs: json_.containsKey('holidayCutoffs')
            ? (json_['holidayCutoffs'] as core.List)
                .map((value) => HolidayCutoff.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        maxHandlingTimeInDays: json_.containsKey('maxHandlingTimeInDays')
            ? json_['maxHandlingTimeInDays'] as core.int
            : null,
        maxTransitTimeInDays: json_.containsKey('maxTransitTimeInDays')
            ? json_['maxTransitTimeInDays'] as core.int
            : null,
        minHandlingTimeInDays: json_.containsKey('minHandlingTimeInDays')
            ? json_['minHandlingTimeInDays'] as core.int
            : null,
        minTransitTimeInDays: json_.containsKey('minTransitTimeInDays')
            ? json_['minTransitTimeInDays'] as core.int
            : null,
        transitBusinessDayConfig:
            json_.containsKey('transitBusinessDayConfig')
                ? BusinessDayConfig.fromJson(json_['transitBusinessDayConfig']
                    as core.Map<core.String, core.dynamic>)
                : null,
        transitTimeTable: json_.containsKey('transitTimeTable')
            ? TransitTable.fromJson(json_['transitTimeTable']
                as core.Map<core.String, core.dynamic>)
            : null,
        warehouseBasedDeliveryTimes:
            json_.containsKey('warehouseBasedDeliveryTimes')
                ? (json_['warehouseBasedDeliveryTimes'] as core.List)
                    .map((value) => WarehouseBasedDeliveryTime.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                    .toList()
                : null,
      );