Module: Tacokit::Client::Organizations
- Included in:
- Tacokit::Client
- Defined in:
- lib/tacokit/client/organizations.rb
Overview
Methods for the Organizations API
Instance Method Summary collapse
-
#create_organization(display_name, options = {}) ⇒ Tacokit::Resource
Create an organization.
-
#delete_organization(org_id) ⇒ Object
Delete an organization.
-
#organization(org_id, options = nil) ⇒ Tacokit::Resource
Retrieve an organization.
- #organization_resource(org_id, resource, *paths) ⇒ Object
-
#update_organization(org_id, options = {}) ⇒ Tacokit::Resource
Update an organization.
Instance Method Details
#create_organization(display_name, options = {}) ⇒ Tacokit::Resource
Create an organization
29 30 31 |
# File 'lib/tacokit/client/organizations.rb', line 29 def create_organization(display_name, = {}) post "organizations", .merge(display_name: display_name) end |
#delete_organization(org_id) ⇒ Object
Delete an organization
36 37 38 |
# File 'lib/tacokit/client/organizations.rb', line 36 def delete_organization(org_id) delete organization_path(org_id) end |
#organization(org_id, options = nil) ⇒ Tacokit::Resource
Retrieve an organization
11 12 13 |
# File 'lib/tacokit/client/organizations.rb', line 11 def organization(org_id, = nil) get organization_path(org_id), end |
#organization_resource(org_id, resource, *paths) ⇒ Object
41 42 43 44 |
# File 'lib/tacokit/client/organizations.rb', line 41 def organization_resource(org_id, resource, *paths) paths, = (camp(resource), *paths) get organization_path(org_id, *paths), end |
#update_organization(org_id, options = {}) ⇒ Tacokit::Resource
Update an organization
20 21 22 |
# File 'lib/tacokit/client/organizations.rb', line 20 def update_organization(org_id, = {}) put organization_path(org_id), end |