twilio-ruby 5.67.3 → 5.74.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pr-lint.yml +8 -2
  3. data/.github/workflows/test-and-deploy.yml +3 -3
  4. data/CHANGES.md +288 -0
  5. data/LICENSE +1 -1
  6. data/Makefile +6 -2
  7. data/PULL_REQUEST_TEMPLATE.md +1 -1
  8. data/README.md +2 -2
  9. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
  10. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
  17. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
  18. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
  19. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
  21. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
  22. data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
  24. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
  25. data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
  26. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
  27. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
  28. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
  29. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
  30. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
  31. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
  33. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
  34. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
  35. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
  36. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
  37. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
  38. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
  39. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
  43. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
  44. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
  45. data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
  46. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
  47. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
  48. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
  49. data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
  50. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
  51. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
  52. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
  53. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
  54. data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
  55. data/lib/twilio-ruby/rest/client.rb +28 -0
  56. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
  57. data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
  58. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
  59. data/lib/twilio-ruby/rest/content/v1.rb +52 -0
  60. data/lib/twilio-ruby/rest/content.rb +53 -0
  61. data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
  62. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
  63. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
  64. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
  65. data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
  66. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
  67. data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
  68. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
  69. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  70. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
  71. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
  72. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
  73. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
  74. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
  75. data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
  76. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
  77. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
  78. data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
  79. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +22 -1
  80. data/lib/twilio-ruby/rest/flex_api/v1.rb +115 -0
  81. data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
  82. data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
  83. data/lib/twilio-ruby/rest/flex_api.rb +83 -0
  84. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
  85. data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +14 -0
  86. data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
  87. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
  88. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
  89. data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
  90. data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
  91. data/lib/twilio-ruby/rest/insights.rb +0 -8
  92. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
  93. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
  94. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
  95. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
  96. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
  97. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
  98. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
  99. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
  100. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +94 -12
  101. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
  102. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -9
  103. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +5 -5
  104. data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
  105. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
  106. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
  107. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
  108. data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
  109. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +709 -0
  110. data/lib/twilio-ruby/rest/messaging/v1.rb +50 -0
  111. data/lib/twilio-ruby/rest/messaging.rb +26 -0
  112. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
  113. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
  114. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
  115. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +330 -0
  116. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
  117. data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → microvisor/v1/device/device_secret.rb} +125 -84
  118. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +393 -0
  119. data/lib/twilio-ruby/rest/microvisor/v1.rb +92 -0
  120. data/lib/twilio-ruby/rest/microvisor.rb +70 -0
  121. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
  122. data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
  123. data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
  124. data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
  125. data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
  126. data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
  127. data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
  128. data/lib/twilio-ruby/rest/oauth.rb +68 -0
  129. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
  130. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
  131. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
  132. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
  133. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
  134. data/lib/twilio-ruby/rest/preview.rb +0 -58
  135. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
  136. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
  137. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
  138. data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
  139. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
  140. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
  141. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
  142. data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
  143. data/lib/twilio-ruby/rest/routes.rb +62 -0
  144. data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
  145. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
  146. data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
  147. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
  148. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +17 -7
  149. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
  150. data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
  151. data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
  152. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
  153. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
  154. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
  155. data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
  156. data/lib/twilio-ruby/rest/supersim.rb +6 -0
  157. data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
  158. data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
  159. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
  160. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
  161. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
  162. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
  163. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
  164. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
  165. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
  166. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
  167. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
  168. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
  169. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
  170. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
  171. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
  172. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
  173. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
  174. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
  175. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
  176. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
  177. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
  178. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
  179. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
  180. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
  181. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
  182. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
  183. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -10
  184. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +8 -1
  185. data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
  186. data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
  187. data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
  188. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
  189. data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
  190. data/lib/twilio-ruby/rest/verify.rb +8 -0
  191. data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
  192. data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
  193. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
  194. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
  195. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
  196. data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
  197. data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
  198. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
  199. data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
  200. data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
  201. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
  202. data/lib/twilio-ruby/security/request_validator.rb +1 -1
  203. data/lib/twilio-ruby/twiml/voice_response.rb +135 -35
  204. data/lib/twilio-ruby/version.rb +1 -1
  205. data/twilio-ruby.gemspec +1 -1
  206. metadata +52 -17
  207. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
  208. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
  209. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
  210. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
  211. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
  212. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
  213. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
  214. data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
  215. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
  216. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -0,0 +1,133 @@
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 V2 < Version
13
+ class WebChannelsList < ListResource
14
+ ##
15
+ # Initialize the WebChannelsList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [WebChannelsList] WebChannelsList
18
+ def initialize(version)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {}
23
+ @uri = "/WebChats"
24
+ end
25
+
26
+ ##
27
+ # Create the WebChannelsInstance
28
+ # @param [String] address_sid The SID of the Conversations Address. See {Address
29
+ # Configuration
30
+ # Resource}[https://www.twilio.com/docs/conversations/api/address-configuration-resource]
31
+ # for configuration details. When a conversation is created on the Flex backend,
32
+ # the callback URL will be set to the corresponding Studio Flow SID or webhook URL
33
+ # in your address configuration.
34
+ # @param [String] chat_friendly_name The Conversation's friendly name. See the
35
+ # {Conversation
36
+ # resource}[https://www.twilio.com/docs/conversations/api/conversation-resource]
37
+ # for an example.
38
+ # @param [String] customer_friendly_name The Conversation participant's friendly
39
+ # name. See the {Conversation Participant
40
+ # Resource}[https://www.twilio.com/docs/conversations/api/conversation-participant-resource]
41
+ # for an example.
42
+ # @param [String] pre_engagement_data The pre-engagement data.
43
+ # @return [WebChannelsInstance] Created WebChannelsInstance
44
+ def create(address_sid: nil, chat_friendly_name: :unset, customer_friendly_name: :unset, pre_engagement_data: :unset)
45
+ data = Twilio::Values.of({
46
+ 'AddressSid' => address_sid,
47
+ 'ChatFriendlyName' => chat_friendly_name,
48
+ 'CustomerFriendlyName' => customer_friendly_name,
49
+ 'PreEngagementData' => pre_engagement_data,
50
+ })
51
+
52
+ payload = @version.create('POST', @uri, data: data)
53
+
54
+ WebChannelsInstance.new(@version, payload, )
55
+ end
56
+
57
+ ##
58
+ # Provide a user friendly representation
59
+ def to_s
60
+ '#<Twilio.FlexApi.V2.WebChannelsList>'
61
+ end
62
+ end
63
+
64
+ class WebChannelsPage < Page
65
+ ##
66
+ # Initialize the WebChannelsPage
67
+ # @param [Version] version Version that contains the resource
68
+ # @param [Response] response Response from the API
69
+ # @param [Hash] solution Path solution for the resource
70
+ # @return [WebChannelsPage] WebChannelsPage
71
+ def initialize(version, response, solution)
72
+ super(version, response)
73
+
74
+ # Path Solution
75
+ @solution = solution
76
+ end
77
+
78
+ ##
79
+ # Build an instance of WebChannelsInstance
80
+ # @param [Hash] payload Payload response from the API
81
+ # @return [WebChannelsInstance] WebChannelsInstance
82
+ def get_instance(payload)
83
+ WebChannelsInstance.new(@version, payload, )
84
+ end
85
+
86
+ ##
87
+ # Provide a user friendly representation
88
+ def to_s
89
+ '<Twilio.FlexApi.V2.WebChannelsPage>'
90
+ end
91
+ end
92
+
93
+ class WebChannelsInstance < InstanceResource
94
+ ##
95
+ # Initialize the WebChannelsInstance
96
+ # @param [Version] version Version that contains the resource
97
+ # @param [Hash] payload payload that contains response from Twilio
98
+ # @return [WebChannelsInstance] WebChannelsInstance
99
+ def initialize(version, payload)
100
+ super(version)
101
+
102
+ # Marshaled Properties
103
+ @properties = {'conversation_sid' => payload['conversation_sid'], 'identity' => payload['identity'], }
104
+ end
105
+
106
+ ##
107
+ # @return [String] The unique string representing the Conversation resource created
108
+ def conversation_sid
109
+ @properties['conversation_sid']
110
+ end
111
+
112
+ ##
113
+ # @return [String] The unique string representing the User created
114
+ def identity
115
+ @properties['identity']
116
+ end
117
+
118
+ ##
119
+ # Provide a user friendly representation
120
+ def to_s
121
+ "<Twilio.FlexApi.V2.WebChannelsInstance>"
122
+ end
123
+
124
+ ##
125
+ # Provide a detailed, user friendly representation
126
+ def inspect
127
+ "<Twilio.FlexApi.V2.WebChannelsInstance>"
128
+ end
129
+ end
130
+ end
131
+ end
132
+ end
133
+ end
@@ -0,0 +1,35 @@
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
12
+ class V2 < Version
13
+ ##
14
+ # Initialize the V2 version of FlexApi
15
+ def initialize(domain)
16
+ super
17
+ @version = 'v2'
18
+ @web_channels = nil
19
+ end
20
+
21
+ ##
22
+ # @return [Twilio::REST::Flex_api::V2::WebChannelsContext]
23
+ def web_channels
24
+ @web_channels ||= WebChannelsList.new self
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ '<Twilio::REST::FlexApi::V2>'
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -20,6 +20,7 @@ module Twilio
20
20
 
21
21
  # Versions
22
22
  @v1 = nil
23
+ @v2 = nil
23
24
  end
24
25
 
25
26
  ##
@@ -28,6 +29,12 @@ module Twilio
28
29
  @v1 ||= V1.new self
29
30
  end
30
31
 
32
+ ##
33
+ # Version v2 of flex_api
34
+ def v2
35
+ @v2 ||= V2.new self
36
+ end
37
+
31
38
  ##
32
39
  # @param [String] sid The unique string that we created to identify the Channel
33
40
  # resource.
@@ -52,6 +59,76 @@ module Twilio
52
59
  self.v1.flex_flow(sid)
53
60
  end
54
61
 
62
+ ##
63
+ # @param [String] assessment_id The unique id of the assessment
64
+ # @return [Twilio::REST::Flex_api::V1::AssessmentsInstance] if assessment_id was passed.
65
+ # @return [Twilio::REST::Flex_api::V1::AssessmentsList]
66
+ def assessments(assessment_id=:unset)
67
+ self.v1.assessments(assessment_id)
68
+ end
69
+
70
+ ##
71
+ # @return [Twilio::REST::Flex_api::V1::InsightsAssessmentsCommentInstance]
72
+ def insights_assessments_comment
73
+ self.v1.insights_assessments_comment()
74
+ end
75
+
76
+ ##
77
+ # @param [String] id The unique id of this questionnaire
78
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesInstance] if id was passed.
79
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesList]
80
+ def insights_questionnaires(id=:unset)
81
+ self.v1.insights_questionnaires(id)
82
+ end
83
+
84
+ ##
85
+ # @param [String] category_id The unique ID for the category
86
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryInstance] if category_id was passed.
87
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryList]
88
+ def insights_questionnaires_category(category_id=:unset)
89
+ self.v1.insights_questionnaires_category(category_id)
90
+ end
91
+
92
+ ##
93
+ # @param [String] question_id The unique ID of the question
94
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionInstance] if question_id was passed.
95
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionList]
96
+ def insights_questionnaires_question(question_id=:unset)
97
+ self.v1.insights_questionnaires_question(question_id)
98
+ end
99
+
100
+ ##
101
+ # @param [String] segment_id To unique id of the segment
102
+ # @return [Twilio::REST::Flex_api::V1::InsightsSegmentsInstance] if segment_id was passed.
103
+ # @return [Twilio::REST::Flex_api::V1::InsightsSegmentsList]
104
+ def insights_segments(segment_id=:unset)
105
+ self.v1.insights_segments(segment_id)
106
+ end
107
+
108
+ ##
109
+ # @return [Twilio::REST::Flex_api::V1::InsightsSessionInstance]
110
+ def insights_session
111
+ self.v1.insights_session()
112
+ end
113
+
114
+ ##
115
+ # @return [Twilio::REST::Flex_api::V1::InsightsSettingsAnswerSetsInstance]
116
+ def insights_settings_answer_sets
117
+ self.v1.insights_settings_answer_sets()
118
+ end
119
+
120
+ ##
121
+ # @return [Twilio::REST::Flex_api::V1::InsightsSettingsCommentInstance]
122
+ def insights_settings_comment
123
+ self.v1.insights_settings_comment()
124
+ end
125
+
126
+ ##
127
+ # @return [Twilio::REST::Flex_api::V1::InsightsUserRolesInstance]
128
+ def insights_user_roles
129
+ self.v1.insights_user_roles()
130
+ end
131
+
55
132
  ##
56
133
  # @param [String] sid The unique string created by Twilio to identify an
57
134
  # Interaction resource, prefixed with KD.
@@ -70,6 +147,12 @@ module Twilio
70
147
  self.v1.web_channel(sid)
71
148
  end
72
149
 
150
+ ##
151
+ # @return [Twilio::REST::Flex_api::V2::WebChannelsInstance]
152
+ def web_channels
153
+ self.v2.web_channels()
154
+ end
155
+
73
156
  ##
74
157
  # Provide a user friendly representation
75
158
  def to_s
@@ -0,0 +1,322 @@
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 Insights < Domain
12
+ class V1 < Version
13
+ class CallContext < InstanceContext
14
+ ##
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
+ class AnnotationList < ListResource
17
+ ##
18
+ # Initialize the AnnotationList
19
+ # @param [Version] version Version that contains the resource
20
+ # @param [String] call_sid The unique SID identifier of the Call.
21
+ # @return [AnnotationList] AnnotationList
22
+ def initialize(version, call_sid: nil)
23
+ super(version)
24
+
25
+ # Path Solution
26
+ @solution = {call_sid: call_sid}
27
+ end
28
+
29
+ ##
30
+ # Provide a user friendly representation
31
+ def to_s
32
+ '#<Twilio.Insights.V1.AnnotationList>'
33
+ end
34
+ end
35
+
36
+ ##
37
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
38
+ class AnnotationPage < Page
39
+ ##
40
+ # Initialize the AnnotationPage
41
+ # @param [Version] version Version that contains the resource
42
+ # @param [Response] response Response from the API
43
+ # @param [Hash] solution Path solution for the resource
44
+ # @return [AnnotationPage] AnnotationPage
45
+ def initialize(version, response, solution)
46
+ super(version, response)
47
+
48
+ # Path Solution
49
+ @solution = solution
50
+ end
51
+
52
+ ##
53
+ # Build an instance of AnnotationInstance
54
+ # @param [Hash] payload Payload response from the API
55
+ # @return [AnnotationInstance] AnnotationInstance
56
+ def get_instance(payload)
57
+ AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
58
+ end
59
+
60
+ ##
61
+ # Provide a user friendly representation
62
+ def to_s
63
+ '<Twilio.Insights.V1.AnnotationPage>'
64
+ end
65
+ end
66
+
67
+ ##
68
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
69
+ class AnnotationContext < InstanceContext
70
+ ##
71
+ # Initialize the AnnotationContext
72
+ # @param [Version] version Version that contains the resource
73
+ # @param [String] call_sid The unique SID identifier of the Call.
74
+ # @return [AnnotationContext] AnnotationContext
75
+ def initialize(version, call_sid)
76
+ super(version)
77
+
78
+ # Path Solution
79
+ @solution = {call_sid: call_sid, }
80
+ @uri = "/Voice/#{@solution[:call_sid]}/Annotation"
81
+ end
82
+
83
+ ##
84
+ # Update the AnnotationInstance
85
+ # @param [annotation.AnsweredBy] answered_by Which entity answered the call as
86
+ # determined by Answering Machine Detection. Use this to provide feedback on
87
+ # Answering Machine Detection accuracy. Possible enumerated values, one of: human,
88
+ # machine. human indicates the call was answered by a person. machine indicates
89
+ # the call was answered by an answering machine.
90
+ # @param [annotation.ConnectivityIssue] connectivity_issue Specify if the call had
91
+ # any connectivity issues. Possible enumerated values, one :
92
+ # no_connectivity_issue, invalid_number, caller_id, dropped_call,
93
+ # number_reachability.
94
+ # @param [String] quality_issues Specify if the call had any subjective quality
95
+ # issues. Possible values, one or more of: no_quality_issue, low_volume,
96
+ # choppy_robotic, echo, dtmf, latency, owa, static_noise. Use comma separated
97
+ # values to indicate multiple quality issues for the same call
98
+ # @param [Boolean] spam Specify if the call was a spam call. Use this to provide
99
+ # feedback on whether calls placed from your account were marked as spam, or if
100
+ # inbound calls received by your account were unwanted spam. Is of type Boolean:
101
+ # true, false. Use true if the call was a spam call.
102
+ # @param [String] call_score Specify the call score. This is of type integer. Use
103
+ # a range of 1-5 to indicate the call experience score, with the following mapping
104
+ # as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor,
105
+ # 1: Bad].
106
+ # @param [String] comment Specify any comments pertaining to the call. This of
107
+ # type string with a max limit of 100 characters. Twilio does not treat this field
108
+ # as PII, so don’t put any PII in here.
109
+ # @param [String] incident Associate this call with an incident or support ticket.
110
+ # This is of type string with a max limit of 100 characters. Twilio does not treat
111
+ # this field as PII, so don’t put any PII in here.
112
+ # @return [AnnotationInstance] Updated AnnotationInstance
113
+ def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
114
+ data = Twilio::Values.of({
115
+ 'AnsweredBy' => answered_by,
116
+ 'ConnectivityIssue' => connectivity_issue,
117
+ 'QualityIssues' => quality_issues,
118
+ 'Spam' => spam,
119
+ 'CallScore' => call_score,
120
+ 'Comment' => comment,
121
+ 'Incident' => incident,
122
+ })
123
+
124
+ payload = @version.update('POST', @uri, data: data)
125
+
126
+ AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
127
+ end
128
+
129
+ ##
130
+ # Fetch the AnnotationInstance
131
+ # @return [AnnotationInstance] Fetched AnnotationInstance
132
+ def fetch
133
+ payload = @version.fetch('GET', @uri)
134
+
135
+ AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
136
+ end
137
+
138
+ ##
139
+ # Provide a user friendly representation
140
+ def to_s
141
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
142
+ "#<Twilio.Insights.V1.AnnotationContext #{context}>"
143
+ end
144
+
145
+ ##
146
+ # Provide a detailed, user friendly representation
147
+ def inspect
148
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
149
+ "#<Twilio.Insights.V1.AnnotationContext #{context}>"
150
+ end
151
+ end
152
+
153
+ ##
154
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
155
+ class AnnotationInstance < InstanceResource
156
+ ##
157
+ # Initialize the AnnotationInstance
158
+ # @param [Version] version Version that contains the resource
159
+ # @param [Hash] payload payload that contains response from Twilio
160
+ # @param [String] call_sid The unique SID identifier of the Call.
161
+ # @return [AnnotationInstance] AnnotationInstance
162
+ def initialize(version, payload, call_sid: nil)
163
+ super(version)
164
+
165
+ # Marshaled Properties
166
+ @properties = {
167
+ 'call_sid' => payload['call_sid'],
168
+ 'account_sid' => payload['account_sid'],
169
+ 'answered_by' => payload['answered_by'],
170
+ 'connectivity_issue' => payload['connectivity_issue'],
171
+ 'quality_issues' => payload['quality_issues'],
172
+ 'spam' => payload['spam'],
173
+ 'call_score' => payload['call_score'] == nil ? payload['call_score'] : payload['call_score'].to_i,
174
+ 'comment' => payload['comment'],
175
+ 'incident' => payload['incident'],
176
+ 'url' => payload['url'],
177
+ }
178
+
179
+ # Context
180
+ @instance_context = nil
181
+ @params = {'call_sid' => call_sid, }
182
+ end
183
+
184
+ ##
185
+ # Generate an instance context for the instance, the context is capable of
186
+ # performing various actions. All instance actions are proxied to the context
187
+ # @return [AnnotationContext] AnnotationContext for this AnnotationInstance
188
+ def context
189
+ unless @instance_context
190
+ @instance_context = AnnotationContext.new(@version, @params['call_sid'], )
191
+ end
192
+ @instance_context
193
+ end
194
+
195
+ ##
196
+ # @return [String] Call SID.
197
+ def call_sid
198
+ @properties['call_sid']
199
+ end
200
+
201
+ ##
202
+ # @return [String] Account SID.
203
+ def account_sid
204
+ @properties['account_sid']
205
+ end
206
+
207
+ ##
208
+ # @return [annotation.AnsweredBy] Indicates the answering entity as determined by Answering Machine Detection.
209
+ def answered_by
210
+ @properties['answered_by']
211
+ end
212
+
213
+ ##
214
+ # @return [annotation.ConnectivityIssue] Indicates if the call had any connectivity issue
215
+ def connectivity_issue
216
+ @properties['connectivity_issue']
217
+ end
218
+
219
+ ##
220
+ # @return [Array[String]] Indicates if the call had audio quality issues.
221
+ def quality_issues
222
+ @properties['quality_issues']
223
+ end
224
+
225
+ ##
226
+ # @return [Boolean] Call spam indicator
227
+ def spam
228
+ @properties['spam']
229
+ end
230
+
231
+ ##
232
+ # @return [String] Call Score
233
+ def call_score
234
+ @properties['call_score']
235
+ end
236
+
237
+ ##
238
+ # @return [String] User comments
239
+ def comment
240
+ @properties['comment']
241
+ end
242
+
243
+ ##
244
+ # @return [String] Call tag for incidents or support ticket
245
+ def incident
246
+ @properties['incident']
247
+ end
248
+
249
+ ##
250
+ # @return [String] The URL of this resource.
251
+ def url
252
+ @properties['url']
253
+ end
254
+
255
+ ##
256
+ # Update the AnnotationInstance
257
+ # @param [annotation.AnsweredBy] answered_by Which entity answered the call as
258
+ # determined by Answering Machine Detection. Use this to provide feedback on
259
+ # Answering Machine Detection accuracy. Possible enumerated values, one of: human,
260
+ # machine. human indicates the call was answered by a person. machine indicates
261
+ # the call was answered by an answering machine.
262
+ # @param [annotation.ConnectivityIssue] connectivity_issue Specify if the call had
263
+ # any connectivity issues. Possible enumerated values, one :
264
+ # no_connectivity_issue, invalid_number, caller_id, dropped_call,
265
+ # number_reachability.
266
+ # @param [String] quality_issues Specify if the call had any subjective quality
267
+ # issues. Possible values, one or more of: no_quality_issue, low_volume,
268
+ # choppy_robotic, echo, dtmf, latency, owa, static_noise. Use comma separated
269
+ # values to indicate multiple quality issues for the same call
270
+ # @param [Boolean] spam Specify if the call was a spam call. Use this to provide
271
+ # feedback on whether calls placed from your account were marked as spam, or if
272
+ # inbound calls received by your account were unwanted spam. Is of type Boolean:
273
+ # true, false. Use true if the call was a spam call.
274
+ # @param [String] call_score Specify the call score. This is of type integer. Use
275
+ # a range of 1-5 to indicate the call experience score, with the following mapping
276
+ # as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor,
277
+ # 1: Bad].
278
+ # @param [String] comment Specify any comments pertaining to the call. This of
279
+ # type string with a max limit of 100 characters. Twilio does not treat this field
280
+ # as PII, so don’t put any PII in here.
281
+ # @param [String] incident Associate this call with an incident or support ticket.
282
+ # This is of type string with a max limit of 100 characters. Twilio does not treat
283
+ # this field as PII, so don’t put any PII in here.
284
+ # @return [AnnotationInstance] Updated AnnotationInstance
285
+ def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
286
+ context.update(
287
+ answered_by: answered_by,
288
+ connectivity_issue: connectivity_issue,
289
+ quality_issues: quality_issues,
290
+ spam: spam,
291
+ call_score: call_score,
292
+ comment: comment,
293
+ incident: incident,
294
+ )
295
+ end
296
+
297
+ ##
298
+ # Fetch the AnnotationInstance
299
+ # @return [AnnotationInstance] Fetched AnnotationInstance
300
+ def fetch
301
+ context.fetch
302
+ end
303
+
304
+ ##
305
+ # Provide a user friendly representation
306
+ def to_s
307
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
308
+ "<Twilio.Insights.V1.AnnotationInstance #{values}>"
309
+ end
310
+
311
+ ##
312
+ # Provide a detailed, user friendly representation
313
+ def inspect
314
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
315
+ "<Twilio.Insights.V1.AnnotationInstance #{values}>"
316
+ end
317
+ end
318
+ end
319
+ end
320
+ end
321
+ end
322
+ end
@@ -117,6 +117,7 @@ module Twilio
117
117
  'call_sid' => payload['call_sid'],
118
118
  'call_type' => payload['call_type'],
119
119
  'call_state' => payload['call_state'],
120
+ 'answered_by' => payload['answered_by'],
120
121
  'processing_state' => payload['processing_state'],
121
122
  'created_time' => Twilio.deserialize_iso8601_datetime(payload['created_time']),
122
123
  'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
@@ -134,6 +135,7 @@ module Twilio
134
135
  'attributes' => payload['attributes'],
135
136
  'properties' => payload['properties'],
136
137
  'trust' => payload['trust'],
138
+ 'annotation' => payload['annotation'],
137
139
  }
138
140
 
139
141
  # Context
@@ -176,6 +178,12 @@ module Twilio
176
178
  @properties['call_state']
177
179
  end
178
180
 
181
+ ##
182
+ # @return [call_summary.AnsweredBy] The answered_by
183
+ def answered_by
184
+ @properties['answered_by']
185
+ end
186
+
179
187
  ##
180
188
  # @return [call_summary.ProcessingState] The processing_state
181
189
  def processing_state
@@ -278,6 +286,12 @@ module Twilio
278
286
  @properties['trust']
279
287
  end
280
288
 
289
+ ##
290
+ # @return [Hash] The annotation
291
+ def annotation
292
+ @properties['annotation']
293
+ end
294
+
281
295
  ##
282
296
  # Fetch the CallSummaryInstance
283
297
  # @param [call_summary.ProcessingState] processing_state The processing_state