toJson method

Map<String, dynamic> toJson()

Implementation

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