CashPurchaseSavings.fromJson constructor

CashPurchaseSavings.fromJson(
  1. Map json_
)

Implementation

CashPurchaseSavings.fromJson(core.Map json_)
    : this(
        outOfPocketCost: json_.containsKey('outOfPocketCost')
            ? Money.fromJson(json_['outOfPocketCost']
                as core.Map<core.String, core.dynamic>)
            : null,
        paybackYears: json_.containsKey('paybackYears')
            ? (json_['paybackYears'] as core.num).toDouble()
            : null,
        rebateValue: json_.containsKey('rebateValue')
            ? Money.fromJson(
                json_['rebateValue'] as core.Map<core.String, core.dynamic>)
            : null,
        savings: json_.containsKey('savings')
            ? SavingsOverTime.fromJson(
                json_['savings'] as core.Map<core.String, core.dynamic>)
            : null,
        upfrontCost: json_.containsKey('upfrontCost')
            ? Money.fromJson(
                json_['upfrontCost'] as core.Map<core.String, core.dynamic>)
            : null,
      );