twilio-ruby 6.12.1 → 7.0.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +9 -9
  3. data/CHANGES.md +10 -57
  4. data/README.md +2 -2
  5. data/UPGRADE.md +10 -0
  6. data/lib/twilio-ruby/framework/request.rb +8 -1
  7. data/lib/twilio-ruby/http/http_client.rb +10 -3
  8. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +267 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +332 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -2
  11. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +37 -28
  12. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +3 -27
  13. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +0 -2
  14. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +0 -2
  15. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -17
  16. data/lib/twilio-ruby/rest/client.rb +5 -0
  17. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +184 -0
  18. data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -2
  19. data/lib/twilio-ruby/rest/content/v1/content.rb +363 -3
  20. data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +1 -1
  21. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +1 -1
  22. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +0 -2
  23. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +21 -0
  24. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai.rb +274 -0
  25. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai_report_insights.rb +253 -0
  26. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +0 -2
  27. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +0 -2
  28. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +0 -2
  29. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -2
  30. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -2
  31. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +1 -11
  32. data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -2
  33. data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -112
  34. data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -2
  35. data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -2
  36. data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +0 -2
  37. data/lib/twilio-ruby/rest/insights/v1/room.rb +0 -2
  38. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +0 -2
  39. data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -2
  40. data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +0 -2
  41. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +0 -2
  42. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +1 -1
  43. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +6 -8
  44. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -2
  45. data/lib/twilio-ruby/rest/media.rb +32 -3
  46. data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +0 -2
  47. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -11
  48. data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -2
  49. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -2
  50. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -2
  51. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -2
  52. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -2
  53. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -2
  54. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +0 -2
  55. data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +0 -2
  56. data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -2
  57. data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +0 -2
  58. data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -2
  59. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +4 -13
  60. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -2
  61. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -2
  62. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +0 -2
  63. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -2
  64. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -2
  65. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -2
  66. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -2
  67. data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -2
  68. data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +0 -2
  69. data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -2
  70. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +13 -2
  71. data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +125 -0
  72. data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -2
  73. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +132 -0
  74. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -2
  75. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -2
  76. data/lib/twilio-ruby/rest/numbers/v1.rb +15 -3
  77. data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +0 -2
  78. data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +13 -2
  79. data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +0 -2
  80. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +3 -15
  81. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -2
  82. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -2
  83. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -2
  84. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -2
  85. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -2
  86. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +0 -2
  87. data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +0 -2
  88. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -2
  89. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -2
  90. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -2
  91. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -2
  92. data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -2
  93. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -2
  94. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -2
  95. data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -2
  96. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -2
  97. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -2
  98. data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -2
  99. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -2
  100. data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -2
  101. data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -2
  102. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -2
  103. data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -2
  104. data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -2
  105. data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +164 -0
  106. data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +235 -0
  107. data/lib/twilio-ruby/rest/preview_messaging/v1.rb +46 -0
  108. data/lib/twilio-ruby/rest/preview_messaging.rb +12 -0
  109. data/lib/twilio-ruby/rest/preview_messaging_base.rb +38 -0
  110. data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +0 -2
  111. data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +0 -2
  112. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +0 -2
  113. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +0 -2
  114. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +0 -2
  115. data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -2
  116. data/lib/twilio-ruby/rest/proxy/v1/service.rb +0 -2
  117. data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +0 -2
  118. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +0 -2
  119. data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -2
  120. data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +0 -2
  121. data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +0 -2
  122. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +0 -2
  123. data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +0 -2
  124. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +0 -2
  125. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -2
  126. data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +0 -2
  127. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +0 -2
  128. data/lib/twilio-ruby/rest/serverless/v1/service.rb +0 -2
  129. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +0 -2
  130. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +0 -2
  131. data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +0 -2
  132. data/lib/twilio-ruby/rest/supersim/v1/network.rb +0 -2
  133. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +0 -2
  134. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +0 -2
  135. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +0 -2
  136. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +0 -2
  137. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +161 -0
  138. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +8 -8
  139. data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +2 -26
  140. data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -2
  141. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -2
  142. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -2
  143. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +0 -2
  144. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -2
  145. data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
  146. data/lib/twilio-ruby/version.rb +1 -1
  147. metadata +17 -12
  148. data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +0 -384
  149. data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +0 -446
  150. data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +0 -247
  151. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +0 -393
  152. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +0 -386
  153. data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +0 -233
  154. data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +0 -332
  155. data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +0 -256
@@ -0,0 +1,274 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Flex
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class FlexApi < FlexApiBase
19
+ class V1 < Version
20
+ class InsightsConversationalAiList < ListResource
21
+
22
+ ##
23
+ # Initialize the InsightsConversationalAiList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [InsightsConversationalAiList] InsightsConversationalAiList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+
31
+
32
+ end
33
+
34
+
35
+
36
+ # Provide a user friendly representation
37
+ def to_s
38
+ '#<Twilio.FlexApi.V1.InsightsConversationalAiList>'
39
+ end
40
+ end
41
+
42
+
43
+ class InsightsConversationalAiContext < InstanceContext
44
+ ##
45
+ # Initialize the InsightsConversationalAiContext
46
+ # @param [Version] version Version that contains the resource
47
+ # @param [String] instance_sid Sid of Flex Service Instance
48
+ # @return [InsightsConversationalAiContext] InsightsConversationalAiContext
49
+ def initialize(version, instance_sid)
50
+ super(version)
51
+
52
+ # Path Solution
53
+ @solution = { instance_sid: instance_sid, }
54
+ @uri = "/Insights/Instances/#{@solution[:instance_sid]}/AI/Reports"
55
+
56
+
57
+ end
58
+ ##
59
+ # Fetch the InsightsConversationalAiInstance
60
+ # @param [String] max_rows Maximum number of rows to return
61
+ # @param [String] report_id The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
62
+ # @param [Granularity] granularity The time period for which report is needed
63
+ # @param [Time] include_date A reference date that should be included in the returned period
64
+ # @return [InsightsConversationalAiInstance] Fetched InsightsConversationalAiInstance
65
+ def fetch(
66
+ max_rows: :unset,
67
+ report_id: :unset,
68
+ granularity: :unset,
69
+ include_date: :unset
70
+ )
71
+
72
+ params = Twilio::Values.of({
73
+ 'MaxRows' => max_rows,
74
+ 'ReportId' => report_id,
75
+ 'Granularity' => granularity,
76
+ 'IncludeDate' => Twilio.serialize_iso8601_datetime(include_date),
77
+ })
78
+
79
+ payload = @version.fetch('GET', @uri, params: params)
80
+ InsightsConversationalAiInstance.new(
81
+ @version,
82
+ payload,
83
+ instance_sid: @solution[:instance_sid],
84
+ )
85
+ end
86
+
87
+
88
+ ##
89
+ # Provide a user friendly representation
90
+ def to_s
91
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
92
+ "#<Twilio.FlexApi.V1.InsightsConversationalAiContext #{context}>"
93
+ end
94
+
95
+ ##
96
+ # Provide a detailed, user friendly representation
97
+ def inspect
98
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
99
+ "#<Twilio.FlexApi.V1.InsightsConversationalAiContext #{context}>"
100
+ end
101
+ end
102
+
103
+ class InsightsConversationalAiPage < Page
104
+ ##
105
+ # Initialize the InsightsConversationalAiPage
106
+ # @param [Version] version Version that contains the resource
107
+ # @param [Response] response Response from the API
108
+ # @param [Hash] solution Path solution for the resource
109
+ # @return [InsightsConversationalAiPage] InsightsConversationalAiPage
110
+ def initialize(version, response, solution)
111
+ super(version, response)
112
+
113
+ # Path Solution
114
+ @solution = solution
115
+ end
116
+
117
+ ##
118
+ # Build an instance of InsightsConversationalAiInstance
119
+ # @param [Hash] payload Payload response from the API
120
+ # @return [InsightsConversationalAiInstance] InsightsConversationalAiInstance
121
+ def get_instance(payload)
122
+ InsightsConversationalAiInstance.new(@version, payload)
123
+ end
124
+
125
+ ##
126
+ # Provide a user friendly representation
127
+ def to_s
128
+ '<Twilio.FlexApi.V1.InsightsConversationalAiPage>'
129
+ end
130
+ end
131
+ class InsightsConversationalAiInstance < InstanceResource
132
+ ##
133
+ # Initialize the InsightsConversationalAiInstance
134
+ # @param [Version] version Version that contains the resource
135
+ # @param [Hash] payload payload that contains response from Twilio
136
+ # @param [String] account_sid The SID of the
137
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this InsightsConversationalAi
138
+ # resource.
139
+ # @param [String] sid The SID of the Call resource to fetch.
140
+ # @return [InsightsConversationalAiInstance] InsightsConversationalAiInstance
141
+ def initialize(version, payload , instance_sid: nil)
142
+ super(version)
143
+
144
+ # Marshaled Properties
145
+ @properties = {
146
+ 'instance_sid' => payload['instance_sid'],
147
+ 'report_id' => payload['report_id'],
148
+ 'granularity' => payload['granularity'],
149
+ 'period_start' => Twilio.deserialize_iso8601_datetime(payload['period_start']),
150
+ 'period_end' => Twilio.deserialize_iso8601_datetime(payload['period_end']),
151
+ 'updated' => Twilio.deserialize_iso8601_datetime(payload['updated']),
152
+ 'total_pages' => payload['total_pages'] == nil ? payload['total_pages'] : payload['total_pages'].to_i,
153
+ 'page' => payload['page'] == nil ? payload['page'] : payload['page'].to_i,
154
+ 'rows' => payload['rows'],
155
+ 'url' => payload['url'],
156
+ }
157
+
158
+ # Context
159
+ @instance_context = nil
160
+ @params = { 'instance_sid' => instance_sid || @properties['instance_sid'] , }
161
+ end
162
+
163
+ ##
164
+ # Generate an instance context for the instance, the context is capable of
165
+ # performing various actions. All instance actions are proxied to the context
166
+ # @return [InsightsConversationalAiContext] CallContext for this CallInstance
167
+ def context
168
+ unless @instance_context
169
+ @instance_context = InsightsConversationalAiContext.new(@version , @params['instance_sid'])
170
+ end
171
+ @instance_context
172
+ end
173
+
174
+ ##
175
+ # @return [String] Sid of Flex Service Instance
176
+ def instance_sid
177
+ @properties['instance_sid']
178
+ end
179
+
180
+ ##
181
+ # @return [String] The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
182
+ def report_id
183
+ @properties['report_id']
184
+ end
185
+
186
+ ##
187
+ # @return [Granularity]
188
+ def granularity
189
+ @properties['granularity']
190
+ end
191
+
192
+ ##
193
+ # @return [Time] The start date from which report data is included
194
+ def period_start
195
+ @properties['period_start']
196
+ end
197
+
198
+ ##
199
+ # @return [Time] The end date till report data is included
200
+ def period_end
201
+ @properties['period_end']
202
+ end
203
+
204
+ ##
205
+ # @return [Time] Updated time of the report
206
+ def updated
207
+ @properties['updated']
208
+ end
209
+
210
+ ##
211
+ # @return [String] Represents total number of pages fetched report has
212
+ def total_pages
213
+ @properties['total_pages']
214
+ end
215
+
216
+ ##
217
+ # @return [String] Page offset required for pagination
218
+ def page
219
+ @properties['page']
220
+ end
221
+
222
+ ##
223
+ # @return [Array<Hash>] List of report breakdown
224
+ def rows
225
+ @properties['rows']
226
+ end
227
+
228
+ ##
229
+ # @return [String] The URL of this resource.
230
+ def url
231
+ @properties['url']
232
+ end
233
+
234
+ ##
235
+ # Fetch the InsightsConversationalAiInstance
236
+ # @param [String] max_rows Maximum number of rows to return
237
+ # @param [String] report_id The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
238
+ # @param [Granularity] granularity The time period for which report is needed
239
+ # @param [Time] include_date A reference date that should be included in the returned period
240
+ # @return [InsightsConversationalAiInstance] Fetched InsightsConversationalAiInstance
241
+ def fetch(
242
+ max_rows: :unset,
243
+ report_id: :unset,
244
+ granularity: :unset,
245
+ include_date: :unset
246
+ )
247
+
248
+ context.fetch(
249
+ max_rows: max_rows,
250
+ report_id: report_id,
251
+ granularity: granularity,
252
+ include_date: include_date,
253
+ )
254
+ end
255
+
256
+ ##
257
+ # Provide a user friendly representation
258
+ def to_s
259
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
260
+ "<Twilio.FlexApi.V1.InsightsConversationalAiInstance #{values}>"
261
+ end
262
+
263
+ ##
264
+ # Provide a detailed, user friendly representation
265
+ def inspect
266
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
267
+ "<Twilio.FlexApi.V1.InsightsConversationalAiInstance #{values}>"
268
+ end
269
+ end
270
+
271
+ end
272
+ end
273
+ end
274
+ end
@@ -0,0 +1,253 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Flex
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class FlexApi < FlexApiBase
19
+ class V1 < Version
20
+ class InsightsConversationalAiReportInsightsList < ListResource
21
+
22
+ ##
23
+ # Initialize the InsightsConversationalAiReportInsightsList
24
+ # @param [Version] version Version that contains the resource
25
+ # @return [InsightsConversationalAiReportInsightsList] InsightsConversationalAiReportInsightsList
26
+ def initialize(version)
27
+ super(version)
28
+ # Path Solution
29
+ @solution = { }
30
+
31
+
32
+ end
33
+
34
+
35
+
36
+ # Provide a user friendly representation
37
+ def to_s
38
+ '#<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsList>'
39
+ end
40
+ end
41
+
42
+
43
+ class InsightsConversationalAiReportInsightsContext < InstanceContext
44
+ ##
45
+ # Initialize the InsightsConversationalAiReportInsightsContext
46
+ # @param [Version] version Version that contains the resource
47
+ # @param [String] instance_sid The Instance SID of the instance for which report insights will be fetched
48
+ # @return [InsightsConversationalAiReportInsightsContext] InsightsConversationalAiReportInsightsContext
49
+ def initialize(version, instance_sid)
50
+ super(version)
51
+
52
+ # Path Solution
53
+ @solution = { instance_sid: instance_sid, }
54
+ @uri = "/Insights/Instances/#{@solution[:instance_sid]}/AI/ReportInsights"
55
+
56
+
57
+ end
58
+ ##
59
+ # Fetch the InsightsConversationalAiReportInsightsInstance
60
+ # @param [String] max_rows Maximum number of rows to return
61
+ # @param [String] report_id The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
62
+ # @param [String] granularity The time period for which report insights is needed
63
+ # @param [Time] include_date A reference date that should be included in the returned period
64
+ # @return [InsightsConversationalAiReportInsightsInstance] Fetched InsightsConversationalAiReportInsightsInstance
65
+ def fetch(
66
+ max_rows: :unset,
67
+ report_id: :unset,
68
+ granularity: :unset,
69
+ include_date: :unset
70
+ )
71
+
72
+ params = Twilio::Values.of({
73
+ 'MaxRows' => max_rows,
74
+ 'ReportId' => report_id,
75
+ 'Granularity' => granularity,
76
+ 'IncludeDate' => Twilio.serialize_iso8601_datetime(include_date),
77
+ })
78
+
79
+ payload = @version.fetch('GET', @uri, params: params)
80
+ InsightsConversationalAiReportInsightsInstance.new(
81
+ @version,
82
+ payload,
83
+ instance_sid: @solution[:instance_sid],
84
+ )
85
+ end
86
+
87
+
88
+ ##
89
+ # Provide a user friendly representation
90
+ def to_s
91
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
92
+ "#<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsContext #{context}>"
93
+ end
94
+
95
+ ##
96
+ # Provide a detailed, user friendly representation
97
+ def inspect
98
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
99
+ "#<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsContext #{context}>"
100
+ end
101
+ end
102
+
103
+ class InsightsConversationalAiReportInsightsPage < Page
104
+ ##
105
+ # Initialize the InsightsConversationalAiReportInsightsPage
106
+ # @param [Version] version Version that contains the resource
107
+ # @param [Response] response Response from the API
108
+ # @param [Hash] solution Path solution for the resource
109
+ # @return [InsightsConversationalAiReportInsightsPage] InsightsConversationalAiReportInsightsPage
110
+ def initialize(version, response, solution)
111
+ super(version, response)
112
+
113
+ # Path Solution
114
+ @solution = solution
115
+ end
116
+
117
+ ##
118
+ # Build an instance of InsightsConversationalAiReportInsightsInstance
119
+ # @param [Hash] payload Payload response from the API
120
+ # @return [InsightsConversationalAiReportInsightsInstance] InsightsConversationalAiReportInsightsInstance
121
+ def get_instance(payload)
122
+ InsightsConversationalAiReportInsightsInstance.new(@version, payload)
123
+ end
124
+
125
+ ##
126
+ # Provide a user friendly representation
127
+ def to_s
128
+ '<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsPage>'
129
+ end
130
+ end
131
+ class InsightsConversationalAiReportInsightsInstance < InstanceResource
132
+ ##
133
+ # Initialize the InsightsConversationalAiReportInsightsInstance
134
+ # @param [Version] version Version that contains the resource
135
+ # @param [Hash] payload payload that contains response from Twilio
136
+ # @param [String] account_sid The SID of the
137
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this InsightsConversationalAiReportInsights
138
+ # resource.
139
+ # @param [String] sid The SID of the Call resource to fetch.
140
+ # @return [InsightsConversationalAiReportInsightsInstance] InsightsConversationalAiReportInsightsInstance
141
+ def initialize(version, payload , instance_sid: nil)
142
+ super(version)
143
+
144
+ # Marshaled Properties
145
+ @properties = {
146
+ 'instance_sid' => payload['instance_sid'],
147
+ 'report_id' => payload['report_id'],
148
+ 'period_start' => Twilio.deserialize_iso8601_datetime(payload['period_start']),
149
+ 'period_end' => Twilio.deserialize_iso8601_datetime(payload['period_end']),
150
+ 'updated' => Twilio.deserialize_iso8601_datetime(payload['updated']),
151
+ 'insights' => payload['insights'],
152
+ 'url' => payload['url'],
153
+ }
154
+
155
+ # Context
156
+ @instance_context = nil
157
+ @params = { 'instance_sid' => instance_sid || @properties['instance_sid'] , }
158
+ end
159
+
160
+ ##
161
+ # Generate an instance context for the instance, the context is capable of
162
+ # performing various actions. All instance actions are proxied to the context
163
+ # @return [InsightsConversationalAiReportInsightsContext] CallContext for this CallInstance
164
+ def context
165
+ unless @instance_context
166
+ @instance_context = InsightsConversationalAiReportInsightsContext.new(@version , @params['instance_sid'])
167
+ end
168
+ @instance_context
169
+ end
170
+
171
+ ##
172
+ # @return [String] The Instance SID of the instance for which report insights is fetched
173
+ def instance_sid
174
+ @properties['instance_sid']
175
+ end
176
+
177
+ ##
178
+ # @return [String] The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
179
+ def report_id
180
+ @properties['report_id']
181
+ end
182
+
183
+ ##
184
+ # @return [Time] The start date from which report insights data is included
185
+ def period_start
186
+ @properties['period_start']
187
+ end
188
+
189
+ ##
190
+ # @return [Time] The end date till report insights data is included
191
+ def period_end
192
+ @properties['period_end']
193
+ end
194
+
195
+ ##
196
+ # @return [Time] Updated time of the report insights
197
+ def updated
198
+ @properties['updated']
199
+ end
200
+
201
+ ##
202
+ # @return [Array<Hash>] List of report insights breakdown
203
+ def insights
204
+ @properties['insights']
205
+ end
206
+
207
+ ##
208
+ # @return [String] The URL of this resource
209
+ def url
210
+ @properties['url']
211
+ end
212
+
213
+ ##
214
+ # Fetch the InsightsConversationalAiReportInsightsInstance
215
+ # @param [String] max_rows Maximum number of rows to return
216
+ # @param [String] report_id The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
217
+ # @param [String] granularity The time period for which report insights is needed
218
+ # @param [Time] include_date A reference date that should be included in the returned period
219
+ # @return [InsightsConversationalAiReportInsightsInstance] Fetched InsightsConversationalAiReportInsightsInstance
220
+ def fetch(
221
+ max_rows: :unset,
222
+ report_id: :unset,
223
+ granularity: :unset,
224
+ include_date: :unset
225
+ )
226
+
227
+ context.fetch(
228
+ max_rows: max_rows,
229
+ report_id: report_id,
230
+ granularity: granularity,
231
+ include_date: include_date,
232
+ )
233
+ end
234
+
235
+ ##
236
+ # Provide a user friendly representation
237
+ def to_s
238
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
239
+ "<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsInstance #{values}>"
240
+ end
241
+
242
+ ##
243
+ # Provide a detailed, user friendly representation
244
+ def inspect
245
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
246
+ "<Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsInstance #{values}>"
247
+ end
248
+ end
249
+
250
+ end
251
+ end
252
+ end
253
+ end
@@ -168,8 +168,6 @@ module Twilio
168
168
  end
169
169
 
170
170
 
171
- ##
172
- #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.
173
171
  class InsightsQuestionnairesContext < InstanceContext
174
172
  ##
175
173
  # Initialize the InsightsQuestionnairesContext
@@ -153,8 +153,6 @@ module Twilio
153
153
  end
154
154
 
155
155
 
156
- ##
157
- #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.
158
156
  class InsightsQuestionnairesCategoryContext < InstanceContext
159
157
  ##
160
158
  # Initialize the InsightsQuestionnairesCategoryContext
@@ -172,8 +172,6 @@ module Twilio
172
172
  end
173
173
 
174
174
 
175
- ##
176
- #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.
177
175
  class InsightsQuestionnairesQuestionContext < InstanceContext
178
176
  ##
179
177
  # Initialize the InsightsQuestionnairesQuestionContext
@@ -40,8 +40,6 @@ module Twilio
40
40
  end
41
41
 
42
42
 
43
- ##
44
- #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.
45
43
  class InsightsSessionContext < InstanceContext
46
44
  ##
47
45
  # Initialize the InsightsSessionContext
@@ -40,8 +40,6 @@ module Twilio
40
40
  end
41
41
 
42
42
 
43
- ##
44
- #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.
45
43
  class InsightsUserRolesContext < InstanceContext
46
44
  ##
47
45
  # Initialize the InsightsUserRolesContext
@@ -37,18 +37,15 @@ module Twilio
37
37
  # Create the InteractionChannelParticipantInstance
38
38
  # @param [Type] type
39
39
  # @param [Object] media_properties JSON representing the Media Properties for the new Participant.
40
- # @param [Object] routing_properties Object representing the Routing Properties for the new Participant.
41
40
  # @return [InteractionChannelParticipantInstance] Created InteractionChannelParticipantInstance
42
41
  def create(
43
42
  type: nil,
44
- media_properties: nil,
45
- routing_properties: :unset
43
+ media_properties: nil
46
44
  )
47
45
 
48
46
  data = Twilio::Values.of({
49
47
  'Type' => type,
50
48
  'MediaProperties' => Twilio.serialize_object(media_properties),
51
- 'RoutingProperties' => Twilio.serialize_object(routing_properties),
52
49
  })
53
50
 
54
51
 
@@ -259,7 +256,6 @@ module Twilio
259
256
  'interaction_sid' => payload['interaction_sid'],
260
257
  'channel_sid' => payload['channel_sid'],
261
258
  'url' => payload['url'],
262
- 'routing_properties' => payload['routing_properties'],
263
259
  }
264
260
 
265
261
  # Context
@@ -308,12 +304,6 @@ module Twilio
308
304
  @properties['url']
309
305
  end
310
306
 
311
- ##
312
- # @return [Hash] The Participant's routing properties.
313
- def routing_properties
314
- @properties['routing_properties']
315
- end
316
-
317
307
  ##
318
308
  # Update the InteractionChannelParticipantInstance
319
309
  # @param [Status] status
@@ -40,8 +40,6 @@ module Twilio
40
40
  end
41
41
 
42
42
 
43
- ##
44
- #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
45
43
  class ProvisioningStatusContext < InstanceContext
46
44
  ##
47
45
  # Initialize the ProvisioningStatusContext