Module: Teleflow::Api::Tenants
- Included in:
- Client
- Defined in:
- lib/teleflow/api/tenants.rb
Overview
Module Teleflow::Api::Tenants provides an API for managing tenants in the Teleflow application.
This module includes methods for creating, retrieving, updating and deleting tenant.
For more information on the tenants feature (docs.teleflow.khulnasoft.com/tenants/introduction), for API documentation see docs.teleflow.khulnasoft.com/api-reference/tenants/get-tenants.
Instance Method Summary collapse
-
#create_tenant(body) ⇒ Hash, number
Create a tenant.
-
#delete_tenant(identifier) ⇒ number
Using a previously create identifier during the tenant ceation, will cancel any active or pending workflows.
-
#tenant(identifier) ⇒ Hash, number
Get a tenant by the tenant identifier.
-
#tenants(query = {}) ⇒ Hash, ...
Returns a list of tenant that can be paginated using the ‘page` query parameter and set the number of tenants to be with the `limit` query parameter.
-
#update_tenant(identifier, body) ⇒ Hash, number
Update a tenant.
Instance Method Details
#create_tenant(body) ⇒ Hash, number
Create a tenant
@bodyparams:
21 22 23 |
# File 'lib/teleflow/api/tenants.rb', line 21 def create_tenant(body) post("/tenants", body: body) end |
#delete_tenant(identifier) ⇒ number
Using a previously create identifier during the tenant ceation, will cancel any active or pending workflows. This is useful to cancel active digests, delays etc…
@pathparams:
77 78 79 |
# File 'lib/teleflow/api/tenants.rb', line 77 def delete_tenant(identifier) delete("/tenants/#{identifier}") end |
#tenant(identifier) ⇒ Hash, number
Get a tenant by the tenant identifier
50 51 52 |
# File 'lib/teleflow/api/tenants.rb', line 50 def tenant(identifier) get("/tenants/#{identifier}") end |
#tenants(query = {}) ⇒ Hash, ...
Returns a list of tenant that can be paginated using the ‘page` query parameter and
set the number of tenants to be with the `limit` query parameter
@queryparams:
38 39 40 |
# File 'lib/teleflow/api/tenants.rb', line 38 def tenants(query = {}) get("/tenants", query: query) end |
#update_tenant(identifier, body) ⇒ Hash, number
Update a tenant
@bodyparams:
66 67 68 |
# File 'lib/teleflow/api/tenants.rb', line 66 def update_tenant(identifier, body) patch("/tenants/#{identifier}", body: body) end |