Module: Tacokit::Client::Organizations

Included in:
Tacokit::Client
Defined in:
lib/tacokit/client/organizations.rb

Instance Method Summary collapse

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, options = {})
  post "organizations", options.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, options = nil)
  get organization_path(org_id), options
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, options = extract_options(camp(resource), *paths)
  get organization_path(org_id, *paths), options
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, options = {})
  put organization_path(org_id), options
end