toJson method

Map<String, dynamic> toJson()

Implementation

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