toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.accountNumber != null) {
json[r'accountNumber'] = this.accountNumber;
} else {
json[r'accountNumber'] = null;
}
if (this.incomeBasedRepayment != null) {
json[r'incomeBasedRepayment'] = this.incomeBasedRepayment;
} else {
json[r'incomeBasedRepayment'] = null;
}
if (this.interestRate != null) {
json[r'interestRate'] = this.interestRate;
} else {
json[r'interestRate'] = null;
}
if (this.loanAmount != null) {
json[r'loanAmount'] = this.loanAmount;
} else {
json[r'loanAmount'] = null;
}
if (this.loanServicer != null) {
json[r'loanServicer'] = this.loanServicer;
} else {
json[r'loanServicer'] = null;
}
if (this.loanType != null) {
json[r'loanType'] = this.loanType;
} else {
json[r'loanType'] = null;
}
if (this.nextPaymentAmount != null) {
json[r'nextPaymentAmount'] = this.nextPaymentAmount;
} else {
json[r'nextPaymentAmount'] = null;
}
if (this.nextPaymentDate != null) {
json[r'nextPaymentDate'] =
_dateFormatter.format(this.nextPaymentDate!.toUtc());
} else {
json[r'nextPaymentDate'] = null;
}
return json;
}