toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final _json = <String, dynamic>{};
  _json[r'id'] = id;
  _json[r'name'] = name;
  _json[r'description'] = description;
  if (beforeMoneyAmount != null) {
    _json[r'before_money_amount'] = beforeMoneyAmount;
  }
  _json[r'money_amount'] = moneyAmount;
  if (taxCoeff != null) {
    _json[r'tax_coeff'] = taxCoeff;
  }
  _json[r'credit_amount'] = creditAmount;
  if (createdAt != null) {
    _json[r'created_at'] = _dateFormatter.format(createdAt!.toUtc());
  }
  if (updatedAt != null) {
    _json[r'updated_at'] = _dateFormatter.format(updatedAt!.toUtc());
  }
  if (deletedAt != null) {
    _json[r'deleted_at'] = _dateFormatter.format(deletedAt!.toUtc());
  }
  return _json;
}