Class: Wrike3::Account
Instance Attribute Summary
Attributes included from Common
Instance Method Summary collapse
- #details(id, options = {}) ⇒ Object
-
#initialize(wrike) ⇒ Account
constructor
A new instance of Account.
-
#list(options = {}) ⇒ Object
Get account list.
-
#update(id, data = {}, options = {}) ⇒ Object
Update account.
Constructor Details
#initialize(wrike) ⇒ Account
Returns a new instance of Account.
5 6 7 |
# File 'lib/wrike3/account.rb', line 5 def initialize(wrike) @wrike = wrike end |
Instance Method Details
#details(id, options = {}) ⇒ Object
14 15 16 |
# File 'lib/wrike3/account.rb', line 14 def details(id, ={}) wrike.execute(:get, api_url("accounts/#{id}"), ) end |
#list(options = {}) ⇒ Object
Get account list
10 11 12 |
# File 'lib/wrike3/account.rb', line 10 def list( = {}) wrike.execute(:get, api_url('accounts'), ) end |
#update(id, data = {}, options = {}) ⇒ Object
Update account
19 20 21 |
# File 'lib/wrike3/account.rb', line 19 def update(id, data = {}, ={}) wrike.execute(:put, api_url("accounts/#{id}"), .merge(data)) end |