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.
12 |
# File 'lib/g5_authentication_client/user.rb', line 12 property :email, type: String, required: true |
#first_name ⇒ String
The user’s first name. Not required to create a user.
32 |
# File 'lib/g5_authentication_client/user.rb', line 32 property :first_name, type: String |
#id ⇒ Integer
The user’s id. Not required to create a user.
27 |
# File 'lib/g5_authentication_client/user.rb', line 27 property :id, type: Integer |
#last_name ⇒ String
The user’s last name. Not required to create a user.
37 |
# File 'lib/g5_authentication_client/user.rb', line 37 property :last_name, type: String |
#organization_name ⇒ String
The user’s organization name. Not required to create a user.
47 |
# File 'lib/g5_authentication_client/user.rb', line 47 property :organization_name, type: String |
#password ⇒ String
The user’s password. Required to create a user.
17 |
# File 'lib/g5_authentication_client/user.rb', line 17 property :password, type: String |
#password_confirmation ⇒ String
The user’s password_confirmation.
22 |
# File 'lib/g5_authentication_client/user.rb', line 22 property :password_confirmation, type: String |
#phone_number ⇒ String
The user’s phone number. Not required to create a user.
52 |
# File 'lib/g5_authentication_client/user.rb', line 52 property :phone_number, type: String |
#roles ⇒ Array<G5AuthenticationClient::Role>
The user’s roles. Not required to create a user.
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/g5_authentication_client/user.rb', line 57 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.
42 |
# File 'lib/g5_authentication_client/user.rb', line 42 property :title, type: String |
Instance Method Details
#validate_for_create! ⇒ Object
70 71 72 73 |
# File 'lib/g5_authentication_client/user.rb', line 70 def validate_for_create! validate! raise ArgumentError.new("Password required for new user.") unless !password.nil? end |