twilio-ruby 5.74.2 → 5.74.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +7 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
  5. data/lib/twilio-ruby/rest/content/v1.rb +7 -0
  6. data/lib/twilio-ruby/rest/content.rb +6 -0
  7. data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
  8. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
  9. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +84 -0
  10. data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +105 -10
  11. data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +319 -0
  12. data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +14 -6
  13. data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +14 -6
  14. data/lib/twilio-ruby/rest/flex_api/v1.rb +39 -0
  15. data/lib/twilio-ruby/rest/flex_api.rb +22 -0
  16. data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +14 -0
  17. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +297 -0
  18. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +290 -0
  19. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +317 -0
  20. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +310 -0
  21. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +54 -0
  22. data/lib/twilio-ruby/rest/microvisor/v1.rb +32 -0
  23. data/lib/twilio-ruby/rest/microvisor.rb +16 -0
  24. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
  25. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue_bulk_real_time_statistics.rb +149 -0
  26. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +23 -0
  27. data/lib/twilio-ruby/version.rb +1 -1
  28. metadata +11 -2
@@ -0,0 +1,319 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class FlexApi < Domain
12
+ class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ class InsightsSegmentsList < ListResource
16
+ ##
17
+ # Initialize the InsightsSegmentsList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [InsightsSegmentsList] InsightsSegmentsList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ '#<Twilio.FlexApi.V1.InsightsSegmentsList>'
31
+ end
32
+ end
33
+
34
+ ##
35
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
36
+ class InsightsSegmentsPage < Page
37
+ ##
38
+ # Initialize the InsightsSegmentsPage
39
+ # @param [Version] version Version that contains the resource
40
+ # @param [Response] response Response from the API
41
+ # @param [Hash] solution Path solution for the resource
42
+ # @return [InsightsSegmentsPage] InsightsSegmentsPage
43
+ def initialize(version, response, solution)
44
+ super(version, response)
45
+
46
+ # Path Solution
47
+ @solution = solution
48
+ end
49
+
50
+ ##
51
+ # Build an instance of InsightsSegmentsInstance
52
+ # @param [Hash] payload Payload response from the API
53
+ # @return [InsightsSegmentsInstance] InsightsSegmentsInstance
54
+ def get_instance(payload)
55
+ InsightsSegmentsInstance.new(@version, payload, )
56
+ end
57
+
58
+ ##
59
+ # Provide a user friendly representation
60
+ def to_s
61
+ '<Twilio.FlexApi.V1.InsightsSegmentsPage>'
62
+ end
63
+ end
64
+
65
+ ##
66
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
67
+ class InsightsSegmentsContext < InstanceContext
68
+ ##
69
+ # Initialize the InsightsSegmentsContext
70
+ # @param [Version] version Version that contains the resource
71
+ # @param [String] segment_id To unique id of the segment
72
+ # @return [InsightsSegmentsContext] InsightsSegmentsContext
73
+ def initialize(version, segment_id)
74
+ super(version)
75
+
76
+ # Path Solution
77
+ @solution = {segment_id: segment_id, }
78
+ @uri = "/Insights/Segments/#{@solution[:segment_id]}"
79
+ end
80
+
81
+ ##
82
+ # Fetch the InsightsSegmentsInstance
83
+ # @param [String] token The Token HTTP request header
84
+ # @return [InsightsSegmentsInstance] Fetched InsightsSegmentsInstance
85
+ def fetch(token: :unset)
86
+ headers = Twilio::Values.of({'Token' => token, })
87
+
88
+ payload = @version.fetch('GET', @uri, headers: headers)
89
+
90
+ InsightsSegmentsInstance.new(@version, payload, segment_id: @solution[:segment_id], )
91
+ end
92
+
93
+ ##
94
+ # Provide a user friendly representation
95
+ def to_s
96
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
97
+ "#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>"
98
+ end
99
+
100
+ ##
101
+ # Provide a detailed, user friendly representation
102
+ def inspect
103
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
104
+ "#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>"
105
+ end
106
+ end
107
+
108
+ ##
109
+ # 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.
110
+ class InsightsSegmentsInstance < InstanceResource
111
+ ##
112
+ # Initialize the InsightsSegmentsInstance
113
+ # @param [Version] version Version that contains the resource
114
+ # @param [Hash] payload payload that contains response from Twilio
115
+ # @param [String] segment_id To unique id of the segment
116
+ # @return [InsightsSegmentsInstance] InsightsSegmentsInstance
117
+ def initialize(version, payload, segment_id: nil)
118
+ super(version)
119
+
120
+ # Marshaled Properties
121
+ @properties = {
122
+ 'segment_id' => payload['segment_id'],
123
+ 'external_id' => payload['external_id'],
124
+ 'queue' => payload['queue'],
125
+ 'external_contact' => payload['external_contact'],
126
+ 'external_segment_link_id' => payload['external_segment_link_id'],
127
+ 'date' => payload['date'],
128
+ 'account_id' => payload['account_id'],
129
+ 'external_segment_link' => payload['external_segment_link'],
130
+ 'agent_id' => payload['agent_id'],
131
+ 'agent_phone' => payload['agent_phone'],
132
+ 'agent_name' => payload['agent_name'],
133
+ 'agent_team_name' => payload['agent_team_name'],
134
+ 'agent_team_name_in_hierarchy' => payload['agent_team_name_in_hierarchy'],
135
+ 'agent_link' => payload['agent_link'],
136
+ 'customer_phone' => payload['customer_phone'],
137
+ 'customer_name' => payload['customer_name'],
138
+ 'customer_link' => payload['customer_link'],
139
+ 'segment_recording_offset' => payload['segment_recording_offset'],
140
+ 'media' => payload['media'],
141
+ 'assessment_type' => payload['assessment_type'],
142
+ 'assessment_percentage' => payload['assessment_percentage'],
143
+ 'url' => payload['url'],
144
+ }
145
+
146
+ # Context
147
+ @instance_context = nil
148
+ @params = {'segment_id' => segment_id || @properties['segment_id'], }
149
+ end
150
+
151
+ ##
152
+ # Generate an instance context for the instance, the context is capable of
153
+ # performing various actions. All instance actions are proxied to the context
154
+ # @return [InsightsSegmentsContext] InsightsSegmentsContext for this InsightsSegmentsInstance
155
+ def context
156
+ unless @instance_context
157
+ @instance_context = InsightsSegmentsContext.new(@version, @params['segment_id'], )
158
+ end
159
+ @instance_context
160
+ end
161
+
162
+ ##
163
+ # @return [String] Unique segment Id
164
+ def segment_id
165
+ @properties['segment_id']
166
+ end
167
+
168
+ ##
169
+ # @return [String] The id for conversation.
170
+ def external_id
171
+ @properties['external_id']
172
+ end
173
+
174
+ ##
175
+ # @return [String] The queue
176
+ def queue
177
+ @properties['queue']
178
+ end
179
+
180
+ ##
181
+ # @return [String] The external_contact
182
+ def external_contact
183
+ @properties['external_contact']
184
+ end
185
+
186
+ ##
187
+ # @return [String] The uuid for external_segment_link.
188
+ def external_segment_link_id
189
+ @properties['external_segment_link_id']
190
+ end
191
+
192
+ ##
193
+ # @return [String] The conversation date.
194
+ def date
195
+ @properties['date']
196
+ end
197
+
198
+ ##
199
+ # @return [String] The id for the account.
200
+ def account_id
201
+ @properties['account_id']
202
+ end
203
+
204
+ ##
205
+ # @return [String] The hyperlink to recording.
206
+ def external_segment_link
207
+ @properties['external_segment_link']
208
+ end
209
+
210
+ ##
211
+ # @return [String] The unique id for the agent.
212
+ def agent_id
213
+ @properties['agent_id']
214
+ end
215
+
216
+ ##
217
+ # @return [String] The agent phone number.
218
+ def agent_phone
219
+ @properties['agent_phone']
220
+ end
221
+
222
+ ##
223
+ # @return [String] The agent name.
224
+ def agent_name
225
+ @properties['agent_name']
226
+ end
227
+
228
+ ##
229
+ # @return [String] The team name of agent.
230
+ def agent_team_name
231
+ @properties['agent_team_name']
232
+ end
233
+
234
+ ##
235
+ # @return [String] he team name of agent.
236
+ def agent_team_name_in_hierarchy
237
+ @properties['agent_team_name_in_hierarchy']
238
+ end
239
+
240
+ ##
241
+ # @return [String] The link to the agent conversation.
242
+ def agent_link
243
+ @properties['agent_link']
244
+ end
245
+
246
+ ##
247
+ # @return [String] The sort value for comment.
248
+ def customer_phone
249
+ @properties['customer_phone']
250
+ end
251
+
252
+ ##
253
+ # @return [String] The customer name.
254
+ def customer_name
255
+ @properties['customer_name']
256
+ end
257
+
258
+ ##
259
+ # @return [String] The link to the customer conversation.
260
+ def customer_link
261
+ @properties['customer_link']
262
+ end
263
+
264
+ ##
265
+ # @return [String] The offset value for the recording.
266
+ def segment_recording_offset
267
+ @properties['segment_recording_offset']
268
+ end
269
+
270
+ ##
271
+ # @return [String] The link for the conversation.
272
+ def media
273
+ @properties['media']
274
+ end
275
+
276
+ ##
277
+ # @return [Hash] The type of the assessment.
278
+ def assessment_type
279
+ @properties['assessment_type']
280
+ end
281
+
282
+ ##
283
+ # @return [Hash] The percentage score on Assessment.
284
+ def assessment_percentage
285
+ @properties['assessment_percentage']
286
+ end
287
+
288
+ ##
289
+ # @return [String] The url
290
+ def url
291
+ @properties['url']
292
+ end
293
+
294
+ ##
295
+ # Fetch the InsightsSegmentsInstance
296
+ # @param [String] token The Token HTTP request header
297
+ # @return [InsightsSegmentsInstance] Fetched InsightsSegmentsInstance
298
+ def fetch(token: :unset)
299
+ context.fetch(token: token, )
300
+ end
301
+
302
+ ##
303
+ # Provide a user friendly representation
304
+ def to_s
305
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
306
+ "<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
307
+ end
308
+
309
+ ##
310
+ # Provide a detailed, user friendly representation
311
+ def inspect
312
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
313
+ "<Twilio.FlexApi.V1.InsightsSegmentsInstance #{values}>"
314
+ end
315
+ end
316
+ end
317
+ end
318
+ end
319
+ end
@@ -10,6 +10,8 @@ module Twilio
10
10
  module REST
11
11
  class FlexApi < Domain
12
12
  class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
13
15
  class InsightsSessionList < ListResource
14
16
  ##
15
17
  # Initialize the InsightsSessionList
@@ -29,6 +31,8 @@ module Twilio
29
31
  end
30
32
  end
31
33
 
34
+ ##
35
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
32
36
  class InsightsSessionPage < Page
33
37
  ##
34
38
  # Initialize the InsightsSessionPage
@@ -58,6 +62,8 @@ module Twilio
58
62
  end
59
63
  end
60
64
 
65
+ ##
66
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
61
67
  class InsightsSessionContext < InstanceContext
62
68
  ##
63
69
  # Initialize the InsightsSessionContext
@@ -73,10 +79,10 @@ module Twilio
73
79
 
74
80
  ##
75
81
  # Create the InsightsSessionInstance
76
- # @param [String] token The Token HTTP request header
82
+ # @param [String] authorization The Authorization HTTP request header
77
83
  # @return [InsightsSessionInstance] Created InsightsSessionInstance
78
- def create(token: :unset)
79
- headers = Twilio::Values.of({'Token' => token, })
84
+ def create(authorization: :unset)
85
+ headers = Twilio::Values.of({'Authorization' => authorization, })
80
86
 
81
87
  payload = @version.create('POST', @uri, headers: headers)
82
88
 
@@ -98,6 +104,8 @@ module Twilio
98
104
  end
99
105
  end
100
106
 
107
+ ##
108
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
101
109
  class InsightsSessionInstance < InstanceResource
102
110
  ##
103
111
  # Initialize the InsightsSessionInstance
@@ -164,10 +172,10 @@ module Twilio
164
172
 
165
173
  ##
166
174
  # Create the InsightsSessionInstance
167
- # @param [String] token The Token HTTP request header
175
+ # @param [String] authorization The Authorization HTTP request header
168
176
  # @return [InsightsSessionInstance] Created InsightsSessionInstance
169
- def create(token: :unset)
170
- context.create(token: token, )
177
+ def create(authorization: :unset)
178
+ context.create(authorization: authorization, )
171
179
  end
172
180
 
173
181
  ##
@@ -10,6 +10,8 @@ module Twilio
10
10
  module REST
11
11
  class FlexApi < Domain
12
12
  class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
13
15
  class InsightsUserRolesList < ListResource
14
16
  ##
15
17
  # Initialize the InsightsUserRolesList
@@ -29,6 +31,8 @@ module Twilio
29
31
  end
30
32
  end
31
33
 
34
+ ##
35
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
32
36
  class InsightsUserRolesPage < Page
33
37
  ##
34
38
  # Initialize the InsightsUserRolesPage
@@ -58,6 +62,8 @@ module Twilio
58
62
  end
59
63
  end
60
64
 
65
+ ##
66
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
61
67
  class InsightsUserRolesContext < InstanceContext
62
68
  ##
63
69
  # Initialize the InsightsUserRolesContext
@@ -73,10 +79,10 @@ module Twilio
73
79
 
74
80
  ##
75
81
  # Fetch the InsightsUserRolesInstance
76
- # @param [String] token The Token HTTP request header
82
+ # @param [String] authorization The Authorization HTTP request header
77
83
  # @return [InsightsUserRolesInstance] Fetched InsightsUserRolesInstance
78
- def fetch(token: :unset)
79
- headers = Twilio::Values.of({'Token' => token, })
84
+ def fetch(authorization: :unset)
85
+ headers = Twilio::Values.of({'Authorization' => authorization, })
80
86
 
81
87
  payload = @version.fetch('GET', @uri, headers: headers)
82
88
 
@@ -98,6 +104,8 @@ module Twilio
98
104
  end
99
105
  end
100
106
 
107
+ ##
108
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
101
109
  class InsightsUserRolesInstance < InstanceResource
102
110
  ##
103
111
  # Initialize the InsightsUserRolesInstance
@@ -140,10 +148,10 @@ module Twilio
140
148
 
141
149
  ##
142
150
  # Fetch the InsightsUserRolesInstance
143
- # @param [String] token The Token HTTP request header
151
+ # @param [String] authorization The Authorization HTTP request header
144
152
  # @return [InsightsUserRolesInstance] Fetched InsightsUserRolesInstance
145
- def fetch(token: :unset)
146
- context.fetch(token: token, )
153
+ def fetch(authorization: :unset)
154
+ context.fetch(authorization: authorization, )
147
155
  end
148
156
 
149
157
  ##
@@ -19,8 +19,11 @@ module Twilio
19
19
  @configuration = nil
20
20
  @flex_flow = nil
21
21
  @assessments = nil
22
+ @insights_assessments_comment = nil
23
+ @insights_questionnaires = nil
22
24
  @insights_questionnaires_category = nil
23
25
  @insights_questionnaires_question = nil
26
+ @insights_segments = nil
24
27
  @insights_session = nil
25
28
  @insights_settings_answer_sets = nil
26
29
  @insights_settings_comment = nil
@@ -71,6 +74,27 @@ module Twilio
71
74
  @assessments ||= AssessmentsContext.new self
72
75
  end
73
76
 
77
+ ##
78
+ # @return [Twilio::REST::Flex_api::V1::InsightsAssessmentsCommentContext]
79
+ def insights_assessments_comment
80
+ @insights_assessments_comment ||= InsightsAssessmentsCommentList.new self
81
+ end
82
+
83
+ ##
84
+ # @param [String] id The unique ID of the questionnaire
85
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesContext] if id was passed.
86
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesList]
87
+ def insights_questionnaires(id=:unset)
88
+ if id.nil?
89
+ raise ArgumentError, 'id cannot be nil'
90
+ end
91
+ if id == :unset
92
+ @insights_questionnaires ||= InsightsQuestionnairesList.new self
93
+ else
94
+ InsightsQuestionnairesContext.new(self, id)
95
+ end
96
+ end
97
+
74
98
  ##
75
99
  # @param [String] category_id The ID of the category to be update
76
100
  # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryContext] if category_id was passed.
@@ -101,6 +125,21 @@ module Twilio
101
125
  end
102
126
  end
103
127
 
128
+ ##
129
+ # @param [String] segment_id To unique id of the segment
130
+ # @return [Twilio::REST::Flex_api::V1::InsightsSegmentsContext] if segment_id was passed.
131
+ # @return [Twilio::REST::Flex_api::V1::InsightsSegmentsList]
132
+ def insights_segments(segment_id=:unset)
133
+ if segment_id.nil?
134
+ raise ArgumentError, 'segment_id cannot be nil'
135
+ end
136
+ if segment_id == :unset
137
+ @insights_segments ||= InsightsSegmentsList.new self
138
+ else
139
+ InsightsSegmentsContext.new(self, segment_id)
140
+ end
141
+ end
142
+
104
143
  ##
105
144
  # @return [Twilio::REST::Flex_api::V1::InsightsSessionContext]
106
145
  def insights_session
@@ -65,6 +65,20 @@ module Twilio
65
65
  self.v1.assessments()
66
66
  end
67
67
 
68
+ ##
69
+ # @return [Twilio::REST::Flex_api::V1::InsightsAssessmentsCommentInstance]
70
+ def insights_assessments_comment
71
+ self.v1.insights_assessments_comment()
72
+ end
73
+
74
+ ##
75
+ # @param [String] id The unique id of this questionnaire
76
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesInstance] if id was passed.
77
+ # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesList]
78
+ def insights_questionnaires(id=:unset)
79
+ self.v1.insights_questionnaires(id)
80
+ end
81
+
68
82
  ##
69
83
  # @param [String] category_id The unique ID for the category
70
84
  # @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryInstance] if category_id was passed.
@@ -81,6 +95,14 @@ module Twilio
81
95
  self.v1.insights_questionnaires_question(question_id)
82
96
  end
83
97
 
98
+ ##
99
+ # @param [String] segment_id To unique id of the segment
100
+ # @return [Twilio::REST::Flex_api::V1::InsightsSegmentsInstance] if segment_id was passed.
101
+ # @return [Twilio::REST::Flex_api::V1::InsightsSegmentsList]
102
+ def insights_segments(segment_id=:unset)
103
+ self.v1.insights_segments(segment_id)
104
+ end
105
+
84
106
  ##
85
107
  # @return [Twilio::REST::Flex_api::V1::InsightsSessionInstance]
86
108
  def insights_session
@@ -172,6 +172,8 @@ module Twilio
172
172
  'live_activity' => payload['live_activity'],
173
173
  'line_type_intelligence' => payload['line_type_intelligence'],
174
174
  'identity_match' => payload['identity_match'],
175
+ 'sms_pumping_risk' => payload['sms_pumping_risk'],
176
+ 'disposable_phone_number_risk' => payload['disposable_phone_number_risk'],
175
177
  'url' => payload['url'],
176
178
  }
177
179
 
@@ -263,6 +265,18 @@ module Twilio
263
265
  @properties['identity_match']
264
266
  end
265
267
 
268
+ ##
269
+ # @return [Hash] An object that contains sms pumping risk information
270
+ def sms_pumping_risk
271
+ @properties['sms_pumping_risk']
272
+ end
273
+
274
+ ##
275
+ # @return [Hash] An object that contains disposable phone number risk information
276
+ def disposable_phone_number_risk
277
+ @properties['disposable_phone_number_risk']
278
+ end
279
+
266
280
  ##
267
281
  # @return [String] The absolute URL of the resource
268
282
  def url