PricingExpression.fromJson constructor

PricingExpression.fromJson(
  1. Map json_
)

Implementation

PricingExpression.fromJson(core.Map json_)
    : this(
        baseUnit: json_.containsKey('baseUnit')
            ? json_['baseUnit'] as core.String
            : null,
        baseUnitConversionFactor:
            json_.containsKey('baseUnitConversionFactor')
                ? (json_['baseUnitConversionFactor'] as core.num).toDouble()
                : null,
        baseUnitDescription: json_.containsKey('baseUnitDescription')
            ? json_['baseUnitDescription'] as core.String
            : null,
        displayQuantity: json_.containsKey('displayQuantity')
            ? (json_['displayQuantity'] as core.num).toDouble()
            : null,
        tieredRates: json_.containsKey('tieredRates')
            ? (json_['tieredRates'] as core.List)
                .map((value) => TierRate.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        usageUnit: json_.containsKey('usageUnit')
            ? json_['usageUnit'] as core.String
            : null,
        usageUnitDescription: json_.containsKey('usageUnitDescription')
            ? json_['usageUnitDescription'] as core.String
            : null,
      );