toJson method

Map<String, dynamic> toJson()

Implementation

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