twilio-ruby 5.74.3 → 5.74.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf1900f5b33e9026e81a76e58431c440348374a2
4
- data.tar.gz: 06eab21891c34b8a17cb3f0b16d9b298c0c5204a
3
+ metadata.gz: 79498c371956cac86eb0c4281ad40018066fcd80
4
+ data.tar.gz: e241341e9bbae20dbc4e987e71e09d60c437f4aa
5
5
  SHA512:
6
- metadata.gz: ff4fdb962d8636ce5fd05c7bf86b7c3331e7576eb9d8a9b3f0caac5b1dccfb1a4142fdb08580774fc24a06d71577b5b9ec62418298af96e84128822a872cc174
7
- data.tar.gz: 90f0907003c094fcde142b81c17e98ec1c378964a409b758638efd793d077cdcbedc1550b7cc5954e4b1812cbf201cd8948871569b56762b6137cc87f08af15b
6
+ metadata.gz: a919fe9df9ed98d43d0cdb3b9514672f086ed811ed53285bdcea897e4eb18d5bc65236ee567509ac6613b45d7f1dc822de7cfdbf7bab5f1345a0666f65eafece
7
+ data.tar.gz: cd57db7c480397143d93a143285966bd62baca8b763bde46b345e2c2b51d520504d68345f47e07a0cb32bcb21f527e2f5dedb9666bfecab73e511308d958b670
data/CHANGES.md CHANGED
@@ -1,6 +1,13 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2023-02-22] Version 5.74.4
5
+ ---------------------------
6
+ **Api**
7
+ - Remove `scheduled_for` property from message resource
8
+ - Add `scheduled_for` property to message resource
9
+
10
+
4
11
  [2023-02-08] Version 5.74.3
5
12
  ---------------------------
6
13
  **Lookups**
data/README.md CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.74.3'
37
+ gem 'twilio-ruby', '~> 5.74.4'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.74.3
43
+ gem install twilio-ruby -v 5.74.4
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -396,7 +396,7 @@ module Twilio
396
396
  end
397
397
 
398
398
  ##
399
- # @return [String] A string that you assigned to describe this conference room
399
+ # @return [String] A string that you assigned to describe this conference room. Max length is 128 characters.
400
400
  def friendly_name
401
401
  @properties['friendly_name']
402
402
  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 AssessmentsList < ListResource
14
16
  ##
15
17
  # Initialize the AssessmentsList
@@ -20,6 +22,45 @@ module Twilio
20
22
 
21
23
  # Path Solution
22
24
  @solution = {}
25
+ @uri = "/Insights/QM/Assessments"
26
+ end
27
+
28
+ ##
29
+ # Create the AssessmentsInstance
30
+ # @param [String] category_id The id of the category
31
+ # @param [String] category_name The name of the category
32
+ # @param [String] segment_id Segment Id of the conversation
33
+ # @param [String] user_name Name of the user assessing conversation
34
+ # @param [String] user_email Email of the user assessing conversation
35
+ # @param [String] agent_id The id of the Agent
36
+ # @param [String] offset The offset of the conversation.
37
+ # @param [String] metric_id The question Id selected for assessment
38
+ # @param [String] metric_name The question name of the assessment
39
+ # @param [String] answer_text The answer text selected by user
40
+ # @param [String] answer_id The id of the answer selected by user
41
+ # @param [String] questionnaire_id Questionnaire Id of the associated question
42
+ # @param [String] token The Token HTTP request header
43
+ # @return [AssessmentsInstance] Created AssessmentsInstance
44
+ def create(category_id: nil, category_name: nil, segment_id: nil, user_name: nil, user_email: nil, agent_id: nil, offset: nil, metric_id: nil, metric_name: nil, answer_text: nil, answer_id: nil, questionnaire_id: nil, token: :unset)
45
+ data = Twilio::Values.of({
46
+ 'CategoryId' => category_id,
47
+ 'CategoryName' => category_name,
48
+ 'SegmentId' => segment_id,
49
+ 'UserName' => user_name,
50
+ 'UserEmail' => user_email,
51
+ 'AgentId' => agent_id,
52
+ 'Offset' => offset,
53
+ 'MetricId' => metric_id,
54
+ 'MetricName' => metric_name,
55
+ 'AnswerText' => answer_text,
56
+ 'AnswerId' => answer_id,
57
+ 'QuestionnaireId' => questionnaire_id,
58
+ })
59
+ headers = Twilio::Values.of({'Token' => token, })
60
+
61
+ payload = @version.create('POST', @uri, data: data, headers: headers)
62
+
63
+ AssessmentsInstance.new(@version, payload, )
23
64
  end
24
65
 
25
66
  ##
@@ -29,6 +70,8 @@ module Twilio
29
70
  end
30
71
  end
31
72
 
73
+ ##
74
+ # 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
75
  class AssessmentsPage < Page
33
76
  ##
34
77
  # Initialize the AssessmentsPage
@@ -58,26 +101,36 @@ module Twilio
58
101
  end
59
102
  end
60
103
 
104
+ ##
105
+ # 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
106
  class AssessmentsContext < InstanceContext
62
107
  ##
63
108
  # Initialize the AssessmentsContext
64
109
  # @param [Version] version Version that contains the resource
110
+ # @param [String] assessment_id The id of the assessment to be modified
65
111
  # @return [AssessmentsContext] AssessmentsContext
66
- def initialize(version)
112
+ def initialize(version, assessment_id)
67
113
  super(version)
68
114
 
69
115
  # Path Solution
70
- @solution = {}
71
- @uri = "/Accounts/Assessments"
116
+ @solution = {assessment_id: assessment_id, }
117
+ @uri = "/Insights/QM/Assessments/#{@solution[:assessment_id]}"
72
118
  end
73
119
 
74
120
  ##
75
- # Create the AssessmentsInstance
76
- # @return [AssessmentsInstance] Created AssessmentsInstance
77
- def create
78
- payload = @version.create('POST', @uri)
121
+ # Update the AssessmentsInstance
122
+ # @param [String] offset The offset of the conversation
123
+ # @param [String] answer_text The answer text selected by user
124
+ # @param [String] answer_id The id of the answer selected by user
125
+ # @param [String] token The Token HTTP request header
126
+ # @return [AssessmentsInstance] Updated AssessmentsInstance
127
+ def update(offset: nil, answer_text: nil, answer_id: nil, token: :unset)
128
+ data = Twilio::Values.of({'Offset' => offset, 'AnswerText' => answer_text, 'AnswerId' => answer_id, })
129
+ headers = Twilio::Values.of({'Token' => token, })
79
130
 
80
- AssessmentsInstance.new(@version, payload, )
131
+ payload = @version.update('POST', @uri, data: data, headers: headers)
132
+
133
+ AssessmentsInstance.new(@version, payload, assessment_id: @solution[:assessment_id], )
81
134
  end
82
135
 
83
136
  ##
@@ -95,21 +148,39 @@ module Twilio
95
148
  end
96
149
  end
97
150
 
151
+ ##
152
+ # 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.
98
153
  class AssessmentsInstance < InstanceResource
99
154
  ##
100
155
  # Initialize the AssessmentsInstance
101
156
  # @param [Version] version Version that contains the resource
102
157
  # @param [Hash] payload payload that contains response from Twilio
158
+ # @param [String] assessment_id The id of the assessment to be modified
103
159
  # @return [AssessmentsInstance] AssessmentsInstance
104
- def initialize(version, payload)
160
+ def initialize(version, payload, assessment_id: nil)
105
161
  super(version)
106
162
 
107
163
  # Marshaled Properties
108
- @properties = {'url' => payload['url'], }
164
+ @properties = {
165
+ 'account_sid' => payload['account_sid'],
166
+ 'assessment_id' => payload['assessment_id'],
167
+ 'offset' => payload['offset'] == nil ? payload['offset'] : payload['offset'].to_f,
168
+ 'report' => payload['report'],
169
+ 'weight' => payload['weight'] == nil ? payload['weight'] : payload['weight'].to_f,
170
+ 'agent_id' => payload['agent_id'],
171
+ 'segment_id' => payload['segment_id'],
172
+ 'user_name' => payload['user_name'],
173
+ 'user_email' => payload['user_email'],
174
+ 'answer_text' => payload['answer_text'],
175
+ 'answer_id' => payload['answer_id'],
176
+ 'assessment' => payload['assessment'],
177
+ 'timestamp' => payload['timestamp'] == nil ? payload['timestamp'] : payload['timestamp'].to_f,
178
+ 'url' => payload['url'],
179
+ }
109
180
 
110
181
  # Context
111
182
  @instance_context = nil
112
- @params = {}
183
+ @params = {'assessment_id' => assessment_id || @properties['assessment_id'], }
113
184
  end
114
185
 
115
186
  ##
@@ -118,22 +189,104 @@ module Twilio
118
189
  # @return [AssessmentsContext] AssessmentsContext for this AssessmentsInstance
119
190
  def context
120
191
  unless @instance_context
121
- @instance_context = AssessmentsContext.new(@version, )
192
+ @instance_context = AssessmentsContext.new(@version, @params['assessment_id'], )
122
193
  end
123
194
  @instance_context
124
195
  end
125
196
 
126
197
  ##
127
- # @return [String] The URL of this resource.
198
+ # @return [String] Account Sid.
199
+ def account_sid
200
+ @properties['account_sid']
201
+ end
202
+
203
+ ##
204
+ # @return [String] Assessment id
205
+ def assessment_id
206
+ @properties['assessment_id']
207
+ end
208
+
209
+ ##
210
+ # @return [String] offset
211
+ def offset
212
+ @properties['offset']
213
+ end
214
+
215
+ ##
216
+ # @return [Boolean] Part of assessment report
217
+ def report
218
+ @properties['report']
219
+ end
220
+
221
+ ##
222
+ # @return [String] The weightage
223
+ def weight
224
+ @properties['weight']
225
+ end
226
+
227
+ ##
228
+ # @return [String] AgentID
229
+ def agent_id
230
+ @properties['agent_id']
231
+ end
232
+
233
+ ##
234
+ # @return [String] Segment Id
235
+ def segment_id
236
+ @properties['segment_id']
237
+ end
238
+
239
+ ##
240
+ # @return [String] The user name.
241
+ def user_name
242
+ @properties['user_name']
243
+ end
244
+
245
+ ##
246
+ # @return [String] The user email id.
247
+ def user_email
248
+ @properties['user_email']
249
+ end
250
+
251
+ ##
252
+ # @return [String] Answer text
253
+ def answer_text
254
+ @properties['answer_text']
255
+ end
256
+
257
+ ##
258
+ # @return [String] Answer Id
259
+ def answer_id
260
+ @properties['answer_id']
261
+ end
262
+
263
+ ##
264
+ # @return [Hash] Assessment Details
265
+ def assessment
266
+ @properties['assessment']
267
+ end
268
+
269
+ ##
270
+ # @return [String] The timestamp
271
+ def timestamp
272
+ @properties['timestamp']
273
+ end
274
+
275
+ ##
276
+ # @return [String] The url
128
277
  def url
129
278
  @properties['url']
130
279
  end
131
280
 
132
281
  ##
133
- # Create the AssessmentsInstance
134
- # @return [AssessmentsInstance] Created AssessmentsInstance
135
- def create
136
- context.create
282
+ # Update the AssessmentsInstance
283
+ # @param [String] offset The offset of the conversation
284
+ # @param [String] answer_text The answer text selected by user
285
+ # @param [String] answer_id The id of the answer selected by user
286
+ # @param [String] token The Token HTTP request header
287
+ # @return [AssessmentsInstance] Updated AssessmentsInstance
288
+ def update(offset: nil, answer_text: nil, answer_id: nil, token: :unset)
289
+ context.update(offset: offset, answer_text: answer_text, answer_id: answer_id, token: token, )
137
290
  end
138
291
 
139
292
  ##
@@ -262,6 +262,7 @@ module Twilio
262
262
  'answer_set_id' => payload['answer_set_id'],
263
263
  'allow_na' => payload['allow_na'],
264
264
  'usage' => payload['usage'] == nil ? payload['usage'] : payload['usage'].to_i,
265
+ 'answer_set' => payload['answer_set'],
265
266
  'url' => payload['url'],
266
267
  }
267
268
 
@@ -329,6 +330,12 @@ module Twilio
329
330
  @properties['usage']
330
331
  end
331
332
 
333
+ ##
334
+ # @return [Hash] Question's Answer set
335
+ def answer_set
336
+ @properties['answer_set']
337
+ end
338
+
332
339
  ##
333
340
  # @return [String] The url
334
341
  def url
@@ -22,6 +22,100 @@ module Twilio
22
22
 
23
23
  # Path Solution
24
24
  @solution = {}
25
+ @uri = "/Insights/Segments"
26
+ end
27
+
28
+ ##
29
+ # Lists InsightsSegmentsInstance records from the API as a list.
30
+ # Unlike stream(), this operation is eager and will load `limit` records into
31
+ # memory before returning.
32
+ # @param [Array[String]] reservation_id The list of reservation Ids
33
+ # @param [String] token The Token HTTP request header
34
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
35
+ # guarantees to never return more than limit. Default is no limit
36
+ # @param [Integer] page_size Number of records to fetch per request, when
37
+ # not set will use the default value of 50 records. If no page_size is defined
38
+ # but a limit is defined, stream() will attempt to read the limit with the most
39
+ # efficient page size, i.e. min(limit, 1000)
40
+ # @return [Array] Array of up to limit results
41
+ def list(reservation_id: :unset, token: :unset, limit: nil, page_size: nil)
42
+ self.stream(
43
+ reservation_id: reservation_id,
44
+ token: token,
45
+ limit: limit,
46
+ page_size: page_size
47
+ ).entries
48
+ end
49
+
50
+ ##
51
+ # Streams InsightsSegmentsInstance records from the API as an Enumerable.
52
+ # This operation lazily loads records as efficiently as possible until the limit
53
+ # is reached.
54
+ # @param [Array[String]] reservation_id The list of reservation Ids
55
+ # @param [String] token The Token HTTP request header
56
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
57
+ # guarantees to never return more than limit. Default is no limit.
58
+ # @param [Integer] page_size Number of records to fetch per request, when
59
+ # not set will use the default value of 50 records. If no page_size is defined
60
+ # but a limit is defined, stream() will attempt to read the limit with the most
61
+ # efficient page size, i.e. min(limit, 1000)
62
+ # @return [Enumerable] Enumerable that will yield up to limit results
63
+ def stream(reservation_id: :unset, token: :unset, limit: nil, page_size: nil)
64
+ limits = @version.read_limits(limit, page_size)
65
+
66
+ page = self.page(reservation_id: reservation_id, token: token, page_size: limits[:page_size], )
67
+
68
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
69
+ end
70
+
71
+ ##
72
+ # When passed a block, yields InsightsSegmentsInstance records from the API.
73
+ # This operation lazily loads records as efficiently as possible until the limit
74
+ # is reached.
75
+ def each
76
+ limits = @version.read_limits
77
+
78
+ page = self.page(page_size: limits[:page_size], )
79
+
80
+ @version.stream(page,
81
+ limit: limits[:limit],
82
+ page_limit: limits[:page_limit]).each {|x| yield x}
83
+ end
84
+
85
+ ##
86
+ # Retrieve a single page of InsightsSegmentsInstance records from the API.
87
+ # Request is executed immediately.
88
+ # @param [Array[String]] reservation_id The list of reservation Ids
89
+ # @param [String] token The Token HTTP request header
90
+ # @param [String] page_token PageToken provided by the API
91
+ # @param [Integer] page_number Page Number, this value is simply for client state
92
+ # @param [Integer] page_size Number of records to return, defaults to 50
93
+ # @return [Page] Page of InsightsSegmentsInstance
94
+ def page(reservation_id: :unset, token: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
95
+ params = Twilio::Values.of({
96
+ 'ReservationId' => Twilio.serialize_list(reservation_id) { |e| e },
97
+ 'PageToken' => page_token,
98
+ 'Page' => page_number,
99
+ 'PageSize' => page_size,
100
+ })
101
+ headers = Twilio::Values.of({'Token' => token, })
102
+
103
+ response = @version.page('GET', @uri, params: params, headers: headers)
104
+
105
+ InsightsSegmentsPage.new(@version, response, @solution)
106
+ end
107
+
108
+ ##
109
+ # Retrieve a single page of InsightsSegmentsInstance records from the API.
110
+ # Request is executed immediately.
111
+ # @param [String] target_url API-generated URL for the requested results page
112
+ # @return [Page] Page of InsightsSegmentsInstance
113
+ def get_page(target_url)
114
+ response = @version.domain.request(
115
+ 'GET',
116
+ target_url
117
+ )
118
+ InsightsSegmentsPage.new(@version, response, @solution)
25
119
  end
26
120
 
27
121
  ##
@@ -268,7 +362,7 @@ module Twilio
268
362
  end
269
363
 
270
364
  ##
271
- # @return [String] The link for the conversation.
365
+ # @return [Hash] The media identifiers of the conversation.
272
366
  def media
273
367
  @properties['media']
274
368
  end
@@ -69,9 +69,18 @@ module Twilio
69
69
  end
70
70
 
71
71
  ##
72
- # @return [Twilio::REST::Flex_api::V1::AssessmentsContext]
73
- def assessments
74
- @assessments ||= AssessmentsContext.new self
72
+ # @param [String] assessment_id The id of the assessment to be modified
73
+ # @return [Twilio::REST::Flex_api::V1::AssessmentsContext] if assessment_id was passed.
74
+ # @return [Twilio::REST::Flex_api::V1::AssessmentsList]
75
+ def assessments(assessment_id=:unset)
76
+ if assessment_id.nil?
77
+ raise ArgumentError, 'assessment_id cannot be nil'
78
+ end
79
+ if assessment_id == :unset
80
+ @assessments ||= AssessmentsList.new self
81
+ else
82
+ AssessmentsContext.new(self, assessment_id)
83
+ end
75
84
  end
76
85
 
77
86
  ##
@@ -60,9 +60,11 @@ module Twilio
60
60
  end
61
61
 
62
62
  ##
63
- # @return [Twilio::REST::Flex_api::V1::AssessmentsInstance]
64
- def assessments
65
- self.v1.assessments()
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)
66
68
  end
67
69
 
68
70
  ##
@@ -108,7 +108,7 @@ module Twilio
108
108
  ##
109
109
  # Create the AccountConfigInstance
110
110
  # @param [String] key The config key; up to 100 characters.
111
- # @param [String] value The config value; up to 4096 characters.
111
+ # @param [String] value The config value; up to 4096 characters.
112
112
  # @return [AccountConfigInstance] Created AccountConfigInstance
113
113
  def create(key: nil, value: nil)
114
114
  data = Twilio::Values.of({'Key' => key, 'Value' => value, })
@@ -181,6 +181,18 @@ module Twilio
181
181
  AccountConfigInstance.new(@version, payload, key: @solution[:key], )
182
182
  end
183
183
 
184
+ ##
185
+ # Update the AccountConfigInstance
186
+ # @param [String] value The config value; up to 4096 characters.
187
+ # @return [AccountConfigInstance] Updated AccountConfigInstance
188
+ def update(value: nil)
189
+ data = Twilio::Values.of({'Value' => value, })
190
+
191
+ payload = @version.update('POST', @uri, data: data)
192
+
193
+ AccountConfigInstance.new(@version, payload, key: @solution[:key], )
194
+ end
195
+
184
196
  ##
185
197
  # Delete the AccountConfigInstance
186
198
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -270,6 +282,14 @@ module Twilio
270
282
  context.fetch
271
283
  end
272
284
 
285
+ ##
286
+ # Update the AccountConfigInstance
287
+ # @param [String] value The config value; up to 4096 characters.
288
+ # @return [AccountConfigInstance] Updated AccountConfigInstance
289
+ def update(value: nil)
290
+ context.update(value: value, )
291
+ end
292
+
273
293
  ##
274
294
  # Delete the AccountConfigInstance
275
295
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -181,6 +181,18 @@ module Twilio
181
181
  AccountSecretInstance.new(@version, payload, key: @solution[:key], )
182
182
  end
183
183
 
184
+ ##
185
+ # Update the AccountSecretInstance
186
+ # @param [String] value The secret value; up to 4096 characters.
187
+ # @return [AccountSecretInstance] Updated AccountSecretInstance
188
+ def update(value: nil)
189
+ data = Twilio::Values.of({'Value' => value, })
190
+
191
+ payload = @version.update('POST', @uri, data: data)
192
+
193
+ AccountSecretInstance.new(@version, payload, key: @solution[:key], )
194
+ end
195
+
184
196
  ##
185
197
  # Delete the AccountSecretInstance
186
198
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -263,6 +275,14 @@ module Twilio
263
275
  context.fetch
264
276
  end
265
277
 
278
+ ##
279
+ # Update the AccountSecretInstance
280
+ # @param [String] value The secret value; up to 4096 characters.
281
+ # @return [AccountSecretInstance] Updated AccountSecretInstance
282
+ def update(value: nil)
283
+ context.update(value: value, )
284
+ end
285
+
266
286
  ##
267
287
  # Delete the AccountSecretInstance
268
288
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -191,6 +191,23 @@ module Twilio
191
191
  )
192
192
  end
193
193
 
194
+ ##
195
+ # Update the DeviceConfigInstance
196
+ # @param [String] value The config value; up to 4096 characters.
197
+ # @return [DeviceConfigInstance] Updated DeviceConfigInstance
198
+ def update(value: nil)
199
+ data = Twilio::Values.of({'Value' => value, })
200
+
201
+ payload = @version.update('POST', @uri, data: data)
202
+
203
+ DeviceConfigInstance.new(
204
+ @version,
205
+ payload,
206
+ device_sid: @solution[:device_sid],
207
+ key: @solution[:key],
208
+ )
209
+ end
210
+
194
211
  ##
195
212
  # Delete the DeviceConfigInstance
196
213
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -289,6 +306,14 @@ module Twilio
289
306
  context.fetch
290
307
  end
291
308
 
309
+ ##
310
+ # Update the DeviceConfigInstance
311
+ # @param [String] value The config value; up to 4096 characters.
312
+ # @return [DeviceConfigInstance] Updated DeviceConfigInstance
313
+ def update(value: nil)
314
+ context.update(value: value, )
315
+ end
316
+
292
317
  ##
293
318
  # Delete the DeviceConfigInstance
294
319
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -191,6 +191,23 @@ module Twilio
191
191
  )
192
192
  end
193
193
 
194
+ ##
195
+ # Update the DeviceSecretInstance
196
+ # @param [String] value The secret value; up to 4096 characters.
197
+ # @return [DeviceSecretInstance] Updated DeviceSecretInstance
198
+ def update(value: nil)
199
+ data = Twilio::Values.of({'Value' => value, })
200
+
201
+ payload = @version.update('POST', @uri, data: data)
202
+
203
+ DeviceSecretInstance.new(
204
+ @version,
205
+ payload,
206
+ device_sid: @solution[:device_sid],
207
+ key: @solution[:key],
208
+ )
209
+ end
210
+
194
211
  ##
195
212
  # Delete the DeviceSecretInstance
196
213
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -282,6 +299,14 @@ module Twilio
282
299
  context.fetch
283
300
  end
284
301
 
302
+ ##
303
+ # Update the DeviceSecretInstance
304
+ # @param [String] value The secret value; up to 4096 characters.
305
+ # @return [DeviceSecretInstance] Updated DeviceSecretInstance
306
+ def update(value: nil)
307
+ context.update(value: value, )
308
+ end
309
+
285
310
  ##
286
311
  # Delete the DeviceSecretInstance
287
312
  # @return [Boolean] true if delete succeeds, false otherwise
@@ -220,7 +220,6 @@ module Twilio
220
220
  @real_time_statistics = nil
221
221
  @cumulative_statistics = nil
222
222
  @task_channels = nil
223
- @bulk_real_time_statistics = nil
224
223
  end
225
224
 
226
225
  ##
@@ -440,21 +439,6 @@ module Twilio
440
439
  @task_channels
441
440
  end
442
441
 
443
- ##
444
- # Access the bulk_real_time_statistics
445
- # @return [TaskQueueBulkRealTimeStatisticsList]
446
- # @return [TaskQueueBulkRealTimeStatisticsContext]
447
- def bulk_real_time_statistics
448
- unless @bulk_real_time_statistics
449
- @bulk_real_time_statistics = TaskQueueBulkRealTimeStatisticsList.new(
450
- @version,
451
- workspace_sid: @solution[:sid],
452
- )
453
- end
454
-
455
- @bulk_real_time_statistics
456
- end
457
-
458
442
  ##
459
443
  # Provide a user friendly representation
460
444
  def to_s
@@ -736,13 +720,6 @@ module Twilio
736
720
  context.task_channels
737
721
  end
738
722
 
739
- ##
740
- # Access the bulk_real_time_statistics
741
- # @return [bulk_real_time_statistics] bulk_real_time_statistics
742
- def bulk_real_time_statistics
743
- context.bulk_real_time_statistics
744
- end
745
-
746
723
  ##
747
724
  # Provide a user friendly representation
748
725
  def to_s
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.74.3'
2
+ VERSION = '5.74.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.74.3
4
+ version: 5.74.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-08 00:00:00.000000000 Z
11
+ date: 2023-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -701,7 +701,6 @@ files:
701
701
  - lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb
702
702
  - lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb
703
703
  - lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb
704
- - lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue_bulk_real_time_statistics.rb
705
704
  - lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb
706
705
  - lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb
707
706
  - lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb
@@ -1,149 +0,0 @@
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 Taskrouter < Domain
12
- class V1 < Version
13
- class WorkspaceContext < InstanceContext
14
- class TaskQueueBulkRealTimeStatisticsList < ListResource
15
- ##
16
- # Initialize the TaskQueueBulkRealTimeStatisticsList
17
- # @param [Version] version Version that contains the resource
18
- # @param [String] workspace_sid The SID of the Workspace that contains the
19
- # TaskQueue.
20
- # @return [TaskQueueBulkRealTimeStatisticsList] TaskQueueBulkRealTimeStatisticsList
21
- def initialize(version, workspace_sid: nil)
22
- super(version)
23
-
24
- # Path Solution
25
- @solution = {workspace_sid: workspace_sid}
26
- @uri = "/Workspaces/#{@solution[:workspace_sid]}/TaskQueues/RealTimeStatistics"
27
- end
28
-
29
- ##
30
- # Create the TaskQueueBulkRealTimeStatisticsInstance
31
- # @return [TaskQueueBulkRealTimeStatisticsInstance] Created TaskQueueBulkRealTimeStatisticsInstance
32
- def create
33
- payload = @version.create('POST', @uri)
34
-
35
- TaskQueueBulkRealTimeStatisticsInstance.new(
36
- @version,
37
- payload,
38
- workspace_sid: @solution[:workspace_sid],
39
- )
40
- end
41
-
42
- ##
43
- # Provide a user friendly representation
44
- def to_s
45
- '#<Twilio.Taskrouter.V1.TaskQueueBulkRealTimeStatisticsList>'
46
- end
47
- end
48
-
49
- class TaskQueueBulkRealTimeStatisticsPage < Page
50
- ##
51
- # Initialize the TaskQueueBulkRealTimeStatisticsPage
52
- # @param [Version] version Version that contains the resource
53
- # @param [Response] response Response from the API
54
- # @param [Hash] solution Path solution for the resource
55
- # @return [TaskQueueBulkRealTimeStatisticsPage] TaskQueueBulkRealTimeStatisticsPage
56
- def initialize(version, response, solution)
57
- super(version, response)
58
-
59
- # Path Solution
60
- @solution = solution
61
- end
62
-
63
- ##
64
- # Build an instance of TaskQueueBulkRealTimeStatisticsInstance
65
- # @param [Hash] payload Payload response from the API
66
- # @return [TaskQueueBulkRealTimeStatisticsInstance] TaskQueueBulkRealTimeStatisticsInstance
67
- def get_instance(payload)
68
- TaskQueueBulkRealTimeStatisticsInstance.new(
69
- @version,
70
- payload,
71
- workspace_sid: @solution[:workspace_sid],
72
- )
73
- end
74
-
75
- ##
76
- # Provide a user friendly representation
77
- def to_s
78
- '<Twilio.Taskrouter.V1.TaskQueueBulkRealTimeStatisticsPage>'
79
- end
80
- end
81
-
82
- class TaskQueueBulkRealTimeStatisticsInstance < InstanceResource
83
- ##
84
- # Initialize the TaskQueueBulkRealTimeStatisticsInstance
85
- # @param [Version] version Version that contains the resource
86
- # @param [Hash] payload payload that contains response from Twilio
87
- # @param [String] workspace_sid The SID of the Workspace that contains the
88
- # TaskQueue.
89
- # @return [TaskQueueBulkRealTimeStatisticsInstance] TaskQueueBulkRealTimeStatisticsInstance
90
- def initialize(version, payload, workspace_sid: nil)
91
- super(version)
92
-
93
- # Marshaled Properties
94
- @properties = {
95
- 'account_sid' => payload['account_sid'],
96
- 'workspace_sid' => payload['workspace_sid'],
97
- 'task_queue_data' => payload['task_queue_data'],
98
- 'task_queue_response_count' => payload['task_queue_response_count'] == nil ? payload['task_queue_response_count'] : payload['task_queue_response_count'].to_i,
99
- 'url' => payload['url'],
100
- }
101
- end
102
-
103
- ##
104
- # @return [String] The SID of the Account that created the resource
105
- def account_sid
106
- @properties['account_sid']
107
- end
108
-
109
- ##
110
- # @return [String] The SID of the Workspace that contains the TaskQueue
111
- def workspace_sid
112
- @properties['workspace_sid']
113
- end
114
-
115
- ##
116
- # @return [Hash] Task Queue data grouped by task_queue_sid
117
- def task_queue_data
118
- @properties['task_queue_data']
119
- end
120
-
121
- ##
122
- # @return [String] The number of TaskQueue statistics received
123
- def task_queue_response_count
124
- @properties['task_queue_response_count']
125
- end
126
-
127
- ##
128
- # @return [String] The absolute URL of the TaskQueue statistics resource
129
- def url
130
- @properties['url']
131
- end
132
-
133
- ##
134
- # Provide a user friendly representation
135
- def to_s
136
- "<Twilio.Taskrouter.V1.TaskQueueBulkRealTimeStatisticsInstance>"
137
- end
138
-
139
- ##
140
- # Provide a detailed, user friendly representation
141
- def inspect
142
- "<Twilio.Taskrouter.V1.TaskQueueBulkRealTimeStatisticsInstance>"
143
- end
144
- end
145
- end
146
- end
147
- end
148
- end
149
- end