Module: Novu::Api::Organizations
- Included in:
- Client
- Defined in:
- lib/novu/api/organizations.rb
Overview
Module Novu::Api::Organizations provides an API for managing Organization within your Novu account.
This module includes methods for creating, retrieving, updating and deleting organization.
For more information on the Novu API see api.novu.co/api#/Organizations, docs.novu.co/api-reference/organizations/create-organization.
Instance Method Summary collapse
-
#create_organization(body) ⇒ Hash, number
@bodyparams:.
-
#current_organization ⇒ Hash, number
Get details of the current organization.
-
#current_organization_members ⇒ Hash, number
Get all members of the current organization.
-
#delete_organization_member(member_id) ⇒ number
Remove a member from organization.
-
#organization_branding(body) ⇒ Hash, number
Update organization branding details.
-
#organizations ⇒ Hash, number
Get all organizations.
-
#rename_organization(body) ⇒ Hash, number
Rename organization name.
Instance Method Details
#create_organization(body) ⇒ Hash, number
@bodyparams:
19 20 21 |
# File 'lib/novu/api/organizations.rb', line 19 def create_organization(body) post("/organizations", body: body) end |
#current_organization ⇒ Hash, number
Get details of the current organization
35 36 37 |
# File 'lib/novu/api/organizations.rb', line 35 def current_organization() get("/organizations/me") end |
#current_organization_members ⇒ Hash, number
Get all members of the current organization
43 44 45 |
# File 'lib/novu/api/organizations.rb', line 43 def current_organization_members() get("/organizations/members") end |
#delete_organization_member(member_id) ⇒ number
Remove a member from organization
76 77 78 |
# File 'lib/novu/api/organizations.rb', line 76 def delete_organization_member(member_id) delete("/organizations/members/#{member_id}") end |
#organization_branding(body) ⇒ Hash, number
Update organization branding details
@bodyparams:
66 67 68 |
# File 'lib/novu/api/organizations.rb', line 66 def organization_branding(body) put("/organizations/branding", body: body) end |
#organizations ⇒ Hash, number
Get all organizations
27 28 29 |
# File 'lib/novu/api/organizations.rb', line 27 def organizations() get("/organizations") end |
#rename_organization(body) ⇒ Hash, number
Rename organization name
51 52 53 |
# File 'lib/novu/api/organizations.rb', line 51 def rename_organization(body) patch("/organizations", body: body) end |