Module: Tacokit::Client::Organizations
- Included in:
- Tacokit::Client
- Defined in:
- lib/tacokit/client/organizations.rb
Instance Method Summary collapse
-
#create_organization(display_name, options = {}) ⇒ Object
Create and organization.
-
#delete_organization(org_id) ⇒ Object
Delete an organization.
-
#organization(org_id, options = nil) ⇒ Object
Retrieve an organization.
- #organization_resource(org_id, resource, *paths) ⇒ Object
-
#update_organization(org_id, options = {}) ⇒ Object
Update an organization.
Instance Method Details
#create_organization(display_name, options = {}) ⇒ Object
Create and organization
21 22 23 |
# File 'lib/tacokit/client/organizations.rb', line 21 def create_organization(display_name, = {}) post "organizations", .merge(display_name: display_name) end |
#delete_organization(org_id) ⇒ Object
Delete an organization
28 29 30 |
# File 'lib/tacokit/client/organizations.rb', line 28 def delete_organization(org_id) delete organization_path(org_id) end |
#organization(org_id, options = nil) ⇒ Object
Retrieve an organization
7 8 9 |
# File 'lib/tacokit/client/organizations.rb', line 7 def organization(org_id, = nil) get organization_path(org_id), end |
#organization_resource(org_id, resource, *paths) ⇒ Object
33 34 35 36 |
# File 'lib/tacokit/client/organizations.rb', line 33 def organization_resource(org_id, resource, *paths) paths, = (camp(resource), *paths) get organization_path(org_id, *paths), end |
#update_organization(org_id, options = {}) ⇒ Object
Update an organization
14 15 16 |
# File 'lib/tacokit/client/organizations.rb', line 14 def update_organization(org_id, = {}) put organization_path(org_id), end |