Module: Heroku::API::Account
- Included in:
- Heroku::API
- Defined in:
- lib/heroku/api/account.rb
Constant Summary collapse
- RESOURCE_TYPE =
"ACCOUNT"
- @@etag =
nil
Instance Method Summary collapse
Instance Method Details
#account ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/heroku/api/account.rb', line 11 def account Heroku::Properties.logger.info("[Account] Fetching.") @@etag, res = Heroku::Conn::Get( '/account', etag: @@etag, r_type: RESOURCE_TYPE ) Heroku::Model::Account.new(res.merge("parent" => self)) end |
#update_account(account) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/heroku/api/account.rb', line 24 def update_account(account) Heroku::Properties.logger.info("[Account] Updating #{account.id}") @@etag, res = Heroku::Conn::Patch( "/account", r_type: RESOURCE_TYPE, body: account.patchable.to_json ) Heroku::Model::Account.new(res.merge("parent" => self)) end |