Module: Teleflow::Api::Integrations
- Included in:
- Client
- Defined in:
- lib/teleflow/api/integrations.rb
Overview
Module Teleflow::Api::Integrations provides an API for managing integrations in the Teleflow application.
This module includes methods for creating, retrieving, updating, and deleting integrations. It also includes methods for retrieving channel limit, in-app status, webhook provider status.
For more information on the Teleflow API(api-teleflow.khulnasoft.com/api#/Integrations), see docs.teleflow.khulnasoft.com/api/get-integrations/.
Instance Method Summary collapse
-
#active_integrations ⇒ Hash, number
Returns a list of active integrations.
-
#channel_limit(channel_type) ⇒ number
Returns a channel limit.
-
#create_integration(body) ⇒ Hash, number
Creates a new integration.
-
#delete_integration(integration_id) ⇒ Hash, number
Execute a soft delete of a integration given a certain ID.
-
#in_app_status ⇒ number
Returns in-app status.
-
#integrations ⇒ Hash, number
Returns a list of integrations.
-
#set_integration_as_primary(integration_id) ⇒ number
Set integration as primary.
-
#update_integration(integration_id, body) ⇒ Hash, number
Update the credentials of a integration.
-
#webhook_provider_status(provider_id) ⇒ number
Get webhook support status for provider.
Instance Method Details
#active_integrations ⇒ Hash, number
Returns a list of active integrations
41 42 43 |
# File 'lib/teleflow/api/integrations.rb', line 41 def active_integrations get("/integrations/active") end |
#channel_limit(channel_type) ⇒ number
Returns a channel limit
92 93 94 |
# File 'lib/teleflow/api/integrations.rb', line 92 def channel_limit(channel_type) get("/integrations/#{channel_type}/limit") end |
#create_integration(body) ⇒ Hash, number
Creates a new integration.
@bodyparams:
32 33 34 |
# File 'lib/teleflow/api/integrations.rb', line 32 def create_integration(body) post("/integrations", body: body) end |
#delete_integration(integration_id) ⇒ Hash, number
Execute a soft delete of a integration given a certain ID.
@pathparams:
81 82 83 |
# File 'lib/teleflow/api/integrations.rb', line 81 def delete_integration(integration_id) delete("/integrations/#{integration_id}") end |
#in_app_status ⇒ number
Returns in-app status
100 101 102 |
# File 'lib/teleflow/api/integrations.rb', line 100 def in_app_status get("/integrations/in-app/status") end |
#integrations ⇒ Hash, number
Returns a list of integrations
17 18 19 |
# File 'lib/teleflow/api/integrations.rb', line 17 def integrations get("/integrations") end |
#set_integration_as_primary(integration_id) ⇒ number
Set integration as primary
111 112 113 |
# File 'lib/teleflow/api/integrations.rb', line 111 def set_integration_as_primary(integration_id) post("/integrations/#{integration_id}/set-primary") end |
#update_integration(integration_id, body) ⇒ Hash, number
Update the credentials of a integration.
@pathparams:
69 70 71 |
# File 'lib/teleflow/api/integrations.rb', line 69 def update_integration(integration_id, body) put("/integrations/#{integration_id}", body: body) end |
#webhook_provider_status(provider_id) ⇒ number
Get webhook support status for provider
52 53 54 |
# File 'lib/teleflow/api/integrations.rb', line 52 def webhook_provider_status(provider_id) get("/integrations/webhook/provider/#{provider_id}/status") end |