twilio-ruby 5.0.0.rc9 → 5.0.0.rc10

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 (132) hide show
  1. checksums.yaml +4 -4
  2. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +2 -9
  3. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +13 -24
  4. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +12 -23
  5. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +6 -15
  6. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -9
  7. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -9
  9. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +9 -18
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +15 -23
  11. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +8 -15
  12. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +9 -18
  13. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +9 -18
  14. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +20 -28
  15. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +15 -24
  16. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +7 -16
  17. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +10 -20
  18. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +2 -10
  19. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +2 -10
  20. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +2 -10
  21. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +12 -23
  22. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +324 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +4 -9
  24. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -18
  25. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +23 -29
  26. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +145 -0
  27. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +145 -0
  28. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +7 -16
  29. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +12 -21
  30. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +13 -23
  31. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +13 -24
  32. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +9 -18
  33. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +8 -17
  34. data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +8 -15
  35. data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +324 -0
  36. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +16 -27
  37. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +14 -24
  38. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -21
  39. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -21
  40. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +23 -31
  41. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +16 -27
  42. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +14 -24
  43. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +1 -8
  44. data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +10 -20
  45. data/lib/twilio-ruby/rest/api/v2010/account/sms/sms_message.rb +13 -23
  46. data/lib/twilio-ruby/rest/api/v2010/account/sms.rb +1 -7
  47. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +2 -7
  48. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +7 -16
  49. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -8
  50. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -8
  51. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -8
  52. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -8
  53. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -8
  54. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -8
  55. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -8
  56. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -8
  57. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -8
  58. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +12 -23
  59. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +1 -6
  60. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +2 -7
  61. data/lib/twilio-ruby/rest/api/v2010/account.rb +131 -38
  62. data/lib/twilio-ruby/rest/api/v2010.rb +17 -1
  63. data/lib/twilio-ruby/rest/api.rb +16 -0
  64. data/lib/twilio-ruby/rest/client.rb +16 -0
  65. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +13 -28
  66. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +11 -21
  67. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +62 -20
  68. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +17 -28
  69. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +12 -23
  70. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +23 -25
  71. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +13 -24
  72. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +1 -1
  73. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +5 -12
  74. data/lib/twilio-ruby/rest/lookups/v1.rb +1 -1
  75. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +5 -14
  76. data/lib/twilio-ruby/rest/monitor/v1/event.rb +4 -13
  77. data/lib/twilio-ruby/rest/monitor/v1.rb +1 -1
  78. data/lib/twilio-ruby/rest/notifications/v1/credential.rb +13 -28
  79. data/lib/twilio-ruby/rest/notifications/v1/service/binding.rb +8 -18
  80. data/lib/twilio-ruby/rest/notifications/v1/service/notification.rb +8 -8
  81. data/lib/twilio-ruby/rest/notifications/v1/service.rb +10 -21
  82. data/lib/twilio-ruby/rest/notifications/v1.rb +1 -1
  83. data/lib/twilio-ruby/rest/preview/wireless/command.rb +4 -14
  84. data/lib/twilio-ruby/rest/preview/wireless/device/usage.rb +6 -13
  85. data/lib/twilio-ruby/rest/preview/wireless/device.rb +8 -19
  86. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +4 -13
  87. data/lib/twilio-ruby/rest/preview/wireless.rb +1 -1
  88. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +4 -13
  89. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -5
  90. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +4 -13
  91. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -5
  92. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +4 -13
  93. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +4 -10
  94. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -6
  95. data/lib/twilio-ruby/rest/pricing/v1.rb +1 -1
  96. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +13 -23
  97. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +6 -15
  98. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +13 -23
  99. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +13 -24
  100. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +8 -15
  101. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +1 -8
  102. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +13 -24
  103. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +8 -15
  104. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -13
  105. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +13 -24
  106. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +8 -15
  107. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +13 -24
  108. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -13
  109. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +15 -26
  110. data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
  111. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +8 -18
  112. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +8 -18
  113. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +12 -23
  114. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +8 -18
  115. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +12 -23
  116. data/lib/twilio-ruby/rest/trunking/v1.rb +1 -1
  117. data/lib/twilio-ruby/version.rb +1 -1
  118. data/spec/integration/api/v2010/account/key_spec.rb +178 -0
  119. data/spec/integration/api/v2010/account/message_spec.rb +2 -3
  120. data/spec/integration/api/v2010/account/new_key_spec.rb +45 -0
  121. data/spec/integration/api/v2010/account/new_signing_key_spec.rb +45 -0
  122. data/spec/integration/api/v2010/account/signing_key_spec.rb +178 -0
  123. data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +3 -7
  124. data/spec/integration/ip_messaging/v1/credential_spec.rb +5 -10
  125. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +37 -0
  126. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +3 -7
  127. data/spec/integration/ip_messaging/v1/service/user_spec.rb +3 -6
  128. data/spec/integration/notifications/v1/credential_spec.rb +5 -10
  129. data/spec/integration/notifications/v1/service/notification_spec.rb +1 -0
  130. data/spec/integration/preview/wireless/device_spec.rb +4 -4
  131. data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +3 -6
  132. metadata +15 -3
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the QueueList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] account_sid The account_sid
17
-
18
17
  # @return [QueueList] QueueList
19
18
  def initialize(version, account_sid: nil)
20
19
  super(version)
@@ -36,7 +35,6 @@ module Twilio
36
35
  # the default value of 50 records. If no page_size is defined
37
36
  # but a limit is defined, stream() will attempt to read the
38
37
  # limit with the most efficient page size, i.e. min(limit, 1000)
39
-
40
38
  # @return [Array] Array of up to limit results
41
39
  def list(limit: nil, page_size: nil)
42
40
  self.stream(
@@ -55,7 +53,6 @@ module Twilio
55
53
  # the default value of 50 records. If no page_size is defined
56
54
  # but a limit is defined, stream() will attempt to read the
57
55
  # limit with the most efficient page size, i.e. min(limit, 1000)
58
-
59
56
  # @return [Enumerable] Enumerable that will yield up to limit results
60
57
  def stream(limit: nil, page_size: nil)
61
58
  limits = @version.read_limits(limit, page_size)
@@ -95,7 +92,6 @@ module Twilio
95
92
  # @param [String] page_token PageToken provided by the API
96
93
  # @param [Integer] page_number Page Number, this value is simply for client state
97
94
  # @param [Integer] page_size Number of records to return, defaults to 50
98
-
99
95
  # @return [Page] Page of QueueInstance
100
96
  def page(page_token: nil, page_number: nil, page_size: nil)
101
97
  params = {
@@ -117,7 +113,6 @@ module Twilio
117
113
  # @param [String] friendly_name A user-provided string that identifies this queue.
118
114
  # @param [String] max_size The upper limit of calls allowed to be in the queue.
119
115
  # The default is 100. The maximum is 1000.
120
-
121
116
  # @return [QueueInstance] Newly created QueueInstance
122
117
  def create(friendly_name: nil, max_size: nil)
123
118
  data = {
@@ -134,7 +129,7 @@ module Twilio
134
129
  return QueueInstance.new(
135
130
  @version,
136
131
  payload,
137
- account_sid: @solution['account_sid'],
132
+ account_sid: @solution[:account_sid],
138
133
  )
139
134
  end
140
135
 
@@ -152,7 +147,6 @@ module Twilio
152
147
  # @param [Response] response Response from the API
153
148
  # @param [Hash] solution Path solution for the resource
154
149
  # @param [String] account_sid The account_sid
155
-
156
150
  # @return [QueuePage] QueuePage
157
151
  def initialize(version, response, solution)
158
152
  super(version, response)
@@ -164,13 +158,12 @@ module Twilio
164
158
  ##
165
159
  # Build an instance of QueueInstance
166
160
  # @param [Hash] payload Payload response from the API
167
-
168
161
  # @return [QueueInstance] QueueInstance
169
162
  def get_instance(payload)
170
163
  return QueueInstance.new(
171
164
  @version,
172
165
  payload,
173
- account_sid: @solution['account_sid'],
166
+ account_sid: @solution[:account_sid],
174
167
  )
175
168
  end
176
169
 
@@ -187,7 +180,6 @@ module Twilio
187
180
  # @param [Version] version Version that contains the resource
188
181
  # @param [String] account_sid The account_sid
189
182
  # @param [String] sid The queue Sid that uniquely identifies this resource
190
-
191
183
  # @return [QueueContext] QueueContext
192
184
  def initialize(version, account_sid, sid)
193
185
  super(version)
@@ -218,8 +210,8 @@ module Twilio
218
210
  return QueueInstance.new(
219
211
  @version,
220
212
  payload,
221
- account_sid: @solution['account_sid'],
222
- sid: @solution['sid'],
213
+ account_sid: @solution[:account_sid],
214
+ sid: @solution[:sid],
223
215
  )
224
216
  end
225
217
 
@@ -228,7 +220,6 @@ module Twilio
228
220
  # @param [String] friendly_name A human readable description of the queue
229
221
  # @param [String] max_size The maximum number of members that can be in the queue
230
222
  # at a time
231
-
232
223
  # @return [QueueInstance] Updated QueueInstance
233
224
  def update(friendly_name: nil, max_size: nil)
234
225
  data = {
@@ -245,8 +236,8 @@ module Twilio
245
236
  return QueueInstance.new(
246
237
  @version,
247
238
  payload,
248
- account_sid: @solution['account_sid'],
249
- sid: @solution['sid'],
239
+ account_sid: @solution[:account_sid],
240
+ sid: @solution[:sid],
250
241
  )
251
242
  end
252
243
 
@@ -296,7 +287,6 @@ module Twilio
296
287
  # @param [Hash] payload payload that contains response from Twilio
297
288
  # @param [String] account_sid The account_sid
298
289
  # @param [String] sid The queue Sid that uniquely identifies this resource
299
-
300
290
  # @return [QueueInstance] QueueInstance
301
291
  def initialize(version, payload, account_sid: nil, sid: nil)
302
292
  super(version)
@@ -326,7 +316,6 @@ module Twilio
326
316
  # Generate an instance context for the instance, the context is capable of
327
317
  # performing various actions. All instance actions are proxied to the context
328
318
  # @param [Version] version Version that contains the resource
329
-
330
319
  # @return [QueueContext] QueueContext for this QueueInstance
331
320
  def context
332
321
  unless @instance_context
@@ -379,7 +368,7 @@ module Twilio
379
368
  # Fetch a QueueInstance
380
369
  # @return [QueueInstance] Fetched QueueInstance
381
370
  def fetch
382
- @context.fetch()
371
+ context.fetch
383
372
  end
384
373
 
385
374
  ##
@@ -387,10 +376,10 @@ module Twilio
387
376
  # @param [String] friendly_name A human readable description of the queue
388
377
  # @param [String] max_size The maximum number of members that can be in the queue
389
378
  # at a time
390
-
391
379
  # @return [QueueInstance] Updated QueueInstance
392
380
  def update(friendly_name: nil, max_size: nil)
393
- @context.update(
381
+ context.update(
382
+ friendly_name: friendly_name,
394
383
  max_size: max_size,
395
384
  )
396
385
  end
@@ -399,21 +388,21 @@ module Twilio
399
388
  # Deletes the QueueInstance
400
389
  # @return [Boolean] true if delete succeeds, true otherwise
401
390
  def delete
402
- @context.delete()
391
+ context.delete
403
392
  end
404
393
 
405
394
  ##
406
395
  # Access the members
407
396
  # @return [members] members
408
397
  def members
409
- @context.members
398
+ context.members
410
399
  end
411
400
 
412
401
  ##
413
402
  # Provide a user friendly representation
414
403
  def to_s
415
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
416
- "<Twilio.Api.V2010.QueueInstance #{context}>"
404
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
405
+ "<Twilio.Api.V2010.QueueInstance #{values}>"
417
406
  end
418
407
  end
419
408
  end
@@ -16,7 +16,6 @@ module Twilio
16
16
  # @param [Version] version Version that contains the resource
17
17
  # @param [String] account_sid The account_sid
18
18
  # @param [String] recording_sid The recording_sid
19
-
20
19
  # @return [TranscriptionList] TranscriptionList
21
20
  def initialize(version, account_sid: nil, recording_sid: nil)
22
21
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # the default value of 50 records. If no page_size is defined
40
39
  # but a limit is defined, stream() will attempt to read the
41
40
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
-
43
41
  # @return [Array] Array of up to limit results
44
42
  def list(limit: nil, page_size: nil)
45
43
  self.stream(
@@ -58,7 +56,6 @@ module Twilio
58
56
  # the default value of 50 records. If no page_size is defined
59
57
  # but a limit is defined, stream() will attempt to read the
60
58
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
-
62
59
  # @return [Enumerable] Enumerable that will yield up to limit results
63
60
  def stream(limit: nil, page_size: nil)
64
61
  limits = @version.read_limits(limit, page_size)
@@ -98,7 +95,6 @@ module Twilio
98
95
  # @param [String] page_token PageToken provided by the API
99
96
  # @param [Integer] page_number Page Number, this value is simply for client state
100
97
  # @param [Integer] page_size Number of records to return, defaults to 50
101
-
102
98
  # @return [Page] Page of TranscriptionInstance
103
99
  def page(page_token: nil, page_number: nil, page_size: nil)
104
100
  params = {
@@ -129,7 +125,6 @@ module Twilio
129
125
  # @param [Hash] solution Path solution for the resource
130
126
  # @param [String] account_sid The account_sid
131
127
  # @param [String] recording_sid The recording_sid
132
-
133
128
  # @return [TranscriptionPage] TranscriptionPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,14 +136,13 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of TranscriptionInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [TranscriptionInstance] TranscriptionInstance
146
140
  def get_instance(payload)
147
141
  return TranscriptionInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
151
- recording_sid: @solution['recording_sid'],
144
+ account_sid: @solution[:account_sid],
145
+ recording_sid: @solution[:recording_sid],
152
146
  )
153
147
  end
154
148
 
@@ -166,7 +160,6 @@ module Twilio
166
160
  # @param [String] account_sid The account_sid
167
161
  # @param [String] recording_sid The recording_sid
168
162
  # @param [String] sid The sid
169
-
170
163
  # @return [TranscriptionContext] TranscriptionContext
171
164
  def initialize(version, account_sid, recording_sid, sid)
172
165
  super(version)
@@ -195,9 +188,9 @@ module Twilio
195
188
  return TranscriptionInstance.new(
196
189
  @version,
197
190
  payload,
198
- account_sid: @solution['account_sid'],
199
- recording_sid: @solution['recording_sid'],
200
- sid: @solution['sid'],
191
+ account_sid: @solution[:account_sid],
192
+ recording_sid: @solution[:recording_sid],
193
+ sid: @solution[:sid],
201
194
  )
202
195
  end
203
196
 
@@ -224,7 +217,6 @@ module Twilio
224
217
  # @param [String] account_sid The account_sid
225
218
  # @param [String] recording_sid The recording_sid
226
219
  # @param [String] sid The sid
227
-
228
220
  # @return [TranscriptionInstance] TranscriptionInstance
229
221
  def initialize(version, payload, account_sid: nil, recording_sid: nil, sid: nil)
230
222
  super(version)
@@ -259,7 +251,6 @@ module Twilio
259
251
  # Generate an instance context for the instance, the context is capable of
260
252
  # performing various actions. All instance actions are proxied to the context
261
253
  # @param [Version] version Version that contains the resource
262
-
263
254
  # @return [TranscriptionContext] TranscriptionContext for this TranscriptionInstance
264
255
  def context
265
256
  unless @instance_context
@@ -329,21 +320,21 @@ module Twilio
329
320
  # Fetch a TranscriptionInstance
330
321
  # @return [TranscriptionInstance] Fetched TranscriptionInstance
331
322
  def fetch
332
- @context.fetch()
323
+ context.fetch
333
324
  end
334
325
 
335
326
  ##
336
327
  # Deletes the TranscriptionInstance
337
328
  # @return [Boolean] true if delete succeeds, true otherwise
338
329
  def delete
339
- @context.delete()
330
+ context.delete
340
331
  end
341
332
 
342
333
  ##
343
334
  # Provide a user friendly representation
344
335
  def to_s
345
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
346
- "<Twilio.Api.V2010.TranscriptionInstance #{context}>"
336
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
337
+ "<Twilio.Api.V2010.TranscriptionInstance #{values}>"
347
338
  end
348
339
  end
349
340
  end
@@ -15,7 +15,6 @@ module Twilio
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] account_sid The unique id of the Account responsible for this
17
17
  # recording.
18
-
19
18
  # @return [RecordingList] RecordingList
20
19
  def initialize(version, account_sid: nil)
21
20
  super(version)
@@ -40,7 +39,6 @@ module Twilio
40
39
  # the default value of 50 records. If no page_size is defined
41
40
  # but a limit is defined, stream() will attempt to read the
42
41
  # limit with the most efficient page size, i.e. min(limit, 1000)
43
-
44
42
  # @return [Array] Array of up to limit results
45
43
  def list(date_created_before: nil, date_created: nil, date_created_after: nil, limit: nil, page_size: nil)
46
44
  self.stream(
@@ -65,7 +63,6 @@ module Twilio
65
63
  # the default value of 50 records. If no page_size is defined
66
64
  # but a limit is defined, stream() will attempt to read the
67
65
  # limit with the most efficient page size, i.e. min(limit, 1000)
68
-
69
66
  # @return [Enumerable] Enumerable that will yield up to limit results
70
67
  def stream(date_created_before: nil, date_created: nil, date_created_after: nil, limit: nil, page_size: nil)
71
68
  limits = @version.read_limits(limit, page_size)
@@ -114,7 +111,6 @@ module Twilio
114
111
  # @param [String] page_token PageToken provided by the API
115
112
  # @param [Integer] page_number Page Number, this value is simply for client state
116
113
  # @param [Integer] page_size Number of records to return, defaults to 50
117
-
118
114
  # @return [Page] Page of RecordingInstance
119
115
  def page(date_created_before: nil, date_created: nil, date_created_after: nil, page_token: nil, page_number: nil, page_size: nil)
120
116
  params = {
@@ -148,7 +144,6 @@ module Twilio
148
144
  # @param [Hash] solution Path solution for the resource
149
145
  # @param [String] account_sid The unique id of the Account responsible for this
150
146
  # recording.
151
-
152
147
  # @return [RecordingPage] RecordingPage
153
148
  def initialize(version, response, solution)
154
149
  super(version, response)
@@ -160,13 +155,12 @@ module Twilio
160
155
  ##
161
156
  # Build an instance of RecordingInstance
162
157
  # @param [Hash] payload Payload response from the API
163
-
164
158
  # @return [RecordingInstance] RecordingInstance
165
159
  def get_instance(payload)
166
160
  return RecordingInstance.new(
167
161
  @version,
168
162
  payload,
169
- account_sid: @solution['account_sid'],
163
+ account_sid: @solution[:account_sid],
170
164
  )
171
165
  end
172
166
 
@@ -183,7 +177,6 @@ module Twilio
183
177
  # @param [Version] version Version that contains the resource
184
178
  # @param [String] account_sid The account_sid
185
179
  # @param [String] sid The recording Sid that uniquely identifies this resource
186
-
187
180
  # @return [RecordingContext] RecordingContext
188
181
  def initialize(version, account_sid, sid)
189
182
  super(version)
@@ -214,8 +207,8 @@ module Twilio
214
207
  return RecordingInstance.new(
215
208
  @version,
216
209
  payload,
217
- account_sid: @solution['account_sid'],
218
- sid: @solution['sid'],
210
+ account_sid: @solution[:account_sid],
211
+ sid: @solution[:sid],
219
212
  )
220
213
  end
221
214
 
@@ -266,7 +259,6 @@ module Twilio
266
259
  # @param [String] account_sid The unique id of the Account responsible for this
267
260
  # recording.
268
261
  # @param [String] sid The recording Sid that uniquely identifies this resource
269
-
270
262
  # @return [RecordingInstance] RecordingInstance
271
263
  def initialize(version, payload, account_sid: nil, sid: nil)
272
264
  super(version)
@@ -295,7 +287,6 @@ module Twilio
295
287
  # Generate an instance context for the instance, the context is capable of
296
288
  # performing various actions. All instance actions are proxied to the context
297
289
  # @param [Version] version Version that contains the resource
298
-
299
290
  # @return [RecordingContext] RecordingContext for this RecordingInstance
300
291
  def context
301
292
  unless @instance_context
@@ -344,28 +335,28 @@ module Twilio
344
335
  # Fetch a RecordingInstance
345
336
  # @return [RecordingInstance] Fetched RecordingInstance
346
337
  def fetch
347
- @context.fetch()
338
+ context.fetch
348
339
  end
349
340
 
350
341
  ##
351
342
  # Deletes the RecordingInstance
352
343
  # @return [Boolean] true if delete succeeds, true otherwise
353
344
  def delete
354
- @context.delete()
345
+ context.delete
355
346
  end
356
347
 
357
348
  ##
358
349
  # Access the transcriptions
359
350
  # @return [transcriptions] transcriptions
360
351
  def transcriptions
361
- @context.transcriptions
352
+ context.transcriptions
362
353
  end
363
354
 
364
355
  ##
365
356
  # Provide a user friendly representation
366
357
  def to_s
367
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
368
- "<Twilio.Api.V2010.RecordingInstance #{context}>"
358
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
359
+ "<Twilio.Api.V2010.RecordingInstance #{values}>"
369
360
  end
370
361
  end
371
362
  end
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the SandboxList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] account_sid The account_sid
17
-
18
17
  # @return [SandboxList] SandboxList
19
18
  def initialize(version, account_sid: nil)
20
19
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # @param [Response] response Response from the API
40
39
  # @param [Hash] solution Path solution for the resource
41
40
  # @param [String] account_sid The account_sid
42
-
43
41
  # @return [SandboxPage] SandboxPage
44
42
  def initialize(version, response, solution)
45
43
  super(version, response)
@@ -51,13 +49,12 @@ module Twilio
51
49
  ##
52
50
  # Build an instance of SandboxInstance
53
51
  # @param [Hash] payload Payload response from the API
54
-
55
52
  # @return [SandboxInstance] SandboxInstance
56
53
  def get_instance(payload)
57
54
  return SandboxInstance.new(
58
55
  @version,
59
56
  payload,
60
- account_sid: @solution['account_sid'],
57
+ account_sid: @solution[:account_sid],
61
58
  )
62
59
  end
63
60
 
@@ -73,7 +70,6 @@ module Twilio
73
70
  # Initialize the SandboxContext
74
71
  # @param [Version] version Version that contains the resource
75
72
  # @param [String] account_sid The account_sid
76
-
77
73
  # @return [SandboxContext] SandboxContext
78
74
  def initialize(version, account_sid)
79
75
  super(version)
@@ -100,7 +96,7 @@ module Twilio
100
96
  return SandboxInstance.new(
101
97
  @version,
102
98
  payload,
103
- account_sid: @solution['account_sid'],
99
+ account_sid: @solution[:account_sid],
104
100
  )
105
101
  end
106
102
 
@@ -112,7 +108,6 @@ module Twilio
112
108
  # @param [String] sms_method The sms_method
113
109
  # @param [String] status_callback The status_callback
114
110
  # @param [String] status_callback_method The status_callback_method
115
-
116
111
  # @return [SandboxInstance] Updated SandboxInstance
117
112
  def update(voice_url: nil, voice_method: nil, sms_url: nil, sms_method: nil, status_callback: nil, status_callback_method: nil)
118
113
  data = {
@@ -133,7 +128,7 @@ module Twilio
133
128
  return SandboxInstance.new(
134
129
  @version,
135
130
  payload,
136
- account_sid: @solution['account_sid'],
131
+ account_sid: @solution[:account_sid],
137
132
  )
138
133
  end
139
134
 
@@ -151,7 +146,6 @@ module Twilio
151
146
  # @param [Version] version Version that contains the resource
152
147
  # @param [Hash] payload payload that contains response from Twilio
153
148
  # @param [String] account_sid The account_sid
154
-
155
149
  # @return [SandboxInstance] SandboxInstance
156
150
  def initialize(version, payload, account_sid: nil)
157
151
  super(version)
@@ -185,7 +179,6 @@ module Twilio
185
179
  # Generate an instance context for the instance, the context is capable of
186
180
  # performing various actions. All instance actions are proxied to the context
187
181
  # @param [Version] version Version that contains the resource
188
-
189
182
  # @return [SandboxContext] SandboxContext for this SandboxInstance
190
183
  def context
191
184
  unless @instance_context
@@ -257,7 +250,7 @@ module Twilio
257
250
  # Fetch a SandboxInstance
258
251
  # @return [SandboxInstance] Fetched SandboxInstance
259
252
  def fetch
260
- @context.fetch()
253
+ context.fetch
261
254
  end
262
255
 
263
256
  ##
@@ -268,10 +261,10 @@ module Twilio
268
261
  # @param [String] sms_method The sms_method
269
262
  # @param [String] status_callback The status_callback
270
263
  # @param [String] status_callback_method The status_callback_method
271
-
272
264
  # @return [SandboxInstance] Updated SandboxInstance
273
265
  def update(voice_url: nil, voice_method: nil, sms_url: nil, sms_method: nil, status_callback: nil, status_callback_method: nil)
274
- @context.update(
266
+ context.update(
267
+ voice_url: voice_url,
275
268
  voice_method: voice_method,
276
269
  sms_url: sms_url,
277
270
  sms_method: sms_method,
@@ -283,8 +276,8 @@ module Twilio
283
276
  ##
284
277
  # Provide a user friendly representation
285
278
  def to_s
286
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
287
- "<Twilio.Api.V2010.SandboxInstance #{context}>"
279
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
280
+ "<Twilio.Api.V2010.SandboxInstance #{values}>"
288
281
  end
289
282
  end
290
283
  end