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;
  }
    json[r'email'] = this.email;
  if (this.firstName != null) {
    json[r'first_name'] = this.firstName;
  } else {
    json[r'first_name'] = null;
  }
  if (this.lastName != null) {
    json[r'last_name'] = this.lastName;
  } else {
    json[r'last_name'] = null;
  }
  if (this.isActive != null) {
    json[r'is_active'] = this.isActive;
  } else {
    json[r'is_active'] = null;
  }
  if (this.isCustomer != null) {
    json[r'is_customer'] = this.isCustomer;
  } else {
    json[r'is_customer'] = null;
  }
  if (this.isTutor != null) {
    json[r'is_tutor'] = this.isTutor;
  } else {
    json[r'is_tutor'] = null;
  }
  if (this.lastLogin != null) {
    json[r'last_login'] = this.lastLogin!.toUtc().toIso8601String();
  } else {
    json[r'last_login'] = null;
  }
  if (this.latestPostcode != null) {
    json[r'latest_postcode'] = this.latestPostcode;
  } else {
    json[r'latest_postcode'] = null;
  }
  if (this.phoneNumber != null) {
    json[r'phone_number'] = this.phoneNumber;
  } else {
    json[r'phone_number'] = null;
  }
  if (this.isPhoneConfirmed != null) {
    json[r'is_phone_confirmed'] = this.isPhoneConfirmed;
  } else {
    json[r'is_phone_confirmed'] = null;
  }
  if (this.photo != null) {
    json[r'photo'] = this.photo;
  } else {
    json[r'photo'] = null;
  }
  if (this.ref != null) {
    json[r'ref'] = this.ref;
  } else {
    json[r'ref'] = null;
  }
  if (this.reply != null) {
    json[r'reply'] = this.reply;
  } else {
    json[r'reply'] = null;
  }
  if (this.skypeAddress != null) {
    json[r'skype_address'] = this.skypeAddress;
  } else {
    json[r'skype_address'] = null;
  }
  if (this.socialAuthMethod != null) {
    json[r'social_auth_method'] = this.socialAuthMethod;
  } else {
    json[r'social_auth_method'] = null;
  }
  if (this.agreedToTerms != null) {
    json[r'agreed_to_terms'] = this.agreedToTerms;
  } else {
    json[r'agreed_to_terms'] = null;
  }
  if (this.called != null) {
    json[r'called'] = this.called;
  } else {
    json[r'called'] = null;
  }
  if (this.dateJoined != null) {
    json[r'date_joined'] = this.dateJoined!.toUtc().toIso8601String();
  } else {
    json[r'date_joined'] = null;
  }
  if (this.dateOfBirth != null) {
    json[r'date_of_birth'] = this.dateOfBirth!.toUtc().toIso8601String();
  } else {
    json[r'date_of_birth'] = null;
  }
  if (this.emailVerified != null) {
    json[r'email_verified'] = this.emailVerified;
  } else {
    json[r'email_verified'] = null;
  }
  if (this.emailed != null) {
    json[r'emailed'] = this.emailed;
  } else {
    json[r'emailed'] = null;
  }
  if (this.gender != null) {
    json[r'gender'] = this.gender;
  } else {
    json[r'gender'] = null;
  }
  if (this.hasCreditCard != null) {
    json[r'has_credit_card'] = this.hasCreditCard;
  } else {
    json[r'has_credit_card'] = null;
  }
  if (this.isLive != null) {
    json[r'is_live'] = this.isLive;
  } else {
    json[r'is_live'] = null;
  }
  if (this.userTimezone != null) {
    json[r'user_timezone'] = this.userTimezone;
  } else {
    json[r'user_timezone'] = null;
  }
  if (this.language != null) {
    json[r'language'] = this.language;
  } else {
    json[r'language'] = null;
  }
  if (this.payViaOktopi != null) {
    json[r'pay_via_oktopi'] = this.payViaOktopi;
  } else {
    json[r'pay_via_oktopi'] = null;
  }
  if (this.stripeUserId != null) {
    json[r'stripe_user_id'] = this.stripeUserId;
  } else {
    json[r'stripe_user_id'] = null;
  }
  return json;
}