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)
-
- (Tacokit::Resource) create_organization(display_name, options = {})
Create an organization.
-
- (Object) delete_organization(org_id)
Delete an organization.
-
- (Tacokit::Resource) organization(org_id, options = nil)
Retrieve an organization.
- - (Object) organization_resource(org_id, resource, *paths)
-
- (Tacokit::Resource) update_organization(org_id, options = {})
Update an organization.
Instance Method Details
- (Tacokit::Resource) create_organization(display_name, options = {})
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 |
- (Object) delete_organization(org_id)
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 |
- (Tacokit::Resource) organization(org_id, options = nil)
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 |
- (Object) organization_resource(org_id, resource, *paths)
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 |
- (Tacokit::Resource) update_organization(org_id, options = {})
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 |