twilio-ruby 6.0.0.pre.rc.3 → 6.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +103 -47
  3. data/CONTRIBUTING.md +10 -8
  4. data/README.md +128 -46
  5. data/UPGRADE.md +7 -4
  6. data/advanced-examples/custom-http-client.md +170 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -6
  8. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +7 -42
  9. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -42
  10. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +2 -10
  11. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -6
  12. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -5
  13. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -11
  14. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -5
  15. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -6
  16. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +2 -10
  17. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -5
  18. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +3 -16
  19. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -5
  20. data/lib/twilio-ruby/rest/api/v2010/account.rb +24 -103
  21. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -5
  22. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +2 -10
  23. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +6 -24
  24. data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +2 -9
  25. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +3 -15
  26. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -6
  27. data/lib/twilio-ruby/rest/chat/v1/service.rb +3 -12
  28. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +4 -20
  29. data/lib/twilio-ruby/rest/chat/v2/service/user.rb +2 -10
  30. data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -16
  31. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +11 -1
  32. data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -5
  33. data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +3 -12
  34. data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -6
  35. data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +3 -15
  36. data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +1 -5
  37. data/lib/twilio-ruby/rest/conversations/v1/service.rb +5 -21
  38. data/lib/twilio-ruby/rest/conversations/v1/user.rb +1 -4
  39. data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -4
  40. data/lib/twilio-ruby/rest/events/v1/sink.rb +2 -10
  41. data/lib/twilio-ruby/rest/events/v1/subscription.rb +1 -4
  42. data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +38 -44
  43. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +17 -23
  44. data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +9 -9
  45. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +53 -53
  46. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +37 -37
  47. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +52 -52
  48. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +19 -92
  49. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +4 -4
  50. data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +4 -4
  51. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +2 -11
  52. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -4
  53. data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -39
  54. data/lib/twilio-ruby/rest/insights/v1/call.rb +2 -10
  55. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +31 -3
  56. data/lib/twilio-ruby/rest/insights/v1/conference.rb +1 -4
  57. data/lib/twilio-ruby/rest/insights/v1/room.rb +1 -4
  58. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -15
  59. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -6
  60. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -12
  61. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +4 -20
  62. data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +2 -10
  63. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -16
  64. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -9
  65. data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +28 -2
  66. data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +7 -0
  67. data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +196 -0
  68. data/lib/twilio-ruby/rest/messaging/v1/service.rb +31 -47
  69. data/lib/twilio-ruby/rest/messaging/v1.rb +15 -15
  70. data/lib/twilio-ruby/rest/messaging.rb +1 -1
  71. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +2 -8
  72. data/lib/twilio-ruby/rest/microvisor.rb +2 -1
  73. data/lib/twilio-ruby/rest/notify/v1/service.rb +2 -9
  74. data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +224 -0
  75. data/lib/twilio-ruby/rest/numbers/v1.rb +49 -0
  76. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -18
  77. data/lib/twilio-ruby/rest/oauth.rb +1 -1
  78. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +4 -16
  79. data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -5
  80. data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -4
  81. data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -4
  82. data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -5
  83. data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -10
  84. data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -10
  85. data/lib/twilio-ruby/rest/preview/sync/service.rb +3 -12
  86. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -5
  87. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +2 -10
  88. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +5 -20
  89. data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -6
  90. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +2 -10
  91. data/lib/twilio-ruby/rest/proxy/v1/service.rb +3 -12
  92. data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -5
  93. data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +3 -15
  94. data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -5
  95. data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -16
  96. data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -5
  97. data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -5
  98. data/lib/twilio-ruby/rest/studio/v1/flow.rb +2 -8
  99. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -5
  100. data/lib/twilio-ruby/rest/studio/v2/flow.rb +2 -8
  101. data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -4
  102. data/lib/twilio-ruby/rest/supersim/v1/sim.rb +2 -10
  103. data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -5
  104. data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -10
  105. data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -10
  106. data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -6
  107. data/lib/twilio-ruby/rest/sync/v1/service.rb +4 -16
  108. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -5
  109. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +2 -10
  110. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +7 -28
  111. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +4 -16
  112. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +3 -12
  113. data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +3 -12
  114. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +1 -7
  115. data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +3 -16
  116. data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -5
  117. data/lib/twilio-ruby/rest/verify/v2/service.rb +7 -29
  118. data/lib/twilio-ruby/rest/video/v1/room/participant.rb +3 -16
  119. data/lib/twilio-ruby/rest/video/v1/room.rb +3 -13
  120. data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -4
  121. data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -5
  122. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +2 -10
  123. data/lib/twilio-ruby/rest.rb +1 -1
  124. data/lib/twilio-ruby/version.rb +1 -1
  125. data/twilio-ruby.gemspec +1 -1
  126. metadata +12 -9
  127. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +0 -744
@@ -34,7 +34,8 @@ module Twilio
34
34
  # Lists InsightsSegmentsInstance records from the API as a list.
35
35
  # Unlike stream(), this operation is eager and will load `limit` records into
36
36
  # memory before returning.
37
- # @param [String] token The Token HTTP request header
37
+ # @param [String] authorization The Authorization HTTP request header
38
+ # @param [String] segment_id To unique id of the segment
38
39
  # @param [Array[String]] reservation_id The list of reservation Ids
39
40
  # @param [Integer] limit Upper limit for the number of records to return. stream()
40
41
  # guarantees to never return more than limit. Default is no limit
@@ -43,9 +44,10 @@ module Twilio
43
44
  # but a limit is defined, stream() will attempt to read the limit with the most
44
45
  # efficient page size, i.e. min(limit, 1000)
45
46
  # @return [Array] Array of up to limit results
46
- def list(token: :unset, reservation_id: :unset, limit: nil, page_size: nil)
47
+ def list(authorization: :unset, segment_id: :unset, reservation_id: :unset, limit: nil, page_size: nil)
47
48
  self.stream(
48
- token: token,
49
+ authorization: authorization,
50
+ segment_id: segment_id,
49
51
  reservation_id: reservation_id,
50
52
  limit: limit,
51
53
  page_size: page_size
@@ -56,7 +58,8 @@ module Twilio
56
58
  # Streams Instance records from the API as an Enumerable.
57
59
  # This operation lazily loads records as efficiently as possible until the limit
58
60
  # is reached.
59
- # @param [String] token The Token HTTP request header
61
+ # @param [String] authorization The Authorization HTTP request header
62
+ # @param [String] segment_id To unique id of the segment
60
63
  # @param [Array[String]] reservation_id The list of reservation Ids
61
64
  # @param [Integer] limit Upper limit for the number of records to return. stream()
62
65
  # guarantees to never return more than limit. Default is no limit
@@ -65,11 +68,12 @@ module Twilio
65
68
  # but a limit is defined, stream() will attempt to read the limit with the most
66
69
  # efficient page size, i.e. min(limit, 1000)
67
70
  # @return [Enumerable] Enumerable that will yield up to limit results
68
- def stream(token: :unset, reservation_id: :unset, limit: nil, page_size: nil)
71
+ def stream(authorization: :unset, segment_id: :unset, reservation_id: :unset, limit: nil, page_size: nil)
69
72
  limits = @version.read_limits(limit, page_size)
70
73
 
71
74
  page = self.page(
72
- token: token,
75
+ authorization: authorization,
76
+ segment_id: segment_id,
73
77
  reservation_id: reservation_id,
74
78
  page_size: limits[:page_size], )
75
79
 
@@ -93,16 +97,19 @@ module Twilio
93
97
  ##
94
98
  # Retrieve a single page of InsightsSegmentsInstance records from the API.
95
99
  # Request is executed immediately.
96
- # @param [String] token The Token HTTP request header
100
+ # @param [String] authorization The Authorization HTTP request header
101
+ # @param [String] segment_id To unique id of the segment
97
102
  # @param [Array[String]] reservation_id The list of reservation Ids
98
103
  # @param [String] page_token PageToken provided by the API
99
104
  # @param [Integer] page_number Page Number, this value is simply for client state
100
105
  # @param [Integer] page_size Number of records to return, defaults to 50
101
106
  # @return [Page] Page of InsightsSegmentsInstance
102
- def page(token: :unset, reservation_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
107
+ def page(authorization: :unset, segment_id: :unset, reservation_id: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
103
108
  params = Twilio::Values.of({
104
109
 
105
- 'Token' => token,
110
+ 'Authorization' => authorization,
111
+
112
+ 'SegmentId' => segment_id,
106
113
 
107
114
  'ReservationId' => Twilio.serialize_list(reservation_id),
108
115
 
@@ -137,57 +144,6 @@ module Twilio
137
144
  end
138
145
  end
139
146
 
140
-
141
- ##
142
- #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.
143
- class InsightsSegmentsContext < InstanceContext
144
- ##
145
- # Initialize the InsightsSegmentsContext
146
- # @param [Version] version Version that contains the resource
147
- # @param [String] segment_id To unique id of the segment
148
- # @return [InsightsSegmentsContext] InsightsSegmentsContext
149
- def initialize(version, segment_id)
150
- super(version)
151
-
152
- # Path Solution
153
- @solution = { segment_id: segment_id, }
154
- @uri = "/Insights/Segments/#{@solution[:segment_id]}"
155
-
156
-
157
- end
158
- ##
159
- # Fetch the InsightsSegmentsInstance
160
- # @param [String] token The Token HTTP request header
161
- # @return [InsightsSegmentsInstance] Fetched InsightsSegmentsInstance
162
- def fetch(
163
- token: :unset
164
- )
165
-
166
- headers = Twilio::Values.of({ 'Token' => token, })
167
- payload = @version.fetch('GET', @uri, headers: headers)
168
- InsightsSegmentsInstance.new(
169
- @version,
170
- payload,
171
- segment_id: @solution[:segment_id],
172
- )
173
- end
174
-
175
-
176
- ##
177
- # Provide a user friendly representation
178
- def to_s
179
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
180
- "#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>"
181
- end
182
-
183
- ##
184
- # Provide a detailed, user friendly representation
185
- def inspect
186
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
187
- "#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>"
188
- end
189
- end
190
-
191
147
  class InsightsSegmentsPage < Page
192
148
  ##
193
149
  # Initialize the InsightsSegmentsPage
@@ -226,7 +182,7 @@ module Twilio
226
182
  # resource.
227
183
  # @param [String] sid The SID of the Call resource to fetch.
228
184
  # @return [InsightsSegmentsInstance] InsightsSegmentsInstance
229
- def initialize(version, payload , segment_id: nil)
185
+ def initialize(version, payload )
230
186
  super(version)
231
187
 
232
188
  # Marshaled Properties
@@ -254,22 +210,8 @@ module Twilio
254
210
  'assessment_percentage' => payload['assessment_percentage'],
255
211
  'url' => payload['url'],
256
212
  }
257
-
258
- # Context
259
- @instance_context = nil
260
- @params = { 'segment_id' => segment_id || @properties['segment_id'] , }
261
213
  end
262
214
 
263
- ##
264
- # Generate an instance context for the instance, the context is capable of
265
- # performing various actions. All instance actions are proxied to the context
266
- # @return [InsightsSegmentsContext] CallContext for this CallInstance
267
- def context
268
- unless @instance_context
269
- @instance_context = InsightsSegmentsContext.new(@version , @params['segment_id'])
270
- end
271
- @instance_context
272
- end
273
215
 
274
216
  ##
275
217
  # @return [String] To unique id of the segment
@@ -403,31 +345,16 @@ module Twilio
403
345
  @properties['url']
404
346
  end
405
347
 
406
- ##
407
- # Fetch the InsightsSegmentsInstance
408
- # @param [String] token The Token HTTP request header
409
- # @return [InsightsSegmentsInstance] Fetched InsightsSegmentsInstance
410
- def fetch(
411
- token: :unset
412
- )
413
-
414
- context.fetch(
415
- token: token,
416
- )
417
- end
418
-
419
348
  ##
420
349
  # Provide a user friendly representation
421
350
  def to_s
422
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
423
- "<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
351
+ "<Twilio.FlexApi.V1.InsightsSegmentsInstance>"
424
352
  end
425
353
 
426
354
  ##
427
355
  # Provide a detailed, user friendly representation
428
356
  def inspect
429
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
430
- "<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
357
+ "<Twilio.FlexApi.V1.InsightsSegmentsInstance>"
431
358
  end
432
359
  end
433
360
 
@@ -26,18 +26,18 @@ module Twilio
26
26
  super(version)
27
27
  # Path Solution
28
28
  @solution = { }
29
- @uri = "/Insights/QM/Settings/AnswerSets"
29
+ @uri = "/Insights/QualityManagement/Settings/AnswerSets"
30
30
 
31
31
  end
32
32
  ##
33
33
  # Fetch the InsightsSettingsAnswerSetsInstance
34
- # @param [String] token The Token HTTP request header
34
+ # @param [String] authorization The Authorization HTTP request header
35
35
  # @return [InsightsSettingsAnswerSetsInstance] Fetched InsightsSettingsAnswerSetsInstance
36
36
  def fetch(
37
- token: :unset
37
+ authorization: :unset
38
38
  )
39
39
 
40
- headers = Twilio::Values.of({ 'Token' => token, })
40
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
41
41
  payload = @version.fetch('GET', @uri, headers: headers)
42
42
  InsightsSettingsAnswerSetsInstance.new(
43
43
  @version,
@@ -26,18 +26,18 @@ module Twilio
26
26
  super(version)
27
27
  # Path Solution
28
28
  @solution = { }
29
- @uri = "/Insights/QM/Settings/CommentTags"
29
+ @uri = "/Insights/QualityManagement/Settings/CommentTags"
30
30
 
31
31
  end
32
32
  ##
33
33
  # Fetch the InsightsSettingsCommentInstance
34
- # @param [String] token The Token HTTP request header
34
+ # @param [String] authorization The Authorization HTTP request header
35
35
  # @return [InsightsSettingsCommentInstance] Fetched InsightsSettingsCommentInstance
36
36
  def fetch(
37
- token: :unset
37
+ authorization: :unset
38
38
  )
39
39
 
40
- headers = Twilio::Values.of({ 'Token' => token, })
40
+ headers = Twilio::Values.of({ 'Authorization' => authorization, })
41
41
  payload = @version.fetch('GET', @uri, headers: headers)
42
42
  InsightsSettingsCommentInstance.new(
43
43
  @version,
@@ -189,13 +189,8 @@ module Twilio
189
189
  def invites
190
190
  unless @invites
191
191
  @invites = InteractionChannelInviteList.new(
192
- @version,
193
- interaction_sid: @solution[:interaction_sid],
194
- interaction_channel_sid: @solution[:sid]
195
-
196
- )
192
+ @version, interaction_sid: @solution[:interaction_sid], channel_sid: @solution[:sid], )
197
193
  end
198
-
199
194
  @invites
200
195
  end
201
196
  ##
@@ -212,11 +207,7 @@ module Twilio
212
207
 
213
208
  unless @participants
214
209
  @participants = InteractionChannelParticipantList.new(
215
- @version,
216
- interaction_sid: @solution[:interaction_sid],
217
- interaction_channel_sid: @solution[:sid]
218
-
219
- )
210
+ @version, interaction_sid: @solution[:interaction_sid], channel_sid: @solution[:sid], )
220
211
  end
221
212
 
222
213
  @participants
@@ -104,10 +104,7 @@ module Twilio
104
104
 
105
105
  unless @channels
106
106
  @channels = InteractionChannelList.new(
107
- @version,
108
- interaction_sid: @solution[:sid]
109
-
110
- )
107
+ @version, interaction_sid: @solution[:sid], )
111
108
  end
112
109
 
113
110
  @channels
@@ -40,17 +40,17 @@ module Twilio
40
40
  end
41
41
 
42
42
  ##
43
- # @param [String] assessment_id The id of the assessment to be modified
44
- # @return [Twilio::REST::FlexApi::V1::AssessmentsContext] if assessmentId was passed.
43
+ # @param [String] assessment_sid The SID of the assessment to be modified
44
+ # @return [Twilio::REST::FlexApi::V1::AssessmentsContext] if assessmentSid was passed.
45
45
  # @return [Twilio::REST::FlexApi::V1::AssessmentsList]
46
- def assessments(assessment_id=:unset)
47
- if assessment_id.nil?
48
- raise ArgumentError, 'assessment_id cannot be nil'
46
+ def assessments(assessment_sid=:unset)
47
+ if assessment_sid.nil?
48
+ raise ArgumentError, 'assessment_sid cannot be nil'
49
49
  end
50
- if assessment_id == :unset
50
+ if assessment_sid == :unset
51
51
  @assessments ||= AssessmentsList.new self
52
52
  else
53
- AssessmentsContext.new(self, assessment_id)
53
+ AssessmentsContext.new(self, assessment_sid)
54
54
  end
55
55
  end
56
56
  ##
@@ -97,60 +97,51 @@ module Twilio
97
97
  @insights_conversations ||= InsightsConversationsList.new self
98
98
  end
99
99
  ##
100
- # @param [String] id The unique ID of the questionnaire
101
- # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesContext] if id was passed.
100
+ # @param [String] questionnaire_sid The SID of the questionnaire
101
+ # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesContext] if questionnaireSid was passed.
102
102
  # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesList]
103
- def insights_questionnaires(id=:unset)
104
- if id.nil?
105
- raise ArgumentError, 'id cannot be nil'
103
+ def insights_questionnaires(questionnaire_sid=:unset)
104
+ if questionnaire_sid.nil?
105
+ raise ArgumentError, 'questionnaire_sid cannot be nil'
106
106
  end
107
- if id == :unset
107
+ if questionnaire_sid == :unset
108
108
  @insights_questionnaires ||= InsightsQuestionnairesList.new self
109
109
  else
110
- InsightsQuestionnairesContext.new(self, id)
110
+ InsightsQuestionnairesContext.new(self, questionnaire_sid)
111
111
  end
112
112
  end
113
113
  ##
114
- # @param [String] category_id The ID of the category to be update
115
- # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryContext] if categoryId was passed.
114
+ # @param [String] category_sid The SID of the category to be updated
115
+ # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryContext] if categorySid was passed.
116
116
  # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryList]
117
- def insights_questionnaires_category(category_id=:unset)
118
- if category_id.nil?
119
- raise ArgumentError, 'category_id cannot be nil'
117
+ def insights_questionnaires_category(category_sid=:unset)
118
+ if category_sid.nil?
119
+ raise ArgumentError, 'category_sid cannot be nil'
120
120
  end
121
- if category_id == :unset
121
+ if category_sid == :unset
122
122
  @insights_questionnaires_category ||= InsightsQuestionnairesCategoryList.new self
123
123
  else
124
- InsightsQuestionnairesCategoryContext.new(self, category_id)
124
+ InsightsQuestionnairesCategoryContext.new(self, category_sid)
125
125
  end
126
126
  end
127
127
  ##
128
- # @param [String] question_id The unique ID of the question
129
- # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionContext] if questionId was passed.
128
+ # @param [String] question_sid The SID of the question
129
+ # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionContext] if questionSid was passed.
130
130
  # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionList]
131
- def insights_questionnaires_question(question_id=:unset)
132
- if question_id.nil?
133
- raise ArgumentError, 'question_id cannot be nil'
131
+ def insights_questionnaires_question(question_sid=:unset)
132
+ if question_sid.nil?
133
+ raise ArgumentError, 'question_sid cannot be nil'
134
134
  end
135
- if question_id == :unset
135
+ if question_sid == :unset
136
136
  @insights_questionnaires_question ||= InsightsQuestionnairesQuestionList.new self
137
137
  else
138
- InsightsQuestionnairesQuestionContext.new(self, question_id)
138
+ InsightsQuestionnairesQuestionContext.new(self, question_sid)
139
139
  end
140
140
  end
141
141
  ##
142
- # @param [String] segment_id To unique id of the segment
143
- # @return [Twilio::REST::FlexApi::V1::InsightsSegmentsContext] if segmentId was passed.
144
142
  # @return [Twilio::REST::FlexApi::V1::InsightsSegmentsList]
145
- def insights_segments(segment_id=:unset)
146
- if segment_id.nil?
147
- raise ArgumentError, 'segment_id cannot be nil'
148
- end
149
- if segment_id == :unset
150
- @insights_segments ||= InsightsSegmentsList.new self
151
- else
152
- InsightsSegmentsContext.new(self, segment_id)
153
- end
143
+ def insights_segments
144
+ @insights_segments ||= InsightsSegmentsList.new self
154
145
  end
155
146
  ##
156
147
  # @return [Twilio::REST::FlexApi::V1::insightsSessionContext]
@@ -78,12 +78,8 @@ module Twilio
78
78
  def metrics
79
79
  unless @metrics
80
80
  @metrics = MetricList.new(
81
- @version,
82
- call_sid: @solution[:sid]
83
-
84
- )
81
+ @version, call_sid: @solution[:sid], )
85
82
  end
86
-
87
83
  @metrics
88
84
  end
89
85
  ##
@@ -93,12 +89,8 @@ module Twilio
93
89
  def events
94
90
  unless @events
95
91
  @events = EventList.new(
96
- @version,
97
- call_sid: @solution[:sid]
98
-
99
- )
92
+ @version, call_sid: @solution[:sid], )
100
93
  end
101
-
102
94
  @events
103
95
  end
104
96
  ##
@@ -53,6 +53,10 @@ module Twilio
53
53
  # @param [String] subaccount
54
54
  # @param [Boolean] abnormal_session
55
55
  # @param [AnsweredBy] answered_by
56
+ # @param [String] connectivity_issues
57
+ # @param [String] quality_issues
58
+ # @param [Boolean] spam
59
+ # @param [String] call_scores
56
60
  # @param [Integer] limit Upper limit for the number of records to return. stream()
57
61
  # guarantees to never return more than limit. Default is no limit
58
62
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -60,7 +64,7 @@ module Twilio
60
64
  # but a limit is defined, stream() will attempt to read the limit with the most
61
65
  # efficient page size, i.e. min(limit, 1000)
62
66
  # @return [Array] Array of up to limit results
63
- def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, limit: nil, page_size: nil)
67
+ def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issues: :unset, quality_issues: :unset, spam: :unset, call_scores: :unset, limit: nil, page_size: nil)
64
68
  self.stream(
65
69
  from: from,
66
70
  to: to,
@@ -81,6 +85,10 @@ module Twilio
81
85
  subaccount: subaccount,
82
86
  abnormal_session: abnormal_session,
83
87
  answered_by: answered_by,
88
+ connectivity_issues: connectivity_issues,
89
+ quality_issues: quality_issues,
90
+ spam: spam,
91
+ call_scores: call_scores,
84
92
  limit: limit,
85
93
  page_size: page_size
86
94
  ).entries
@@ -109,6 +117,10 @@ module Twilio
109
117
  # @param [String] subaccount
110
118
  # @param [Boolean] abnormal_session
111
119
  # @param [AnsweredBy] answered_by
120
+ # @param [String] connectivity_issues
121
+ # @param [String] quality_issues
122
+ # @param [Boolean] spam
123
+ # @param [String] call_scores
112
124
  # @param [Integer] limit Upper limit for the number of records to return. stream()
113
125
  # guarantees to never return more than limit. Default is no limit
114
126
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -116,7 +128,7 @@ module Twilio
116
128
  # but a limit is defined, stream() will attempt to read the limit with the most
117
129
  # efficient page size, i.e. min(limit, 1000)
118
130
  # @return [Enumerable] Enumerable that will yield up to limit results
119
- def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, limit: nil, page_size: nil)
131
+ def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issues: :unset, quality_issues: :unset, spam: :unset, call_scores: :unset, limit: nil, page_size: nil)
120
132
  limits = @version.read_limits(limit, page_size)
121
133
 
122
134
  page = self.page(
@@ -139,6 +151,10 @@ module Twilio
139
151
  subaccount: subaccount,
140
152
  abnormal_session: abnormal_session,
141
153
  answered_by: answered_by,
154
+ connectivity_issues: connectivity_issues,
155
+ quality_issues: quality_issues,
156
+ spam: spam,
157
+ call_scores: call_scores,
142
158
  page_size: limits[:page_size], )
143
159
 
144
160
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
@@ -180,11 +196,15 @@ module Twilio
180
196
  # @param [String] subaccount
181
197
  # @param [Boolean] abnormal_session
182
198
  # @param [AnsweredBy] answered_by
199
+ # @param [String] connectivity_issues
200
+ # @param [String] quality_issues
201
+ # @param [Boolean] spam
202
+ # @param [String] call_scores
183
203
  # @param [String] page_token PageToken provided by the API
184
204
  # @param [Integer] page_number Page Number, this value is simply for client state
185
205
  # @param [Integer] page_size Number of records to return, defaults to 50
186
206
  # @return [Page] Page of CallSummariesInstance
187
- def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
207
+ def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, connectivity_issues: :unset, quality_issues: :unset, spam: :unset, call_scores: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
188
208
  params = Twilio::Values.of({
189
209
 
190
210
  'From' => from,
@@ -225,6 +245,14 @@ module Twilio
225
245
 
226
246
  'AnsweredBy' => answered_by,
227
247
 
248
+ 'ConnectivityIssues' => connectivity_issues,
249
+
250
+ 'QualityIssues' => quality_issues,
251
+
252
+ 'Spam' => spam,
253
+
254
+ 'CallScores' => call_scores,
255
+
228
256
  'PageToken' => page_token,
229
257
  'Page' => page_number,
230
258
  'PageSize' => page_size,
@@ -237,10 +237,7 @@ module Twilio
237
237
 
238
238
  unless @conference_participants
239
239
  @conference_participants = ConferenceParticipantList.new(
240
- @version,
241
- conference_conference_sid: @solution[:conference_sid]
242
-
243
- )
240
+ @version, conference_sid: @solution[:conference_sid], )
244
241
  end
245
242
 
246
243
  @conference_participants
@@ -204,10 +204,7 @@ module Twilio
204
204
 
205
205
  unless @participants
206
206
  @participants = ParticipantList.new(
207
- @version,
208
- room_room_sid: @solution[:room_sid]
209
-
210
- )
207
+ @version, room_sid: @solution[:room_sid], )
211
208
  end
212
209
 
213
210
  @participants
@@ -244,11 +244,7 @@ module Twilio
244
244
 
245
245
  unless @members
246
246
  @members = MemberList.new(
247
- @version,
248
- service_sid: @solution[:service_sid],
249
- channel_sid: @solution[:sid]
250
-
251
- )
247
+ @version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
252
248
  end
253
249
 
254
250
  @members
@@ -267,11 +263,7 @@ module Twilio
267
263
 
268
264
  unless @messages
269
265
  @messages = MessageList.new(
270
- @version,
271
- service_sid: @solution[:service_sid],
272
- channel_sid: @solution[:sid]
273
-
274
- )
266
+ @version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
275
267
  end
276
268
 
277
269
  @messages
@@ -290,11 +282,7 @@ module Twilio
290
282
 
291
283
  unless @invites
292
284
  @invites = InviteList.new(
293
- @version,
294
- service_sid: @solution[:service_sid],
295
- channel_sid: @solution[:sid]
296
-
297
- )
285
+ @version, service_sid: @solution[:service_sid], channel_sid: @solution[:sid], )
298
286
  end
299
287
 
300
288
  @invites
@@ -228,13 +228,8 @@ module Twilio
228
228
  def user_channels
229
229
  unless @user_channels
230
230
  @user_channels = UserChannelList.new(
231
- @version,
232
- service_sid: @solution[:service_sid],
233
- user_sid: @solution[:sid]
234
-
235
- )
231
+ @version, service_sid: @solution[:service_sid], user_sid: @solution[:sid], )
236
232
  end
237
-
238
233
  @user_channels
239
234
  end
240
235
 
@@ -375,10 +375,7 @@ module Twilio
375
375
 
376
376
  unless @channels
377
377
  @channels = ChannelList.new(
378
- @version,
379
- service_sid: @solution[:sid]
380
-
381
- )
378
+ @version, service_sid: @solution[:sid], )
382
379
  end
383
380
 
384
381
  @channels
@@ -397,10 +394,7 @@ module Twilio
397
394
 
398
395
  unless @roles
399
396
  @roles = RoleList.new(
400
- @version,
401
- service_sid: @solution[:sid]
402
-
403
- )
397
+ @version, service_sid: @solution[:sid], )
404
398
  end
405
399
 
406
400
  @roles
@@ -419,10 +413,7 @@ module Twilio
419
413
 
420
414
  unless @users
421
415
  @users = UserList.new(
422
- @version,
423
- service_sid: @solution[:sid]
424
-
425
- )
416
+ @version, service_sid: @solution[:sid], )
426
417
  end
427
418
 
428
419
  @users