twilio-ruby 5.14.1 → 5.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +33 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -1
  5. data/lib/twilio-ruby/rest/authy.rb +55 -0
  6. data/lib/twilio-ruby/rest/authy/v1.rb +59 -0
  7. data/lib/twilio-ruby/rest/authy/v1/form.rb +190 -0
  8. data/lib/twilio-ruby/rest/authy/v1/service.rb +378 -0
  9. data/lib/twilio-ruby/rest/authy/v1/service/entity.rb +372 -0
  10. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +474 -0
  11. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +405 -0
  12. data/lib/twilio-ruby/rest/autopilot.rb +47 -0
  13. data/lib/twilio-ruby/rest/autopilot/v1.rb +43 -0
  14. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +606 -0
  15. data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +215 -0
  16. data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +205 -0
  17. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +417 -0
  18. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +393 -0
  19. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +390 -0
  20. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +443 -0
  21. data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +215 -0
  22. data/lib/twilio-ruby/rest/{preview/understand/assistant/intent.rb → autopilot/v1/assistant/task.rb} +91 -84
  23. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +377 -0
  24. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +442 -0
  25. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +244 -0
  26. data/lib/twilio-ruby/rest/{preview/understand/assistant/intent/intent_statistics.rb → autopilot/v1/assistant/task/task_statistics.rb} +49 -51
  27. data/lib/twilio-ruby/rest/chat/v1/service.rb +1 -1
  28. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +12 -6
  29. data/lib/twilio-ruby/rest/client.rb +14 -0
  30. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +1 -1
  31. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +12 -6
  32. data/lib/twilio-ruby/rest/preview/understand.rb +2 -1
  33. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +59 -29
  34. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +17 -13
  35. data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +215 -0
  36. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +505 -0
  37. data/lib/twilio-ruby/rest/preview/understand/assistant/{intent → task}/field.rb +25 -25
  38. data/lib/twilio-ruby/rest/preview/understand/assistant/{intent → task}/sample.rb +30 -30
  39. data/lib/twilio-ruby/rest/preview/understand/assistant/{intent/intent_actions.rb → task/task_actions.rb} +50 -54
  40. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +224 -0
  41. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +7 -7
  42. data/lib/twilio-ruby/rest/verify/v1/service.rb +45 -6
  43. data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +9 -2
  44. data/lib/twilio-ruby/rest/wireless/v1/command.rb +32 -5
  45. data/lib/twilio-ruby/twiml/voice_response.rb +66 -5
  46. data/lib/twilio-ruby/version.rb +1 -1
  47. data/spec/integration/api/v2010/account/call/recording_spec.rb +3 -3
  48. data/spec/integration/api/v2010/account/conference/participant_spec.rb +42 -1
  49. data/spec/integration/api/v2010/account/conference/recording_spec.rb +2 -2
  50. data/spec/integration/authy/v1/form_spec.rb +48 -0
  51. data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +267 -0
  52. data/spec/integration/authy/v1/service/entity/factor_spec.rb +269 -0
  53. data/spec/integration/authy/v1/service/entity_spec.rb +201 -0
  54. data/spec/integration/authy/v1/service_spec.rb +227 -0
  55. data/spec/integration/autopilot/v1/assistant/defaults_spec.rb +81 -0
  56. data/spec/integration/autopilot/v1/assistant/dialogue_spec.rb +47 -0
  57. data/spec/integration/autopilot/v1/assistant/field_type/field_value_spec.rb +210 -0
  58. data/spec/integration/autopilot/v1/assistant/field_type_spec.rb +246 -0
  59. data/spec/integration/autopilot/v1/assistant/model_build_spec.rb +241 -0
  60. data/spec/integration/autopilot/v1/assistant/query_spec.rb +306 -0
  61. data/spec/integration/autopilot/v1/assistant/style_sheet_spec.rb +81 -0
  62. data/spec/integration/autopilot/v1/assistant/task/field_spec.rb +207 -0
  63. data/spec/integration/autopilot/v1/assistant/task/sample_spec.rb +253 -0
  64. data/spec/integration/autopilot/v1/assistant/task/task_actions_spec.rb +87 -0
  65. data/spec/integration/autopilot/v1/assistant/task/task_statistics_spec.rb +50 -0
  66. data/spec/integration/autopilot/v1/assistant/task_spec.rb +262 -0
  67. data/spec/integration/autopilot/v1/assistant_spec.rb +270 -0
  68. data/spec/integration/preview/understand/assistant/query_spec.rb +8 -8
  69. data/spec/integration/preview/understand/assistant/style_sheet_spec.rb +81 -0
  70. data/spec/integration/preview/understand/assistant/{intent → task}/field_spec.rb +23 -23
  71. data/spec/integration/preview/understand/assistant/{intent → task}/sample_spec.rb +28 -28
  72. data/spec/integration/preview/understand/assistant/{intent/intent_actions_spec.rb → task/task_actions_spec.rb} +15 -15
  73. data/spec/integration/preview/understand/assistant/{intent/intent_statistics_spec.rb → task/task_statistics_spec.rb} +6 -6
  74. data/spec/integration/preview/understand/assistant/{intent_spec.rb → task_spec.rb} +53 -49
  75. data/spec/integration/preview/understand/assistant_spec.rb +12 -8
  76. data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +3 -7
  77. data/spec/integration/verify/v1/service_spec.rb +30 -0
  78. data/spec/integration/wireless/v1/command_spec.rb +99 -2
  79. data/spec/twiml/voice_response_spec.rb +25 -2
  80. metadata +78 -17
@@ -0,0 +1,224 @@
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 Preview < Domain
12
+ class Understand < Version
13
+ class AssistantContext < InstanceContext
14
+ class TaskContext < InstanceContext
15
+ ##
16
+ # 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.
17
+ class TaskStatisticsList < ListResource
18
+ ##
19
+ # Initialize the TaskStatisticsList
20
+ # @param [Version] version Version that contains the resource
21
+ # @param [String] assistant_sid The unique ID of the parent Assistant.
22
+ # @param [String] task_sid The unique ID of the Task associated with this Field.
23
+ # @return [TaskStatisticsList] TaskStatisticsList
24
+ def initialize(version, assistant_sid: nil, task_sid: nil)
25
+ super(version)
26
+
27
+ # Path Solution
28
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid}
29
+ end
30
+
31
+ ##
32
+ # Provide a user friendly representation
33
+ def to_s
34
+ '#<Twilio.Preview.Understand.TaskStatisticsList>'
35
+ end
36
+ end
37
+
38
+ ##
39
+ # 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.
40
+ class TaskStatisticsPage < Page
41
+ ##
42
+ # Initialize the TaskStatisticsPage
43
+ # @param [Version] version Version that contains the resource
44
+ # @param [Response] response Response from the API
45
+ # @param [Hash] solution Path solution for the resource
46
+ # @return [TaskStatisticsPage] TaskStatisticsPage
47
+ def initialize(version, response, solution)
48
+ super(version, response)
49
+
50
+ # Path Solution
51
+ @solution = solution
52
+ end
53
+
54
+ ##
55
+ # Build an instance of TaskStatisticsInstance
56
+ # @param [Hash] payload Payload response from the API
57
+ # @return [TaskStatisticsInstance] TaskStatisticsInstance
58
+ def get_instance(payload)
59
+ TaskStatisticsInstance.new(
60
+ @version,
61
+ payload,
62
+ assistant_sid: @solution[:assistant_sid],
63
+ task_sid: @solution[:task_sid],
64
+ )
65
+ end
66
+
67
+ ##
68
+ # Provide a user friendly representation
69
+ def to_s
70
+ '<Twilio.Preview.Understand.TaskStatisticsPage>'
71
+ end
72
+ end
73
+
74
+ ##
75
+ # 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.
76
+ class TaskStatisticsContext < InstanceContext
77
+ ##
78
+ # Initialize the TaskStatisticsContext
79
+ # @param [Version] version Version that contains the resource
80
+ # @param [String] assistant_sid The unique ID of the parent Assistant.
81
+ # @param [String] task_sid The unique ID of the Task associated with this Field.
82
+ # @return [TaskStatisticsContext] TaskStatisticsContext
83
+ def initialize(version, assistant_sid, task_sid)
84
+ super(version)
85
+
86
+ # Path Solution
87
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid, }
88
+ @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Statistics"
89
+ end
90
+
91
+ ##
92
+ # Fetch a TaskStatisticsInstance
93
+ # @return [TaskStatisticsInstance] Fetched TaskStatisticsInstance
94
+ def fetch
95
+ params = Twilio::Values.of({})
96
+
97
+ payload = @version.fetch(
98
+ 'GET',
99
+ @uri,
100
+ params,
101
+ )
102
+
103
+ TaskStatisticsInstance.new(
104
+ @version,
105
+ payload,
106
+ assistant_sid: @solution[:assistant_sid],
107
+ task_sid: @solution[:task_sid],
108
+ )
109
+ end
110
+
111
+ ##
112
+ # Provide a user friendly representation
113
+ def to_s
114
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
115
+ "#<Twilio.Preview.Understand.TaskStatisticsContext #{context}>"
116
+ end
117
+ end
118
+
119
+ ##
120
+ # 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.
121
+ class TaskStatisticsInstance < InstanceResource
122
+ ##
123
+ # Initialize the TaskStatisticsInstance
124
+ # @param [Version] version Version that contains the resource
125
+ # @param [Hash] payload payload that contains response from Twilio
126
+ # @param [String] assistant_sid The unique ID of the parent Assistant.
127
+ # @param [String] task_sid The unique ID of the Task associated with this Field.
128
+ # @return [TaskStatisticsInstance] TaskStatisticsInstance
129
+ def initialize(version, payload, assistant_sid: nil, task_sid: nil)
130
+ super(version)
131
+
132
+ # Marshaled Properties
133
+ @properties = {
134
+ 'account_sid' => payload['account_sid'],
135
+ 'assistant_sid' => payload['assistant_sid'],
136
+ 'task_sid' => payload['task_sid'],
137
+ 'samples_count' => payload['samples_count'].to_i,
138
+ 'fields_count' => payload['fields_count'].to_i,
139
+ 'url' => payload['url'],
140
+ }
141
+
142
+ # Context
143
+ @instance_context = nil
144
+ @params = {'assistant_sid' => assistant_sid, 'task_sid' => task_sid, }
145
+ end
146
+
147
+ ##
148
+ # Generate an instance context for the instance, the context is capable of
149
+ # performing various actions. All instance actions are proxied to the context
150
+ # @return [TaskStatisticsContext] TaskStatisticsContext for this TaskStatisticsInstance
151
+ def context
152
+ unless @instance_context
153
+ @instance_context = TaskStatisticsContext.new(
154
+ @version,
155
+ @params['assistant_sid'],
156
+ @params['task_sid'],
157
+ )
158
+ end
159
+ @instance_context
160
+ end
161
+
162
+ ##
163
+ # @return [String] The unique ID of the Account that created this Field.
164
+ def account_sid
165
+ @properties['account_sid']
166
+ end
167
+
168
+ ##
169
+ # @return [String] The unique ID of the parent Assistant.
170
+ def assistant_sid
171
+ @properties['assistant_sid']
172
+ end
173
+
174
+ ##
175
+ # @return [String] The unique ID of the Task associated with this Field.
176
+ def task_sid
177
+ @properties['task_sid']
178
+ end
179
+
180
+ ##
181
+ # @return [String] The total number of Samples associated with this Task.
182
+ def samples_count
183
+ @properties['samples_count']
184
+ end
185
+
186
+ ##
187
+ # @return [String] The total number of Fields associated with this Task.
188
+ def fields_count
189
+ @properties['fields_count']
190
+ end
191
+
192
+ ##
193
+ # @return [String] The url
194
+ def url
195
+ @properties['url']
196
+ end
197
+
198
+ ##
199
+ # Fetch a TaskStatisticsInstance
200
+ # @return [TaskStatisticsInstance] Fetched TaskStatisticsInstance
201
+ def fetch
202
+ context.fetch
203
+ end
204
+
205
+ ##
206
+ # Provide a user friendly representation
207
+ def to_s
208
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
209
+ "<Twilio.Preview.Understand.TaskStatisticsInstance #{values}>"
210
+ end
211
+
212
+ ##
213
+ # Provide a detailed, user friendly representation
214
+ def inspect
215
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
216
+ "<Twilio.Preview.Understand.TaskStatisticsInstance #{values}>"
217
+ end
218
+ end
219
+ end
220
+ end
221
+ end
222
+ end
223
+ end
224
+ end
@@ -147,10 +147,6 @@ module Twilio
147
147
  # Request is executed immediately.
148
148
  # @param [String] friendly_name Human readable description of this TaskQueue (for
149
149
  # example "Support – Tier 1", "Sales" or "Escalation")
150
- # @param [String] reservation_activity_sid ActivitySID to assign workers once a
151
- # task is reserved for them
152
- # @param [String] assignment_activity_sid ActivitySID to assign workers once a
153
- # task is assigned for them
154
150
  # @param [String] target_workers A string describing the Worker selection criteria
155
151
  # for any Tasks that enter this TaskQueue. For example `'"language" == "spanish"'`
156
152
  # If no TargetWorkers parameter is provided, Tasks will wait in this TaskQueue
@@ -164,15 +160,19 @@ module Twilio
164
160
  # recently created Task first or FIFO to assign the oldest Task. Default is FIFO.
165
161
  # [Click here](https://www.twilio.com/docs/api/taskrouter/last-first-out-lifo) to
166
162
  # learn more.
163
+ # @param [String] reservation_activity_sid ActivitySID to assign workers once a
164
+ # task is reserved for them
165
+ # @param [String] assignment_activity_sid ActivitySID to assign workers once a
166
+ # task is assigned for them
167
167
  # @return [TaskQueueInstance] Newly created TaskQueueInstance
168
- def create(friendly_name: nil, reservation_activity_sid: nil, assignment_activity_sid: nil, target_workers: :unset, max_reserved_workers: :unset, task_order: :unset)
168
+ def create(friendly_name: nil, target_workers: :unset, max_reserved_workers: :unset, task_order: :unset, reservation_activity_sid: :unset, assignment_activity_sid: :unset)
169
169
  data = Twilio::Values.of({
170
170
  'FriendlyName' => friendly_name,
171
- 'ReservationActivitySid' => reservation_activity_sid,
172
- 'AssignmentActivitySid' => assignment_activity_sid,
173
171
  'TargetWorkers' => target_workers,
174
172
  'MaxReservedWorkers' => max_reserved_workers,
175
173
  'TaskOrder' => task_order,
174
+ 'ReservationActivitySid' => reservation_activity_sid,
175
+ 'AssignmentActivitySid' => assignment_activity_sid,
176
176
  })
177
177
 
178
178
  payload = @version.create(
@@ -32,9 +32,15 @@ module Twilio
32
32
  # service
33
33
  # @param [String] code_length The length of the verification code to be generated.
34
34
  # Must be an integer value between 4-10
35
+ # @param [Boolean] lookup_enabled Boolean value that indicates if a lookup should
36
+ # be performed with each verification started and associated info returned
35
37
  # @return [ServiceInstance] Newly created ServiceInstance
36
- def create(friendly_name: nil, code_length: :unset)
37
- data = Twilio::Values.of({'FriendlyName' => friendly_name, 'CodeLength' => code_length, })
38
+ def create(friendly_name: nil, code_length: :unset, lookup_enabled: :unset)
39
+ data = Twilio::Values.of({
40
+ 'FriendlyName' => friendly_name,
41
+ 'CodeLength' => code_length,
42
+ 'LookupEnabled' => lookup_enabled,
43
+ })
38
44
 
39
45
  payload = @version.create(
40
46
  'POST',
@@ -200,15 +206,28 @@ module Twilio
200
206
  ServiceInstance.new(@version, payload, sid: @solution[:sid], )
201
207
  end
202
208
 
209
+ ##
210
+ # Deletes the ServiceInstance
211
+ # @return [Boolean] true if delete succeeds, true otherwise
212
+ def delete
213
+ @version.delete('delete', @uri)
214
+ end
215
+
203
216
  ##
204
217
  # Update the ServiceInstance
205
218
  # @param [String] friendly_name A 1-64 character string with friendly name of
206
219
  # service
207
220
  # @param [String] code_length The length of the verification code to be generated.
208
221
  # Must be an integer value between 4-10
222
+ # @param [Boolean] lookup_enabled Boolean value that indicates if a lookup should
223
+ # be performed with each verification started and associated info returned
209
224
  # @return [ServiceInstance] Updated ServiceInstance
210
- def update(friendly_name: :unset, code_length: :unset)
211
- data = Twilio::Values.of({'FriendlyName' => friendly_name, 'CodeLength' => code_length, })
225
+ def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset)
226
+ data = Twilio::Values.of({
227
+ 'FriendlyName' => friendly_name,
228
+ 'CodeLength' => code_length,
229
+ 'LookupEnabled' => lookup_enabled,
230
+ })
212
231
 
213
232
  payload = @version.update(
214
233
  'POST',
@@ -269,6 +288,7 @@ module Twilio
269
288
  'account_sid' => payload['account_sid'],
270
289
  'friendly_name' => payload['friendly_name'],
271
290
  'code_length' => payload['code_length'].to_i,
291
+ 'lookup_enabled' => payload['lookup_enabled'],
272
292
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
273
293
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
274
294
  'url' => payload['url'],
@@ -315,6 +335,12 @@ module Twilio
315
335
  @properties['code_length']
316
336
  end
317
337
 
338
+ ##
339
+ # @return [Boolean] Indicates whether or not to perform a lookup with each verification started
340
+ def lookup_enabled
341
+ @properties['lookup_enabled']
342
+ end
343
+
318
344
  ##
319
345
  # @return [Time] The date this Service was created
320
346
  def date_created
@@ -346,15 +372,28 @@ module Twilio
346
372
  context.fetch
347
373
  end
348
374
 
375
+ ##
376
+ # Deletes the ServiceInstance
377
+ # @return [Boolean] true if delete succeeds, true otherwise
378
+ def delete
379
+ context.delete
380
+ end
381
+
349
382
  ##
350
383
  # Update the ServiceInstance
351
384
  # @param [String] friendly_name A 1-64 character string with friendly name of
352
385
  # service
353
386
  # @param [String] code_length The length of the verification code to be generated.
354
387
  # Must be an integer value between 4-10
388
+ # @param [Boolean] lookup_enabled Boolean value that indicates if a lookup should
389
+ # be performed with each verification started and associated info returned
355
390
  # @return [ServiceInstance] Updated ServiceInstance
356
- def update(friendly_name: :unset, code_length: :unset)
357
- context.update(friendly_name: friendly_name, code_length: code_length, )
391
+ def update(friendly_name: :unset, code_length: :unset, lookup_enabled: :unset)
392
+ context.update(
393
+ friendly_name: friendly_name,
394
+ code_length: code_length,
395
+ lookup_enabled: lookup_enabled,
396
+ )
358
397
  end
359
398
 
360
399
  ##
@@ -35,9 +35,16 @@ module Twilio
35
35
  # sms or call
36
36
  # @param [String] custom_message A character string containing a custom message
37
37
  # for this verification
38
+ # @param [String] send_digits Digits to send when a phone call is started, same
39
+ # parameters as in Programmable Voice are supported
38
40
  # @return [VerificationInstance] Newly created VerificationInstance
39
- def create(to: nil, channel: nil, custom_message: :unset)
40
- data = Twilio::Values.of({'To' => to, 'Channel' => channel, 'CustomMessage' => custom_message, })
41
+ def create(to: nil, channel: nil, custom_message: :unset, send_digits: :unset)
42
+ data = Twilio::Values.of({
43
+ 'To' => to,
44
+ 'Channel' => channel,
45
+ 'CustomMessage' => custom_message,
46
+ 'SendDigits' => send_digits,
47
+ })
41
48
 
42
49
  payload = @version.create(
43
50
  'POST',
@@ -31,6 +31,7 @@ module Twilio
31
31
  # @param [command.Status] status Only return Commands with this status value.
32
32
  # @param [command.Direction] direction Only return Commands with this direction
33
33
  # value.
34
+ # @param [command.Transport] transport The transport
34
35
  # @param [Integer] limit Upper limit for the number of records to return. stream()
35
36
  # guarantees to never return more than limit. Default is no limit
36
37
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -38,11 +39,12 @@ module Twilio
38
39
  # but a limit is defined, stream() will attempt to read the limit with the most
39
40
  # efficient page size, i.e. min(limit, 1000)
40
41
  # @return [Array] Array of up to limit results
41
- def list(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
42
+ def list(sim: :unset, status: :unset, direction: :unset, transport: :unset, limit: nil, page_size: nil)
42
43
  self.stream(
43
44
  sim: sim,
44
45
  status: status,
45
46
  direction: direction,
47
+ transport: transport,
46
48
  limit: limit,
47
49
  page_size: page_size
48
50
  ).entries
@@ -56,6 +58,7 @@ module Twilio
56
58
  # @param [command.Status] status Only return Commands with this status value.
57
59
  # @param [command.Direction] direction Only return Commands with this direction
58
60
  # value.
61
+ # @param [command.Transport] transport The transport
59
62
  # @param [Integer] limit Upper limit for the number of records to return. stream()
60
63
  # guarantees to never return more than limit. Default is no limit.
61
64
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -63,10 +66,16 @@ module Twilio
63
66
  # but a limit is defined, stream() will attempt to read the limit with the most
64
67
  # efficient page size, i.e. min(limit, 1000)
65
68
  # @return [Enumerable] Enumerable that will yield up to limit results
66
- def stream(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
69
+ def stream(sim: :unset, status: :unset, direction: :unset, transport: :unset, limit: nil, page_size: nil)
67
70
  limits = @version.read_limits(limit, page_size)
68
71
 
69
- page = self.page(sim: sim, status: status, direction: direction, page_size: limits[:page_size], )
72
+ page = self.page(
73
+ sim: sim,
74
+ status: status,
75
+ direction: direction,
76
+ transport: transport,
77
+ page_size: limits[:page_size],
78
+ )
70
79
 
71
80
  @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
72
81
  end
@@ -92,15 +101,17 @@ module Twilio
92
101
  # @param [command.Status] status Only return Commands with this status value.
93
102
  # @param [command.Direction] direction Only return Commands with this direction
94
103
  # value.
104
+ # @param [command.Transport] transport The transport
95
105
  # @param [String] page_token PageToken provided by the API
96
106
  # @param [Integer] page_number Page Number, this value is simply for client state
97
107
  # @param [Integer] page_size Number of records to return, defaults to 50
98
108
  # @return [Page] Page of CommandInstance
99
- def page(sim: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
109
+ def page(sim: :unset, status: :unset, direction: :unset, transport: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
100
110
  params = Twilio::Values.of({
101
111
  'Sim' => sim,
102
112
  'Status' => status,
103
113
  'Direction' => direction,
114
+ 'Transport' => transport,
104
115
  'PageToken' => page_token,
105
116
  'Page' => page_number,
106
117
  'PageSize' => page_size,
@@ -150,8 +161,9 @@ module Twilio
150
161
  # CommandSid and the message body. The length of the CommandSid contributes toward
151
162
  # the 160 character limit, i.e. the SMS body must be 128 characters or less before
152
163
  # the Command Sid is included.
164
+ # @param [Boolean] delivery_receipt_requested The delivery_receipt_requested
153
165
  # @return [CommandInstance] Newly created CommandInstance
154
- def create(command: nil, sim: :unset, callback_method: :unset, callback_url: :unset, command_mode: :unset, include_sid: :unset)
166
+ def create(command: nil, sim: :unset, callback_method: :unset, callback_url: :unset, command_mode: :unset, include_sid: :unset, delivery_receipt_requested: :unset)
155
167
  data = Twilio::Values.of({
156
168
  'Command' => command,
157
169
  'Sim' => sim,
@@ -159,6 +171,7 @@ module Twilio
159
171
  'CallbackUrl' => callback_url,
160
172
  'CommandMode' => command_mode,
161
173
  'IncludeSid' => include_sid,
174
+ 'DeliveryReceiptRequested' => delivery_receipt_requested,
162
175
  })
163
176
 
164
177
  payload = @version.create(
@@ -260,6 +273,8 @@ module Twilio
260
273
  'sim_sid' => payload['sim_sid'],
261
274
  'command' => payload['command'],
262
275
  'command_mode' => payload['command_mode'],
276
+ 'transport' => payload['transport'],
277
+ 'delivery_receipt_requested' => payload['delivery_receipt_requested'],
263
278
  'status' => payload['status'],
264
279
  'direction' => payload['direction'],
265
280
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
@@ -313,6 +328,18 @@ module Twilio
313
328
  @properties['command_mode']
314
329
  end
315
330
 
331
+ ##
332
+ # @return [command.Transport] The transport
333
+ def transport
334
+ @properties['transport']
335
+ end
336
+
337
+ ##
338
+ # @return [Boolean] The delivery_receipt_requested
339
+ def delivery_receipt_requested
340
+ @properties['delivery_receipt_requested']
341
+ end
342
+
316
343
  ##
317
344
  # @return [command.Status] A string representing the status of the Command.
318
345
  def status