toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.organizationId != null) {
    json[r'organizationId'] = this.organizationId;
  } else {
    json[r'organizationId'] = null;
  }
    json[r'email'] = this.email;
    json[r'role'] = this.role;
  if (this.token != null) {
    json[r'token'] = this.token;
  } else {
    json[r'token'] = null;
  }
  if (this.expiresAt != null) {
    json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
  } else {
    json[r'expiresAt'] = null;
  }
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
  if (this.acceptedAt != null) {
    json[r'acceptedAt'] = this.acceptedAt!.toUtc().toIso8601String();
  } else {
    json[r'acceptedAt'] = null;
  }
  if (this.revokedAt != null) {
    json[r'revokedAt'] = this.revokedAt!.toUtc().toIso8601String();
  } else {
    json[r'revokedAt'] = null;
  }
  if (this.invitedBy != null) {
    json[r'invitedBy'] = this.invitedBy;
  } else {
    json[r'invitedBy'] = null;
  }
  if (this.status != null) {
    json[r'status'] = this.status;
  } else {
    json[r'status'] = null;
  }
  return json;
}