toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'object'] = this.object;
  json[r'id'] = this.id;
  json[r'status'] = this.status;
  json[r'required_fields'] = this.requiredFields;
  json[r'optional_fields'] = this.optionalFields;
  json[r'missing_fields'] = this.missingFields;
  json[r'unverified_fields'] = this.unverifiedFields;
  json[r'verifications'] = this.verifications;
  if (this.username != null) {
    json[r'username'] = this.username;
  } else {
    json[r'username'] = null;
  }
  if (this.emailAddress != null) {
    json[r'email_address'] = this.emailAddress;
  } else {
    json[r'email_address'] = null;
  }
  if (this.phoneNumber != null) {
    json[r'phone_number'] = this.phoneNumber;
  } else {
    json[r'phone_number'] = null;
  }
  if (this.web3Wallet != null) {
    json[r'web3_wallet'] = this.web3Wallet;
  } else {
    json[r'web3_wallet'] = null;
  }
  json[r'password_enabled'] = this.passwordEnabled;
  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;
  }
  json[r'unsafe_metadata'] = this.unsafeMetadata;
  json[r'public_metadata'] = this.publicMetadata;
  json[r'custom_action'] = this.customAction;
  if (this.externalId != null) {
    json[r'external_id'] = this.externalId;
  } else {
    json[r'external_id'] = null;
  }
  if (this.createdSessionId != null) {
    json[r'created_session_id'] = this.createdSessionId;
  } else {
    json[r'created_session_id'] = null;
  }
  if (this.createdUserId != null) {
    json[r'created_user_id'] = this.createdUserId;
  } else {
    json[r'created_user_id'] = null;
  }
  json[r'abandon_at'] = this.abandonAt;
  if (this.legalAcceptedAt != null) {
    json[r'legal_accepted_at'] = this.legalAcceptedAt;
  } else {
    json[r'legal_accepted_at'] = null;
  }
  if (this.externalAccount != null) {
    json[r'external_account'] = this.externalAccount;
  } else {
    json[r'external_account'] = null;
  }
  return json;
}