Module: Cloudability::Client::Organizations
- Included in:
- Cloudability::Client
- Defined in:
- lib/cloudability/client/organizations.rb
Instance Method Summary collapse
-
#delete_invite(id) ⇒ Object
(also: #delete_invitation)
Delete an invitation to the authenticated user’s organization.
-
#invite_user(email, options = {}) ⇒ Object
(also: #invite)
Create a new invitation to the authenticated user’s organization.
-
#my_organization ⇒ Hashie::Mash
(also: #organization)
Get information about the authenticted user’s organization NOTE: This requires that you are the organization admin.
-
#organization_invitations ⇒ Array
(also: #invitations)
List all invitations to the authenticated user’s organization.
-
#organization_roles ⇒ Array
(also: #roles)
Retrieve your organizations roles.
-
#update_invite(id, role_id) ⇒ Hashie::Mash
(also: #update_invitation)
Update a user’s invitation to an organization.
Instance Method Details
#delete_invite(id) ⇒ Object Also known as: delete_invitation
Delete an invitation to the authenticated user’s organization
54 55 56 57 |
# File 'lib/cloudability/client/organizations.rb', line 54 def delete_invite(id) request = delete "/1/organizations/invitations/#{id}" Hashie::Mash.new request end |
#invite_user(email, options = {}) ⇒ Object Also known as: invite
Create a new invitation to the authenticated user’s organization
41 42 43 44 45 46 |
# File 'lib/cloudability/client/organizations.rb', line 41 def invite_user(email, ={}) [:email] = email request = post '/1/organizations/invitations', Hashie::Mash.new request end |
#my_organization ⇒ Hashie::Mash Also known as: organization
Get information about the authenticted user’s organization NOTE: This requires that you are the organization admin.
9 10 11 12 |
# File 'lib/cloudability/client/organizations.rb', line 9 def my_organization request = get '/1/organizations' Hashie::Mash.new request end |
#organization_invitations ⇒ Array Also known as: invitations
List all invitations to the authenticated user’s organization
19 20 21 22 |
# File 'lib/cloudability/client/organizations.rb', line 19 def organization_invitations request = get '/1/organizations/invitations' convert_to_mashes request end |
#organization_roles ⇒ Array Also known as: roles
Retrieve your organizations roles.
28 29 30 31 |
# File 'lib/cloudability/client/organizations.rb', line 28 def organization_roles request = get '/1/organizations/roles' convert_to_mashes request end |
#update_invite(id, role_id) ⇒ Hashie::Mash Also known as: update_invitation
Update a user’s invitation to an organization.
66 67 68 69 70 71 72 |
# File 'lib/cloudability/client/organizations.rb', line 66 def update_invite(id, role_id) = {} [:role_id] = role_id request = put "/1/organizations/invitations/#{id}", Hashie::Mash.new request end |