Class: Lifen::User
- Inherits:
-
Object
- Object
- Lifen::User
- Defined in:
- lib/lifen/user.rb
Instance Method Summary collapse
- #client ⇒ Object
- #create ⇒ Object
- #flows ⇒ Object
- #status ⇒ Object
- #token ⇒ Object
- #token=(token) ⇒ Object
- #unread_messages ⇒ Object
Instance Method Details
#client ⇒ Object
42 43 44 |
# File 'lib/lifen/user.rb', line 42 def client UserAuthenticatedClient.new(token) end |
#create ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/lifen/user.rb', line 17 def create params = {emailAddress: email, lastName: last_name, firstName: first_name} json = application_client.post("authentication/api/register/third_party", params) self.uuid = json["accountUuid"] end |
#flows ⇒ Object
13 14 15 |
# File 'lib/lifen/user.rb', line 13 def flows Lifen::Flows.new(user: self).all end |
#status ⇒ Object
38 39 40 |
# File 'lib/lifen/user.rb', line 38 def status @status ||= Lifen::Status.new(user: self) end |
#token ⇒ Object
29 30 31 |
# File 'lib/lifen/user.rb', line 29 def token @token ||= Lifen::Token.new(user: self) end |
#token=(token) ⇒ Object
33 34 35 36 |
# File 'lib/lifen/user.rb', line 33 def token=(token) token.user = self @token = token end |
#unread_messages ⇒ Object
25 26 27 |
# File 'lib/lifen/user.rb', line 25 def status.unread end |