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;
  }
    json[r'rooms'] = this.rooms;
  if (this.board != null) {
    json[r'board'] = this.board;
  } else {
    json[r'board'] = null;
  }
  if (this.terms != null) {
    json[r'terms'] = this.terms;
  } else {
    json[r'terms'] = null;
  }
  if (this.taxes != null) {
    json[r'taxes'] = this.taxes;
  } else {
    json[r'taxes'] = null;
  }
  if (this.priceIsBinding != null) {
    json[r'priceIsBinding'] = this.priceIsBinding;
  } else {
    json[r'priceIsBinding'] = null;
  }
    json[r'nightlyPrices'] = this.nightlyPrices;
    json[r'surcharges'] = this.surcharges;
    json[r'rateTags'] = this.rateTags;
    json[r'remarks'] = this.remarks;
  if (this.withTransfers != null) {
    json[r'withTransfers'] = this.withTransfers;
  } else {
    json[r'withTransfers'] = null;
  }
    json[r'rateRules'] = this.rateRules;
  if (this.amendabilityStatus != null) {
    json[r'amendabilityStatus'] = this.amendabilityStatus;
  } else {
    json[r'amendabilityStatus'] = null;
  }
  if (this.guestNameRules != null) {
    json[r'guestNameRules'] = this.guestNameRules;
  } else {
    json[r'guestNameRules'] = null;
  }
  if (this.minimumSellingPrice != null) {
    json[r'minimumSellingPrice'] = this.minimumSellingPrice;
  } else {
    json[r'minimumSellingPrice'] = null;
  }
  if (this.allowsSpecialRequests != null) {
    json[r'allowsSpecialRequests'] = this.allowsSpecialRequests;
  } else {
    json[r'allowsSpecialRequests'] = null;
  }
  if (this.specialRequestOptions != null) {
    json[r'specialRequestOptions'] = this.specialRequestOptions;
  } else {
    json[r'specialRequestOptions'] = null;
  }
  return json;
}