PricingSchedule.fromJson constructor

PricingSchedule.fromJson(
  1. Map json_
)

Implementation

PricingSchedule.fromJson(core.Map json_)
    : this(
        capCostOption: json_.containsKey('capCostOption')
            ? json_['capCostOption'] as core.String
            : null,
        endDate: json_.containsKey('endDate')
            ? core.DateTime.parse(json_['endDate'] as core.String)
            : null,
        flighted: json_.containsKey('flighted')
            ? json_['flighted'] as core.bool
            : null,
        floodlightActivityId: json_.containsKey('floodlightActivityId')
            ? json_['floodlightActivityId'] as core.String
            : null,
        pricingPeriods: json_.containsKey('pricingPeriods')
            ? (json_['pricingPeriods'] as core.List)
                .map((value) => PricingSchedulePricingPeriod.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        pricingType: json_.containsKey('pricingType')
            ? json_['pricingType'] as core.String
            : null,
        startDate: json_.containsKey('startDate')
            ? core.DateTime.parse(json_['startDate'] as core.String)
            : null,
        testingStartDate: json_.containsKey('testingStartDate')
            ? core.DateTime.parse(json_['testingStartDate'] as core.String)
            : null,
      );