toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.acceptanceChangedAt != null) {
    json[r'acceptance_changed_at'] = this.acceptanceChangedAt!.toUtc().toIso8601String();
  } else {
    json[r'acceptance_changed_at'] = null;
  }
  if (this.cancellationPeriodHours != null) {
    json[r'cancellation_period_hours'] = this.cancellationPeriodHours;
  } else {
    json[r'cancellation_period_hours'] = null;
  }
  if (this.cancelledAt != null) {
    json[r'cancelled_at'] = this.cancelledAt!.toUtc().toIso8601String();
  } else {
    json[r'cancelled_at'] = null;
  }
  if (this.cancelledBy != null) {
    json[r'cancelled_by'] = this.cancelledBy;
  } else {
    json[r'cancelled_by'] = null;
  }
  if (this.cancelledByCustomer != null) {
    json[r'cancelled_by_customer'] = this.cancelledByCustomer;
  } else {
    json[r'cancelled_by_customer'] = null;
  }
    json[r'customer'] = this.customer;
  if (this.chat != null) {
    json[r'chat'] = this.chat;
  } else {
    json[r'chat'] = null;
  }
  if (this.endTime != null) {
    json[r'end_time'] = this.endTime!.toUtc().toIso8601String();
  } else {
    json[r'end_time'] = null;
  }
  if (this.hasCancellationPenalty != null) {
    json[r'has_cancellation_penalty'] = this.hasCancellationPenalty;
  } else {
    json[r'has_cancellation_penalty'] = null;
  }
  if (this.isAcceptedByCustomer != null) {
    json[r'is_accepted_by_customer'] = this.isAcceptedByCustomer;
  } else {
    json[r'is_accepted_by_customer'] = null;
  }
  if (this.isAcceptedByTutor != null) {
    json[r'is_accepted_by_tutor'] = this.isAcceptedByTutor;
  } else {
    json[r'is_accepted_by_tutor'] = null;
  }
  if (this.isRejectedByCustomer != null) {
    json[r'is_rejected_by_customer'] = this.isRejectedByCustomer;
  } else {
    json[r'is_rejected_by_customer'] = null;
  }
  if (this.location != null) {
    json[r'location'] = this.location;
  } else {
    json[r'location'] = null;
  }
  if (this.numWeeks != null) {
    json[r'num_weeks'] = this.numWeeks;
  } else {
    json[r'num_weeks'] = null;
  }
  if (this.paymentAmountInCents != null) {
    json[r'payment_amount_in_cents'] = this.paymentAmountInCents;
  } else {
    json[r'payment_amount_in_cents'] = null;
  }
  if (this.startTime != null) {
    json[r'start_time'] = this.startTime!.toUtc().toIso8601String();
  } else {
    json[r'start_time'] = null;
  }
    json[r'tutor'] = this.tutor;
    json[r'subject'] = this.subject;
    json[r'invitation_dates'] = this.invitationDates;
  return json;
}