Class: Basecamp::Services::AccountService
- Inherits:
-
BaseService
- Object
- BaseService
- Basecamp::Services::AccountService
- Defined in:
- lib/basecamp/generated/services/account_service.rb
Overview
Service for Account operations
Instance Method Summary collapse
-
#get_account ⇒ Hash
Get the account for the current access token.
-
#remove_account_logo ⇒ void
Remove the account logo.
-
#update_account_logo(io:, filename:, content_type:) ⇒ void
Upload or replace the account logo.
-
#update_account_name(name:) ⇒ Hash
Rename the current account.
Constructor Details
This class inherits a constructor from Basecamp::Services::BaseService
Instance Method Details
#get_account ⇒ Hash
Get the account for the current access token
12 13 14 15 16 |
# File 'lib/basecamp/generated/services/account_service.rb', line 12 def get_account() with_operation(service: "account", operation: "get_account", is_mutation: false) do http_get("/account.json").json end end |
#remove_account_logo ⇒ void
This method returns an undefined value.
Remove the account logo. Only administrators and account owners can use this endpoint.
32 33 34 35 36 37 |
# File 'lib/basecamp/generated/services/account_service.rb', line 32 def remove_account_logo() with_operation(service: "account", operation: "remove_account_logo", is_mutation: true) do http_delete("/account/logo.json") nil end end |
#update_account_logo(io:, filename:, content_type:) ⇒ void
This method returns an undefined value.
Upload or replace the account logo.
23 24 25 26 27 28 |
# File 'lib/basecamp/generated/services/account_service.rb', line 23 def update_account_logo(io:, filename:, content_type:) with_operation(service: "account", operation: "update_account_logo", is_mutation: true) do http_put_multipart("/account/logo.json", io: io, filename: filename, content_type: content_type, field: "logo") nil end end |
#update_account_name(name:) ⇒ Hash
Rename the current account. Only account owners can use this endpoint.
42 43 44 45 46 |
# File 'lib/basecamp/generated/services/account_service.rb', line 42 def update_account_name(name:) with_operation(service: "account", operation: "update_account_name", is_mutation: true) do http_put("/account/name.json", body: compact_params(name: name)).json end end |