fromJson static method
Returns a new LeadRefinanceLoanInformationJson instance and imports its values from
value if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static LeadRefinanceLoanInformationJson? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return LeadRefinanceLoanInformationJson(
accountNumber: mapValueOfType<String>(json, r'accountNumber'),
incomeBasedRepayment:
mapValueOfType<bool>(json, r'incomeBasedRepayment'),
interestRate: num.parse('${json[r'interestRate']}'),
loanAmount: mapValueOfType<int>(json, r'loanAmount'),
loanServicer: mapValueOfType<String>(json, r'loanServicer'),
loanType: RefinanceLoanType.fromJson(json[r'loanType']),
nextPaymentAmount: num.parse('${json[r'nextPaymentAmount']}'),
nextPaymentDate: mapDateTime(json, r'nextPaymentDate', r''),
);
}
return null;
}