RegionalSubscriptionOfferPhaseConfig.fromJson constructor

RegionalSubscriptionOfferPhaseConfig.fromJson(
  1. Map json_
)

Implementation

RegionalSubscriptionOfferPhaseConfig.fromJson(core.Map json_)
    : this(
        absoluteDiscount: json_.containsKey('absoluteDiscount')
            ? Money.fromJson(json_['absoluteDiscount']
                as core.Map<core.String, core.dynamic>)
            : null,
        free: json_.containsKey('free')
            ? RegionalSubscriptionOfferPhaseFreePriceOverride.fromJson(
                json_['free'] as core.Map<core.String, core.dynamic>)
            : null,
        price: json_.containsKey('price')
            ? Money.fromJson(
                json_['price'] as core.Map<core.String, core.dynamic>)
            : null,
        regionCode: json_.containsKey('regionCode')
            ? json_['regionCode'] as core.String
            : null,
        relativeDiscount: json_.containsKey('relativeDiscount')
            ? (json_['relativeDiscount'] as core.num).toDouble()
            : null,
      );