Pricing.fromJson constructor

Pricing.fromJson(
  1. Map json_
)

Implementation

Pricing.fromJson(core.Map json_)
    : this(
        capCostType: json_.containsKey('capCostType')
            ? json_['capCostType'] as core.String
            : null,
        endDate: json_.containsKey('endDate')
            ? core.DateTime.parse(json_['endDate'] as core.String)
            : null,
        flights: json_.containsKey('flights')
            ? (json_['flights'] as core.List)
                .map((value) => Flight.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        groupType: json_.containsKey('groupType')
            ? json_['groupType'] as core.String
            : null,
        pricingType: json_.containsKey('pricingType')
            ? json_['pricingType'] as core.String
            : null,
        startDate: json_.containsKey('startDate')
            ? core.DateTime.parse(json_['startDate'] as core.String)
            : null,
      );