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.tutor != null) {
    json[r'tutor'] = this.tutor;
  } else {
    json[r'tutor'] = null;
  }
  if (this.customer != null) {
    json[r'customer'] = this.customer;
  } else {
    json[r'customer'] = null;
  }
  if (this.chat != null) {
    json[r'chat'] = this.chat;
  } else {
    json[r'chat'] = null;
  }
  if (this.cancellationPeriodHours != null) {
    json[r'cancellation_period_hours'] = this.cancellationPeriodHours;
  } else {
    json[r'cancellation_period_hours'] = null;
  }
  if (this.hasCancellationPenalty != null) {
    json[r'has_cancellation_penalty'] = this.hasCancellationPenalty;
  } else {
    json[r'has_cancellation_penalty'] = null;
  }
  if (this.paymentHoldsAt != null) {
    json[r'payment_holds_at'] = this.paymentHoldsAt!.toUtc().toIso8601String();
  } else {
    json[r'payment_holds_at'] = null;
  }
  if (this.paymentAmountInCents != null) {
    json[r'payment_amount_in_cents'] = this.paymentAmountInCents;
  } else {
    json[r'payment_amount_in_cents'] = null;
  }
    json[r'bookings'] = this.bookings;
    json[r'invitation_dates'] = this.invitationDates;
  if (this.coupon != null) {
    json[r'coupon'] = this.coupon;
  } else {
    json[r'coupon'] = null;
  }
    json[r'credit_card'] = this.creditCard;
  if (this.created != null) {
    json[r'created'] = this.created!.toUtc().toIso8601String();
  } else {
    json[r'created'] = null;
  }
  if (this.modified != null) {
    json[r'modified'] = this.modified!.toUtc().toIso8601String();
  } else {
    json[r'modified'] = null;
  }
  if (this.deletedAt != null) {
    json[r'deleted_at'] = this.deletedAt!.toUtc().toIso8601String();
  } else {
    json[r'deleted_at'] = null;
  }
  if (this.isTutorPaid != null) {
    json[r'is_tutor_paid'] = this.isTutorPaid;
  } else {
    json[r'is_tutor_paid'] = 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.isRejectedByTutor != null) {
    json[r'is_rejected_by_tutor'] = this.isRejectedByTutor;
  } else {
    json[r'is_rejected_by_tutor'] = null;
  }
  if (this.isCreatedByCustomer != null) {
    json[r'is_created_by_customer'] = this.isCreatedByCustomer;
  } else {
    json[r'is_created_by_customer'] = null;
  }
  if (this.location != null) {
    json[r'location'] = this.location;
  } else {
    json[r'location'] = null;
  }
  if (this.acceptanceChangedAt != null) {
    json[r'acceptance_changed_at'] = this.acceptanceChangedAt!.toUtc().toIso8601String();
  } else {
    json[r'acceptance_changed_at'] = null;
  }
  if (this.cancelledAt != null) {
    json[r'cancelled_at'] = this.cancelledAt!.toUtc().toIso8601String();
  } else {
    json[r'cancelled_at'] = null;
  }
  if (this.cancelledByCustomer != null) {
    json[r'cancelled_by_customer'] = this.cancelledByCustomer;
  } else {
    json[r'cancelled_by_customer'] = null;
  }
  if (this.startTime != null) {
    json[r'start_time'] = this.startTime!.toUtc().toIso8601String();
  } else {
    json[r'start_time'] = null;
  }
  if (this.endTime != null) {
    json[r'end_time'] = this.endTime!.toUtc().toIso8601String();
  } else {
    json[r'end_time'] = null;
  }
  if (this.numWeeks != null) {
    json[r'num_weeks'] = this.numWeeks;
  } else {
    json[r'num_weeks'] = null;
  }
  if (this.cancelReason != null) {
    json[r'cancel_reason'] = this.cancelReason;
  } else {
    json[r'cancel_reason'] = null;
  }
  if (this.acceptancePendingReminded != null) {
    json[r'acceptance_pending_reminded'] = this.acceptancePendingReminded;
  } else {
    json[r'acceptance_pending_reminded'] = null;
  }
  if (this.isTrialCall != null) {
    json[r'is_trial_call'] = this.isTrialCall;
  } else {
    json[r'is_trial_call'] = null;
  }
  if (this.subject != null) {
    json[r'subject'] = this.subject;
  } else {
    json[r'subject'] = null;
  }
  if (this.cancelledBy != null) {
    json[r'cancelled_by'] = this.cancelledBy;
  } else {
    json[r'cancelled_by'] = null;
  }
  return json;
}