twilio-ruby 5.67.3 → 5.74.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +288 -0
- data/LICENSE +1 -1
- data/Makefile +6 -2
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +28 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
- data/lib/twilio-ruby/rest/content/v1.rb +52 -0
- data/lib/twilio-ruby/rest/content.rb +53 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +22 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +115 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
- data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
- data/lib/twilio-ruby/rest/flex_api.rb +83 -0
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +14 -0
- data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
- data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
- data/lib/twilio-ruby/rest/insights.rb +0 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +94 -12
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -9
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +5 -5
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +709 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +50 -0
- data/lib/twilio-ruby/rest/messaging.rb +26 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +330 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
- data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → microvisor/v1/device/device_secret.rb} +125 -84
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +393 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +92 -0
- data/lib/twilio-ruby/rest/microvisor.rb +70 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
- data/lib/twilio-ruby/rest/oauth.rb +68 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +0 -58
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
- data/lib/twilio-ruby/rest/routes.rb +62 -0
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +17 -7
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +6 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -10
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +8 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
- data/lib/twilio-ruby/rest/verify.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/security/request_validator.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +135 -35
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +52 -17
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -0,0 +1,413 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
+
class InsightsSegmentsList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the InsightsSegmentsList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [InsightsSegmentsList] InsightsSegmentsList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Insights/Segments"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists InsightsSegmentsInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [Array[String]] reservation_id The list of reservation Ids
|
33
|
+
# @param [String] token The Token HTTP request header
|
34
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
35
|
+
# guarantees to never return more than limit. Default is no limit
|
36
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
37
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
38
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
39
|
+
# efficient page size, i.e. min(limit, 1000)
|
40
|
+
# @return [Array] Array of up to limit results
|
41
|
+
def list(reservation_id: :unset, token: :unset, limit: nil, page_size: nil)
|
42
|
+
self.stream(
|
43
|
+
reservation_id: reservation_id,
|
44
|
+
token: token,
|
45
|
+
limit: limit,
|
46
|
+
page_size: page_size
|
47
|
+
).entries
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Streams InsightsSegmentsInstance records from the API as an Enumerable.
|
52
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
53
|
+
# is reached.
|
54
|
+
# @param [Array[String]] reservation_id The list of reservation Ids
|
55
|
+
# @param [String] token The Token HTTP request header
|
56
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
57
|
+
# guarantees to never return more than limit. Default is no limit.
|
58
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
59
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
60
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
61
|
+
# efficient page size, i.e. min(limit, 1000)
|
62
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
63
|
+
def stream(reservation_id: :unset, token: :unset, limit: nil, page_size: nil)
|
64
|
+
limits = @version.read_limits(limit, page_size)
|
65
|
+
|
66
|
+
page = self.page(reservation_id: reservation_id, token: token, page_size: limits[:page_size], )
|
67
|
+
|
68
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# When passed a block, yields InsightsSegmentsInstance records from the API.
|
73
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
74
|
+
# is reached.
|
75
|
+
def each
|
76
|
+
limits = @version.read_limits
|
77
|
+
|
78
|
+
page = self.page(page_size: limits[:page_size], )
|
79
|
+
|
80
|
+
@version.stream(page,
|
81
|
+
limit: limits[:limit],
|
82
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
83
|
+
end
|
84
|
+
|
85
|
+
##
|
86
|
+
# Retrieve a single page of InsightsSegmentsInstance records from the API.
|
87
|
+
# Request is executed immediately.
|
88
|
+
# @param [Array[String]] reservation_id The list of reservation Ids
|
89
|
+
# @param [String] token The Token HTTP request header
|
90
|
+
# @param [String] page_token PageToken provided by the API
|
91
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
92
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
93
|
+
# @return [Page] Page of InsightsSegmentsInstance
|
94
|
+
def page(reservation_id: :unset, token: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
95
|
+
params = Twilio::Values.of({
|
96
|
+
'ReservationId' => Twilio.serialize_list(reservation_id) { |e| e },
|
97
|
+
'PageToken' => page_token,
|
98
|
+
'Page' => page_number,
|
99
|
+
'PageSize' => page_size,
|
100
|
+
})
|
101
|
+
headers = Twilio::Values.of({'Token' => token, })
|
102
|
+
|
103
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
104
|
+
|
105
|
+
InsightsSegmentsPage.new(@version, response, @solution)
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Retrieve a single page of InsightsSegmentsInstance records from the API.
|
110
|
+
# Request is executed immediately.
|
111
|
+
# @param [String] target_url API-generated URL for the requested results page
|
112
|
+
# @return [Page] Page of InsightsSegmentsInstance
|
113
|
+
def get_page(target_url)
|
114
|
+
response = @version.domain.request(
|
115
|
+
'GET',
|
116
|
+
target_url
|
117
|
+
)
|
118
|
+
InsightsSegmentsPage.new(@version, response, @solution)
|
119
|
+
end
|
120
|
+
|
121
|
+
##
|
122
|
+
# Provide a user friendly representation
|
123
|
+
def to_s
|
124
|
+
'#<Twilio.FlexApi.V1.InsightsSegmentsList>'
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
##
|
129
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
130
|
+
class InsightsSegmentsPage < Page
|
131
|
+
##
|
132
|
+
# Initialize the InsightsSegmentsPage
|
133
|
+
# @param [Version] version Version that contains the resource
|
134
|
+
# @param [Response] response Response from the API
|
135
|
+
# @param [Hash] solution Path solution for the resource
|
136
|
+
# @return [InsightsSegmentsPage] InsightsSegmentsPage
|
137
|
+
def initialize(version, response, solution)
|
138
|
+
super(version, response)
|
139
|
+
|
140
|
+
# Path Solution
|
141
|
+
@solution = solution
|
142
|
+
end
|
143
|
+
|
144
|
+
##
|
145
|
+
# Build an instance of InsightsSegmentsInstance
|
146
|
+
# @param [Hash] payload Payload response from the API
|
147
|
+
# @return [InsightsSegmentsInstance] InsightsSegmentsInstance
|
148
|
+
def get_instance(payload)
|
149
|
+
InsightsSegmentsInstance.new(@version, payload, )
|
150
|
+
end
|
151
|
+
|
152
|
+
##
|
153
|
+
# Provide a user friendly representation
|
154
|
+
def to_s
|
155
|
+
'<Twilio.FlexApi.V1.InsightsSegmentsPage>'
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
161
|
+
class InsightsSegmentsContext < InstanceContext
|
162
|
+
##
|
163
|
+
# Initialize the InsightsSegmentsContext
|
164
|
+
# @param [Version] version Version that contains the resource
|
165
|
+
# @param [String] segment_id To unique id of the segment
|
166
|
+
# @return [InsightsSegmentsContext] InsightsSegmentsContext
|
167
|
+
def initialize(version, segment_id)
|
168
|
+
super(version)
|
169
|
+
|
170
|
+
# Path Solution
|
171
|
+
@solution = {segment_id: segment_id, }
|
172
|
+
@uri = "/Insights/Segments/#{@solution[:segment_id]}"
|
173
|
+
end
|
174
|
+
|
175
|
+
##
|
176
|
+
# Fetch the InsightsSegmentsInstance
|
177
|
+
# @param [String] token The Token HTTP request header
|
178
|
+
# @return [InsightsSegmentsInstance] Fetched InsightsSegmentsInstance
|
179
|
+
def fetch(token: :unset)
|
180
|
+
headers = Twilio::Values.of({'Token' => token, })
|
181
|
+
|
182
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
183
|
+
|
184
|
+
InsightsSegmentsInstance.new(@version, payload, segment_id: @solution[:segment_id], )
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Provide a user friendly representation
|
189
|
+
def to_s
|
190
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
191
|
+
"#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>"
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Provide a detailed, user friendly representation
|
196
|
+
def inspect
|
197
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
198
|
+
"#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>"
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
204
|
+
class InsightsSegmentsInstance < InstanceResource
|
205
|
+
##
|
206
|
+
# Initialize the InsightsSegmentsInstance
|
207
|
+
# @param [Version] version Version that contains the resource
|
208
|
+
# @param [Hash] payload payload that contains response from Twilio
|
209
|
+
# @param [String] segment_id To unique id of the segment
|
210
|
+
# @return [InsightsSegmentsInstance] InsightsSegmentsInstance
|
211
|
+
def initialize(version, payload, segment_id: nil)
|
212
|
+
super(version)
|
213
|
+
|
214
|
+
# Marshaled Properties
|
215
|
+
@properties = {
|
216
|
+
'segment_id' => payload['segment_id'],
|
217
|
+
'external_id' => payload['external_id'],
|
218
|
+
'queue' => payload['queue'],
|
219
|
+
'external_contact' => payload['external_contact'],
|
220
|
+
'external_segment_link_id' => payload['external_segment_link_id'],
|
221
|
+
'date' => payload['date'],
|
222
|
+
'account_id' => payload['account_id'],
|
223
|
+
'external_segment_link' => payload['external_segment_link'],
|
224
|
+
'agent_id' => payload['agent_id'],
|
225
|
+
'agent_phone' => payload['agent_phone'],
|
226
|
+
'agent_name' => payload['agent_name'],
|
227
|
+
'agent_team_name' => payload['agent_team_name'],
|
228
|
+
'agent_team_name_in_hierarchy' => payload['agent_team_name_in_hierarchy'],
|
229
|
+
'agent_link' => payload['agent_link'],
|
230
|
+
'customer_phone' => payload['customer_phone'],
|
231
|
+
'customer_name' => payload['customer_name'],
|
232
|
+
'customer_link' => payload['customer_link'],
|
233
|
+
'segment_recording_offset' => payload['segment_recording_offset'],
|
234
|
+
'media' => payload['media'],
|
235
|
+
'assessment_type' => payload['assessment_type'],
|
236
|
+
'assessment_percentage' => payload['assessment_percentage'],
|
237
|
+
'url' => payload['url'],
|
238
|
+
}
|
239
|
+
|
240
|
+
# Context
|
241
|
+
@instance_context = nil
|
242
|
+
@params = {'segment_id' => segment_id || @properties['segment_id'], }
|
243
|
+
end
|
244
|
+
|
245
|
+
##
|
246
|
+
# Generate an instance context for the instance, the context is capable of
|
247
|
+
# performing various actions. All instance actions are proxied to the context
|
248
|
+
# @return [InsightsSegmentsContext] InsightsSegmentsContext for this InsightsSegmentsInstance
|
249
|
+
def context
|
250
|
+
unless @instance_context
|
251
|
+
@instance_context = InsightsSegmentsContext.new(@version, @params['segment_id'], )
|
252
|
+
end
|
253
|
+
@instance_context
|
254
|
+
end
|
255
|
+
|
256
|
+
##
|
257
|
+
# @return [String] Unique segment Id
|
258
|
+
def segment_id
|
259
|
+
@properties['segment_id']
|
260
|
+
end
|
261
|
+
|
262
|
+
##
|
263
|
+
# @return [String] The id for conversation.
|
264
|
+
def external_id
|
265
|
+
@properties['external_id']
|
266
|
+
end
|
267
|
+
|
268
|
+
##
|
269
|
+
# @return [String] The queue
|
270
|
+
def queue
|
271
|
+
@properties['queue']
|
272
|
+
end
|
273
|
+
|
274
|
+
##
|
275
|
+
# @return [String] The external_contact
|
276
|
+
def external_contact
|
277
|
+
@properties['external_contact']
|
278
|
+
end
|
279
|
+
|
280
|
+
##
|
281
|
+
# @return [String] The uuid for external_segment_link.
|
282
|
+
def external_segment_link_id
|
283
|
+
@properties['external_segment_link_id']
|
284
|
+
end
|
285
|
+
|
286
|
+
##
|
287
|
+
# @return [String] The conversation date.
|
288
|
+
def date
|
289
|
+
@properties['date']
|
290
|
+
end
|
291
|
+
|
292
|
+
##
|
293
|
+
# @return [String] The id for the account.
|
294
|
+
def account_id
|
295
|
+
@properties['account_id']
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# @return [String] The hyperlink to recording.
|
300
|
+
def external_segment_link
|
301
|
+
@properties['external_segment_link']
|
302
|
+
end
|
303
|
+
|
304
|
+
##
|
305
|
+
# @return [String] The unique id for the agent.
|
306
|
+
def agent_id
|
307
|
+
@properties['agent_id']
|
308
|
+
end
|
309
|
+
|
310
|
+
##
|
311
|
+
# @return [String] The agent phone number.
|
312
|
+
def agent_phone
|
313
|
+
@properties['agent_phone']
|
314
|
+
end
|
315
|
+
|
316
|
+
##
|
317
|
+
# @return [String] The agent name.
|
318
|
+
def agent_name
|
319
|
+
@properties['agent_name']
|
320
|
+
end
|
321
|
+
|
322
|
+
##
|
323
|
+
# @return [String] The team name of agent.
|
324
|
+
def agent_team_name
|
325
|
+
@properties['agent_team_name']
|
326
|
+
end
|
327
|
+
|
328
|
+
##
|
329
|
+
# @return [String] he team name of agent.
|
330
|
+
def agent_team_name_in_hierarchy
|
331
|
+
@properties['agent_team_name_in_hierarchy']
|
332
|
+
end
|
333
|
+
|
334
|
+
##
|
335
|
+
# @return [String] The link to the agent conversation.
|
336
|
+
def agent_link
|
337
|
+
@properties['agent_link']
|
338
|
+
end
|
339
|
+
|
340
|
+
##
|
341
|
+
# @return [String] The sort value for comment.
|
342
|
+
def customer_phone
|
343
|
+
@properties['customer_phone']
|
344
|
+
end
|
345
|
+
|
346
|
+
##
|
347
|
+
# @return [String] The customer name.
|
348
|
+
def customer_name
|
349
|
+
@properties['customer_name']
|
350
|
+
end
|
351
|
+
|
352
|
+
##
|
353
|
+
# @return [String] The link to the customer conversation.
|
354
|
+
def customer_link
|
355
|
+
@properties['customer_link']
|
356
|
+
end
|
357
|
+
|
358
|
+
##
|
359
|
+
# @return [String] The offset value for the recording.
|
360
|
+
def segment_recording_offset
|
361
|
+
@properties['segment_recording_offset']
|
362
|
+
end
|
363
|
+
|
364
|
+
##
|
365
|
+
# @return [Hash] The media identifiers of the conversation.
|
366
|
+
def media
|
367
|
+
@properties['media']
|
368
|
+
end
|
369
|
+
|
370
|
+
##
|
371
|
+
# @return [Hash] The type of the assessment.
|
372
|
+
def assessment_type
|
373
|
+
@properties['assessment_type']
|
374
|
+
end
|
375
|
+
|
376
|
+
##
|
377
|
+
# @return [Hash] The percentage score on Assessment.
|
378
|
+
def assessment_percentage
|
379
|
+
@properties['assessment_percentage']
|
380
|
+
end
|
381
|
+
|
382
|
+
##
|
383
|
+
# @return [String] The url
|
384
|
+
def url
|
385
|
+
@properties['url']
|
386
|
+
end
|
387
|
+
|
388
|
+
##
|
389
|
+
# Fetch the InsightsSegmentsInstance
|
390
|
+
# @param [String] token The Token HTTP request header
|
391
|
+
# @return [InsightsSegmentsInstance] Fetched InsightsSegmentsInstance
|
392
|
+
def fetch(token: :unset)
|
393
|
+
context.fetch(token: token, )
|
394
|
+
end
|
395
|
+
|
396
|
+
##
|
397
|
+
# Provide a user friendly representation
|
398
|
+
def to_s
|
399
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
400
|
+
"<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
|
401
|
+
end
|
402
|
+
|
403
|
+
##
|
404
|
+
# Provide a detailed, user friendly representation
|
405
|
+
def inspect
|
406
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
407
|
+
"<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
|
408
|
+
end
|
409
|
+
end
|
410
|
+
end
|
411
|
+
end
|
412
|
+
end
|
413
|
+
end
|
@@ -8,15 +8,15 @@
|
|
8
8
|
|
9
9
|
module Twilio
|
10
10
|
module REST
|
11
|
-
class
|
12
|
-
class
|
11
|
+
class FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
13
|
##
|
14
14
|
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
-
class
|
15
|
+
class InsightsSessionList < ListResource
|
16
16
|
##
|
17
|
-
# Initialize the
|
17
|
+
# Initialize the InsightsSessionList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @return [
|
19
|
+
# @return [InsightsSessionList] InsightsSessionList
|
20
20
|
def initialize(version)
|
21
21
|
super(version)
|
22
22
|
|
@@ -27,19 +27,19 @@ module Twilio
|
|
27
27
|
##
|
28
28
|
# Provide a user friendly representation
|
29
29
|
def to_s
|
30
|
-
'#<Twilio.
|
30
|
+
'#<Twilio.FlexApi.V1.InsightsSessionList>'
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
34
|
##
|
35
35
|
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
36
|
-
class
|
36
|
+
class InsightsSessionPage < Page
|
37
37
|
##
|
38
|
-
# Initialize the
|
38
|
+
# Initialize the InsightsSessionPage
|
39
39
|
# @param [Version] version Version that contains the resource
|
40
40
|
# @param [Response] response Response from the API
|
41
41
|
# @param [Hash] solution Path solution for the resource
|
42
|
-
# @return [
|
42
|
+
# @return [InsightsSessionPage] InsightsSessionPage
|
43
43
|
def initialize(version, response, solution)
|
44
44
|
super(version, response)
|
45
45
|
|
@@ -48,80 +48,79 @@ module Twilio
|
|
48
48
|
end
|
49
49
|
|
50
50
|
##
|
51
|
-
# Build an instance of
|
51
|
+
# Build an instance of InsightsSessionInstance
|
52
52
|
# @param [Hash] payload Payload response from the API
|
53
|
-
# @return [
|
53
|
+
# @return [InsightsSessionInstance] InsightsSessionInstance
|
54
54
|
def get_instance(payload)
|
55
|
-
|
55
|
+
InsightsSessionInstance.new(@version, payload, )
|
56
56
|
end
|
57
57
|
|
58
58
|
##
|
59
59
|
# Provide a user friendly representation
|
60
60
|
def to_s
|
61
|
-
'<Twilio.
|
61
|
+
'<Twilio.FlexApi.V1.InsightsSessionPage>'
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
65
|
##
|
66
66
|
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
67
|
-
class
|
67
|
+
class InsightsSessionContext < InstanceContext
|
68
68
|
##
|
69
|
-
# Initialize the
|
69
|
+
# Initialize the InsightsSessionContext
|
70
70
|
# @param [Version] version Version that contains the resource
|
71
|
-
# @return [
|
71
|
+
# @return [InsightsSessionContext] InsightsSessionContext
|
72
72
|
def initialize(version)
|
73
73
|
super(version)
|
74
74
|
|
75
75
|
# Path Solution
|
76
76
|
@solution = {}
|
77
|
-
@uri = "/
|
77
|
+
@uri = "/Insights/Session"
|
78
78
|
end
|
79
79
|
|
80
80
|
##
|
81
|
-
#
|
82
|
-
# @param [String]
|
83
|
-
#
|
84
|
-
|
85
|
-
|
86
|
-
def fetch(if_none_match: :unset)
|
87
|
-
headers = Twilio::Values.of({'If-None-Match' => if_none_match, })
|
81
|
+
# Create the InsightsSessionInstance
|
82
|
+
# @param [String] authorization The Authorization HTTP request header
|
83
|
+
# @return [InsightsSessionInstance] Created InsightsSessionInstance
|
84
|
+
def create(authorization: :unset)
|
85
|
+
headers = Twilio::Values.of({'Authorization' => authorization, })
|
88
86
|
|
89
|
-
payload = @version.
|
87
|
+
payload = @version.create('POST', @uri, headers: headers)
|
90
88
|
|
91
|
-
|
89
|
+
InsightsSessionInstance.new(@version, payload, )
|
92
90
|
end
|
93
91
|
|
94
92
|
##
|
95
93
|
# Provide a user friendly representation
|
96
94
|
def to_s
|
97
95
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
98
|
-
"#<Twilio.
|
96
|
+
"#<Twilio.FlexApi.V1.InsightsSessionContext #{context}>"
|
99
97
|
end
|
100
98
|
|
101
99
|
##
|
102
100
|
# Provide a detailed, user friendly representation
|
103
101
|
def inspect
|
104
102
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
105
|
-
"#<Twilio.
|
103
|
+
"#<Twilio.FlexApi.V1.InsightsSessionContext #{context}>"
|
106
104
|
end
|
107
105
|
end
|
108
106
|
|
109
107
|
##
|
110
108
|
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
111
|
-
class
|
109
|
+
class InsightsSessionInstance < InstanceResource
|
112
110
|
##
|
113
|
-
# Initialize the
|
111
|
+
# Initialize the InsightsSessionInstance
|
114
112
|
# @param [Version] version Version that contains the resource
|
115
113
|
# @param [Hash] payload payload that contains response from Twilio
|
116
|
-
# @return [
|
114
|
+
# @return [InsightsSessionInstance] InsightsSessionInstance
|
117
115
|
def initialize(version, payload)
|
118
116
|
super(version)
|
119
117
|
|
120
118
|
# Marshaled Properties
|
121
119
|
@properties = {
|
122
|
-
'
|
123
|
-
'
|
124
|
-
'
|
120
|
+
'workspace_id' => payload['workspace_id'],
|
121
|
+
'session_expiry' => payload['session_expiry'],
|
122
|
+
'session_id' => payload['session_id'],
|
123
|
+
'base_url' => payload['base_url'],
|
125
124
|
'url' => payload['url'],
|
126
125
|
}
|
127
126
|
|
@@ -133,60 +132,64 @@ module Twilio
|
|
133
132
|
##
|
134
133
|
# Generate an instance context for the instance, the context is capable of
|
135
134
|
# performing various actions. All instance actions are proxied to the context
|
136
|
-
# @return [
|
135
|
+
# @return [InsightsSessionContext] InsightsSessionContext for this InsightsSessionInstance
|
137
136
|
def context
|
138
137
|
unless @instance_context
|
139
|
-
@instance_context =
|
138
|
+
@instance_context = InsightsSessionContext.new(@version, )
|
140
139
|
end
|
141
140
|
@instance_context
|
142
141
|
end
|
143
142
|
|
144
143
|
##
|
145
|
-
# @return [
|
146
|
-
def
|
147
|
-
@properties['
|
144
|
+
# @return [String] Unique ID to identify the user's workspace
|
145
|
+
def workspace_id
|
146
|
+
@properties['workspace_id']
|
148
147
|
end
|
149
148
|
|
150
149
|
##
|
151
|
-
# @return [String] The
|
152
|
-
def
|
153
|
-
@properties['
|
150
|
+
# @return [String] The session expiry date and time
|
151
|
+
def session_expiry
|
152
|
+
@properties['session_expiry']
|
154
153
|
end
|
155
154
|
|
156
155
|
##
|
157
|
-
# @return [String]
|
158
|
-
def
|
159
|
-
@properties['
|
156
|
+
# @return [String] Unique session ID
|
157
|
+
def session_id
|
158
|
+
@properties['session_id']
|
160
159
|
end
|
161
160
|
|
162
161
|
##
|
163
|
-
# @return [String]
|
162
|
+
# @return [String] Base URL to fetch reports and dashboards
|
163
|
+
def base_url
|
164
|
+
@properties['base_url']
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# @return [String] The URL of this resource.
|
164
169
|
def url
|
165
170
|
@properties['url']
|
166
171
|
end
|
167
172
|
|
168
173
|
##
|
169
|
-
#
|
170
|
-
# @param [String]
|
171
|
-
#
|
172
|
-
|
173
|
-
|
174
|
-
def fetch(if_none_match: :unset)
|
175
|
-
context.fetch(if_none_match: if_none_match, )
|
174
|
+
# Create the InsightsSessionInstance
|
175
|
+
# @param [String] authorization The Authorization HTTP request header
|
176
|
+
# @return [InsightsSessionInstance] Created InsightsSessionInstance
|
177
|
+
def create(authorization: :unset)
|
178
|
+
context.create(authorization: authorization, )
|
176
179
|
end
|
177
180
|
|
178
181
|
##
|
179
182
|
# Provide a user friendly representation
|
180
183
|
def to_s
|
181
184
|
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
182
|
-
"<Twilio.
|
185
|
+
"<Twilio.FlexApi.V1.InsightsSessionInstance #{values}>"
|
183
186
|
end
|
184
187
|
|
185
188
|
##
|
186
189
|
# Provide a detailed, user friendly representation
|
187
190
|
def inspect
|
188
191
|
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
189
|
-
"<Twilio.
|
192
|
+
"<Twilio.FlexApi.V1.InsightsSessionInstance #{values}>"
|
190
193
|
end
|
191
194
|
end
|
192
195
|
end
|