toJson method
Implementation
core.Map<core.String, core.dynamic> toJson() => {
if (endDate != null)
'endDate':
"${endDate!.year.toString().padLeft(4, '0')}-${endDate!.month.toString().padLeft(2, '0')}-${endDate!.day.toString().padLeft(2, '0')}",
if (rateOrCost != null) 'rateOrCost': rateOrCost!,
if (startDate != null)
'startDate':
"${startDate!.year.toString().padLeft(4, '0')}-${startDate!.month.toString().padLeft(2, '0')}-${startDate!.day.toString().padLeft(2, '0')}",
if (units != null) 'units': units!,
};