Class: Playapi::Account
- Extended by:
- Utils
- Defined in:
- lib/playapi/account.rb
Instance Attribute Summary collapse
-
#service_id ⇒ Object
readonly
Returns the value of attribute service_id.
-
#service_name ⇒ Object
readonly
Returns the value of attribute service_name.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Utils
Methods inherited from Identity
#==, fetch, #id, #initialize, store
Methods inherited from Base
#[], attr_reader, #attrs, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update
Constructor Details
This class inherits a constructor from Playapi::Identity
Instance Attribute Details
#service_id ⇒ Object (readonly)
Returns the value of attribute service_id.
8 9 10 |
# File 'lib/playapi/account.rb', line 8 def service_id @service_id end |
#service_name ⇒ Object (readonly)
Returns the value of attribute service_name.
8 9 10 |
# File 'lib/playapi/account.rb', line 8 def service_name @service_name end |
Class Method Details
.get(id) ⇒ Object
21 22 23 24 |
# File 'lib/playapi/account.rb', line 21 def get(id) url = "api/v2/accounts/#{id}" get_object(:get, "account", url) end |
.list ⇒ Object
16 17 18 19 |
# File 'lib/playapi/account.rb', line 16 def list url = "api/v2/accounts" get_objects(:get, "accounts", url) end |
.update(id, opts) ⇒ Object
26 27 28 29 |
# File 'lib/playapi/account.rb', line 26 def update(id, opts) url = "api/v2/accounts/#{id}" get_object(:put, "account", url, {:account => opts}) end |