Class: Telnyx::Resources::AI::Conversations::InsightGroups
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Conversations::InsightGroups
- Defined in:
- lib/telnyx/resources/ai/conversations/insight_groups.rb,
lib/telnyx/resources/ai/conversations/insight_groups/insights.rb
Defined Under Namespace
Classes: Insights
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#delete(group_id, request_options: {}) ⇒ nil
Delete insight group by ID.
-
#initialize(client:) ⇒ InsightGroups
constructor
private
A new instance of InsightGroups.
-
#insight_groups(name:, description: nil, webhook: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Create a new insight group.
-
#retrieve(group_id, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Get insight group by ID.
-
#retrieve_insight_groups(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Conversations::InsightTemplateGroup>
Get all insight groups.
-
#update(group_id, description: nil, name: nil, webhook: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Update an insight template group.
Constructor Details
#initialize(client:) ⇒ InsightGroups
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of InsightGroups.
128 129 130 131 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 128 def initialize(client:) @client = client @insights = Telnyx::Resources::AI::Conversations::InsightGroups::Insights.new(client: client) end |
Instance Attribute Details
#insights ⇒ Telnyx::Resources::AI::Conversations::InsightGroups::Insights (readonly)
9 10 11 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 9 def insights @insights end |
Instance Method Details
#delete(group_id, request_options: {}) ⇒ nil
Delete insight group by ID
70 71 72 73 74 75 76 77 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 70 def delete(group_id, params = {}) @client.request( method: :delete, path: ["ai/conversations/insight-groups/%1$s", group_id], model: NilClass, options: params[:request_options] ) end |
#insight_groups(name:, description: nil, webhook: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Create a new insight group
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 91 def insight_groups(params) parsed, = Telnyx::AI::Conversations::InsightGroupInsightGroupsParams.dump_request(params) @client.request( method: :post, path: "ai/conversations/insight-groups", body: parsed, model: Telnyx::AI::Conversations::InsightTemplateGroupDetail, options: ) end |
#retrieve(group_id, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Get insight group by ID
22 23 24 25 26 27 28 29 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 22 def retrieve(group_id, params = {}) @client.request( method: :get, path: ["ai/conversations/insight-groups/%1$s", group_id], model: Telnyx::AI::Conversations::InsightTemplateGroupDetail, options: params[:request_options] ) end |
#retrieve_insight_groups(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Conversations::InsightTemplateGroup>
Get all insight groups
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 113 def retrieve_insight_groups(params = {}) parsed, = Telnyx::AI::Conversations::InsightGroupRetrieveInsightGroupsParams.dump_request(params) @client.request( method: :get, path: "ai/conversations/insight-groups", query: parsed.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::AI::Conversations::InsightTemplateGroup, options: ) end |
#update(group_id, description: nil, name: nil, webhook: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Update an insight template group
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 48 def update(group_id, params = {}) parsed, = Telnyx::AI::Conversations::InsightGroupUpdateParams.dump_request(params) @client.request( method: :put, path: ["ai/conversations/insight-groups/%1$s", group_id], body: parsed, model: Telnyx::AI::Conversations::InsightTemplateGroupDetail, options: ) end |