Class: G5AuthenticationClient::User
- Inherits:
-
Modelish::Base
- Object
- Modelish::Base
- G5AuthenticationClient::User
- Defined in:
- lib/g5_authentication_client/user.rb
Overview
A G5 Authentication User
Instance Attribute Summary collapse
-
#email ⇒ String
The user’s email address.
-
#first_name ⇒ String
The user’s first name.
-
#id ⇒ Integer
The user’s id.
-
#last_name ⇒ String
The user’s last name.
-
#organization_name ⇒ String
The user’s organization name.
-
#password ⇒ String
The user’s password.
-
#password_confirmation ⇒ String
The user’s password_confirmation.
-
#phone_number ⇒ String
The user’s phone number.
-
#roles ⇒ Array<G5AuthenticationClient::Role>
The user’s roles.
-
#title ⇒ String
The user’s title.
Instance Method Summary collapse
Instance Attribute Details
#email ⇒ String
The user’s email address.
14 |
# File 'lib/g5_authentication_client/user.rb', line 14 property :email, type: String, required: true |
#first_name ⇒ String
The user’s first name. Not required to create a user.
34 |
# File 'lib/g5_authentication_client/user.rb', line 34 property :first_name, type: String |
#id ⇒ Integer
The user’s id. Not required to create a user.
29 |
# File 'lib/g5_authentication_client/user.rb', line 29 property :id, type: Integer |
#last_name ⇒ String
The user’s last name. Not required to create a user.
39 |
# File 'lib/g5_authentication_client/user.rb', line 39 property :last_name, type: String |
#organization_name ⇒ String
The user’s organization name. Not required to create a user.
49 |
# File 'lib/g5_authentication_client/user.rb', line 49 property :organization_name, type: String |
#password ⇒ String
The user’s password. Required to create a user.
19 |
# File 'lib/g5_authentication_client/user.rb', line 19 property :password, type: String |
#password_confirmation ⇒ String
The user’s password_confirmation.
24 |
# File 'lib/g5_authentication_client/user.rb', line 24 property :password_confirmation, type: String |
#phone_number ⇒ String
The user’s phone number. Not required to create a user.
54 |
# File 'lib/g5_authentication_client/user.rb', line 54 property :phone_number, type: String |
#roles ⇒ Array<G5AuthenticationClient::Role>
The user’s roles. Not required to create a user.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/g5_authentication_client/user.rb', line 59 property :roles, default: [], type: proc { |val| val.map { |r| Role.new(r) } }, validator: proc { |val| "User roles must be valid" if val && val.detect { |r| !r.valid? } } |
#title ⇒ String
The user’s title. Not required to create a user.
44 |
# File 'lib/g5_authentication_client/user.rb', line 44 property :title, type: String |
Instance Method Details
#validate_for_create! ⇒ Object
72 73 74 75 |
# File 'lib/g5_authentication_client/user.rb', line 72 def validate_for_create! validate! raise ArgumentError.new("Password required for new user.") unless !password.nil? end |