Class: Lifen::User
- Inherits:
-
Object
- Object
- Lifen::User
- Defined in:
- lib/lifen/user.rb
Instance Method Summary collapse
- #client ⇒ Object
- #create ⇒ Object
- #flows ⇒ Object
- #settings ⇒ Object
- #status ⇒ Object
- #token ⇒ Object
- #token=(token) ⇒ Object
- #unread_messages ⇒ Object
Instance Method Details
#client ⇒ Object
47 48 49 |
# File 'lib/lifen/user.rb', line 47 def client UserAuthenticatedClient.new(token) end |
#create ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/lifen/user.rb', line 18 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
14 15 16 |
# File 'lib/lifen/user.rb', line 14 def flows Lifen::Flows.new(user: self).all end |
#settings ⇒ Object
43 44 45 |
# File 'lib/lifen/user.rb', line 43 def settings @settings ||= Lifen::Settings.new(user: self).refresh end |
#status ⇒ Object
39 40 41 |
# File 'lib/lifen/user.rb', line 39 def status @status ||= Lifen::Status.new(user: self) end |
#token ⇒ Object
30 31 32 |
# File 'lib/lifen/user.rb', line 30 def token @token ||= Lifen::Token.new(user: self) end |
#token=(token) ⇒ Object
34 35 36 37 |
# File 'lib/lifen/user.rb', line 34 def token=(token) token.user = self @token = token end |
#unread_messages ⇒ Object
26 27 28 |
# File 'lib/lifen/user.rb', line 26 def status.unread end |