toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.label != null) {
    json[r'label'] = this.label;
  } else {
    json[r'label'] = null;
  }
  if (this.balance != null) {
    json[r'balance'] = this.balance;
  } else {
    json[r'balance'] = null;
  }
  if (this.lowBalanceThreshold != null) {
    json[r'lowBalanceThreshold'] = this.lowBalanceThreshold;
  } else {
    json[r'lowBalanceThreshold'] = null;
  }
  if (this.isSelected != null) {
    json[r'isSelected'] = this.isSelected;
  } else {
    json[r'isSelected'] = null;
  }
  if (this.currency != null) {
    json[r'currency'] = this.currency;
  } else {
    json[r'currency'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
  if (this.updatedAt != null) {
    json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String();
  } else {
    json[r'updatedAt'] = null;
  }
  if (this.totalDebits != null) {
    json[r'totalDebits'] = this.totalDebits;
  } else {
    json[r'totalDebits'] = null;
  }
  if (this.totalCredits != null) {
    json[r'totalCredits'] = this.totalCredits;
  } else {
    json[r'totalCredits'] = null;
  }
  if (this.percentageDifference != null) {
    json[r'percentageDifference'] = this.percentageDifference;
  } else {
    json[r'percentageDifference'] = null;
  }
  return json;
}