Class: Coinsetter::ClientSession
- Defined in:
- lib/coinsetter/client_session.rb
Instance Attribute Summary collapse
-
#customer_uuid ⇒ Object
Returns the value of attribute customer_uuid.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Attributes inherited from Model
Instance Method Summary collapse
- #call(action = 'HEARTBEAT') ⇒ Object
- #destroy! ⇒ Object
- #heartbeat ⇒ Object
- #parse(string) ⇒ Object
- #path ⇒ Object
Methods inherited from Model
#attributes, #attributes=, #initialize
Constructor Details
This class inherits a constructor from Coinsetter::Model
Instance Attribute Details
#customer_uuid ⇒ Object
Returns the value of attribute customer_uuid.
3 4 5 |
# File 'lib/coinsetter/client_session.rb', line 3 def customer_uuid @customer_uuid end |
#user_name ⇒ Object
Returns the value of attribute user_name.
3 4 5 |
# File 'lib/coinsetter/client_session.rb', line 3 def user_name @user_name end |
#uuid ⇒ Object
Returns the value of attribute uuid.
3 4 5 |
# File 'lib/coinsetter/client_session.rb', line 3 def uuid @uuid end |
Instance Method Details
#call(action = 'HEARTBEAT') ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/coinsetter/client_session.rb', line 17 def call(action='HEARTBEAT') Coinsetter::Net.put( path, {action: action}, {"coinsetter-client-session-id" => uuid} ) end |
#destroy! ⇒ Object
5 6 7 |
# File 'lib/coinsetter/client_session.rb', line 5 def destroy! parse call("LOGOUT") end |
#heartbeat ⇒ Object
9 10 11 |
# File 'lib/coinsetter/client_session.rb', line 9 def heartbeat parse call("HEARTBEAT") end |
#parse(string) ⇒ Object
25 26 27 |
# File 'lib/coinsetter/client_session.rb', line 25 def parse(string) Coinsetter::Helper. string end |
#path ⇒ Object
13 14 15 |
# File 'lib/coinsetter/client_session.rb', line 13 def path "clientSession/#{uuid}" end |