toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.expiresAt != null) {
    json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
  } else {
    json[r'expiresAt'] = null;
  }
  if (this.cabinClass != null) {
    json[r'cabinClass'] = this.cabinClass;
  } else {
    json[r'cabinClass'] = null;
  }
  if (this.fare != null) {
    json[r'fare'] = this.fare;
  } else {
    json[r'fare'] = null;
  }
  if (this.terms != null) {
    json[r'terms'] = this.terms;
  } else {
    json[r'terms'] = null;
  }
    json[r'includedBaggage'] = this.includedBaggage;
  if (this.priceBreakdown != null) {
    json[r'priceBreakdown'] = this.priceBreakdown;
  } else {
    json[r'priceBreakdown'] = null;
  }
    json[r'passengerPricing'] = this.passengerPricing;
    json[r'offerPassengers'] = this.offerPassengers;
    json[r'availableServices'] = this.availableServices;
  if (this.identityDocumentsRequired != null) {
    json[r'identityDocumentsRequired'] = this.identityDocumentsRequired;
  } else {
    json[r'identityDocumentsRequired'] = null;
  }
    json[r'supportedDocumentTypes'] = this.supportedDocumentTypes;
    json[r'segments'] = this.segments;
  return json;
}