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
@@ -16,7 +16,6 @@ module Twilio
16
16
  # @param [Version] version Version that contains the resource
17
17
  # @param [String] account_sid A 34 character string that uniquely identifies this
18
18
  # resource.
19
-
20
19
  # @return [SmsMessageList] SmsMessageList
21
20
  def initialize(version, account_sid: nil)
22
21
  super(version)
@@ -37,7 +36,6 @@ module Twilio
37
36
  # @param [String] application_sid The application_sid
38
37
  # @param [String] body The body
39
38
  # @param [String] media_url The media_url
40
-
41
39
  # @return [SmsMessageInstance] Newly created SmsMessageInstance
42
40
  def create(to: nil, from: nil, status_callback: nil, application_sid: nil, body: nil, media_url: nil)
43
41
  data = {
@@ -58,7 +56,7 @@ module Twilio
58
56
  return SmsMessageInstance.new(
59
57
  @version,
60
58
  payload,
61
- account_sid: @solution['account_sid'],
59
+ account_sid: @solution[:account_sid],
62
60
  )
63
61
  end
64
62
 
@@ -77,7 +75,6 @@ module Twilio
77
75
  # the default value of 50 records. If no page_size is defined
78
76
  # but a limit is defined, stream() will attempt to read the
79
77
  # limit with the most efficient page size, i.e. min(limit, 1000)
80
-
81
78
  # @return [Array] Array of up to limit results
82
79
  def list(to: nil, from: nil, date_sent_before: nil, date_sent: nil, date_sent_after: nil, limit: nil, page_size: nil)
83
80
  self.stream(
@@ -106,7 +103,6 @@ module Twilio
106
103
  # the default value of 50 records. If no page_size is defined
107
104
  # but a limit is defined, stream() will attempt to read the
108
105
  # limit with the most efficient page size, i.e. min(limit, 1000)
109
-
110
106
  # @return [Enumerable] Enumerable that will yield up to limit results
111
107
  def stream(to: nil, from: nil, date_sent_before: nil, date_sent: nil, date_sent_after: nil, limit: nil, page_size: nil)
112
108
  limits = @version.read_limits(limit, page_size)
@@ -161,7 +157,6 @@ module Twilio
161
157
  # @param [String] page_token PageToken provided by the API
162
158
  # @param [Integer] page_number Page Number, this value is simply for client state
163
159
  # @param [Integer] page_size Number of records to return, defaults to 50
164
-
165
160
  # @return [Page] Page of SmsMessageInstance
166
161
  def page(to: nil, from: nil, date_sent_before: nil, date_sent: nil, date_sent_after: nil, page_token: nil, page_number: nil, page_size: nil)
167
162
  params = {
@@ -197,7 +192,6 @@ module Twilio
197
192
  # @param [Hash] solution Path solution for the resource
198
193
  # @param [String] account_sid A 34 character string that uniquely identifies this
199
194
  # resource.
200
-
201
195
  # @return [SmsMessagePage] SmsMessagePage
202
196
  def initialize(version, response, solution)
203
197
  super(version, response)
@@ -209,13 +203,12 @@ module Twilio
209
203
  ##
210
204
  # Build an instance of SmsMessageInstance
211
205
  # @param [Hash] payload Payload response from the API
212
-
213
206
  # @return [SmsMessageInstance] SmsMessageInstance
214
207
  def get_instance(payload)
215
208
  return SmsMessageInstance.new(
216
209
  @version,
217
210
  payload,
218
- account_sid: @solution['account_sid'],
211
+ account_sid: @solution[:account_sid],
219
212
  )
220
213
  end
221
214
 
@@ -232,7 +225,6 @@ module Twilio
232
225
  # @param [Version] version Version that contains the resource
233
226
  # @param [String] account_sid The account_sid
234
227
  # @param [String] sid The sid
235
-
236
228
  # @return [SmsMessageContext] SmsMessageContext
237
229
  def initialize(version, account_sid, sid)
238
230
  super(version)
@@ -267,15 +259,14 @@ module Twilio
267
259
  return SmsMessageInstance.new(
268
260
  @version,
269
261
  payload,
270
- account_sid: @solution['account_sid'],
271
- sid: @solution['sid'],
262
+ account_sid: @solution[:account_sid],
263
+ sid: @solution[:sid],
272
264
  )
273
265
  end
274
266
 
275
267
  ##
276
268
  # Update the SmsMessageInstance
277
269
  # @param [String] body The body
278
-
279
270
  # @return [SmsMessageInstance] Updated SmsMessageInstance
280
271
  def update(body: nil)
281
272
  data = {
@@ -291,8 +282,8 @@ module Twilio
291
282
  return SmsMessageInstance.new(
292
283
  @version,
293
284
  payload,
294
- account_sid: @solution['account_sid'],
295
- sid: @solution['sid'],
285
+ account_sid: @solution[:account_sid],
286
+ sid: @solution[:sid],
296
287
  )
297
288
  end
298
289
 
@@ -312,7 +303,6 @@ module Twilio
312
303
  # @param [String] account_sid A 34 character string that uniquely identifies this
313
304
  # resource.
314
305
  # @param [String] sid The sid
315
-
316
306
  # @return [SmsMessageInstance] SmsMessageInstance
317
307
  def initialize(version, payload, account_sid: nil, sid: nil)
318
308
  super(version)
@@ -347,7 +337,6 @@ module Twilio
347
337
  # Generate an instance context for the instance, the context is capable of
348
338
  # performing various actions. All instance actions are proxied to the context
349
339
  # @param [Version] version Version that contains the resource
350
-
351
340
  # @return [SmsMessageContext] SmsMessageContext for this SmsMessageInstance
352
341
  def context
353
342
  unless @instance_context
@@ -420,30 +409,31 @@ module Twilio
420
409
  # Deletes the SmsMessageInstance
421
410
  # @return [Boolean] true if delete succeeds, true otherwise
422
411
  def delete
423
- @context.delete()
412
+ context.delete
424
413
  end
425
414
 
426
415
  ##
427
416
  # Fetch a SmsMessageInstance
428
417
  # @return [SmsMessageInstance] Fetched SmsMessageInstance
429
418
  def fetch
430
- @context.fetch()
419
+ context.fetch
431
420
  end
432
421
 
433
422
  ##
434
423
  # Update the SmsMessageInstance
435
424
  # @param [String] body The body
436
-
437
425
  # @return [SmsMessageInstance] Updated SmsMessageInstance
438
426
  def update(body: nil)
439
- @context.update()
427
+ context.update(
428
+ body: body,
429
+ )
440
430
  end
441
431
 
442
432
  ##
443
433
  # Provide a user friendly representation
444
434
  def to_s
445
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
446
- "<Twilio.Api.V2010.SmsMessageInstance #{context}>"
435
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
436
+ "<Twilio.Api.V2010.SmsMessageInstance #{values}>"
447
437
  end
448
438
  end
449
439
  end
@@ -15,7 +15,6 @@ module Twilio
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] account_sid A 34 character string that uniquely identifies this
17
17
  # resource.
18
-
19
18
  # @return [SmsList] SmsList
20
19
  def initialize(version, account_sid: nil)
21
20
  super(version)
@@ -33,7 +32,6 @@ module Twilio
33
32
  ##
34
33
  # Access the messages
35
34
  # @param [String] sid The sid
36
-
37
35
  # @return [SmsMessageList] SmsMessageList
38
36
  def messages(sid=:unset)
39
37
  if sid != :unset
@@ -53,7 +51,6 @@ module Twilio
53
51
  ##
54
52
  # Access the short_codes
55
53
  # @param [String] sid The short-code Sid that uniquely identifies this resource
56
-
57
54
  # @return [ShortCodeList] ShortCodeList
58
55
  def short_codes(sid=:unset)
59
56
  if sid != :unset
@@ -85,7 +82,6 @@ module Twilio
85
82
  # @param [Hash] solution Path solution for the resource
86
83
  # @param [String] account_sid A 34 character string that uniquely identifies this
87
84
  # resource.
88
-
89
85
  # @return [SmsPage] SmsPage
90
86
  def initialize(version, response, solution)
91
87
  super(version, response)
@@ -97,13 +93,12 @@ module Twilio
97
93
  ##
98
94
  # Build an instance of SmsInstance
99
95
  # @param [Hash] payload Payload response from the API
100
-
101
96
  # @return [SmsInstance] SmsInstance
102
97
  def get_instance(payload)
103
98
  return SmsInstance.new(
104
99
  @version,
105
100
  payload,
106
- account_sid: @solution['account_sid'],
101
+ account_sid: @solution[:account_sid],
107
102
  )
108
103
  end
109
104
 
@@ -121,7 +116,6 @@ module Twilio
121
116
  # @param [Hash] payload payload that contains response from Twilio
122
117
  # @param [String] account_sid A 34 character string that uniquely identifies this
123
118
  # resource.
124
-
125
119
  # @return [SmsInstance] SmsInstance
126
120
  def initialize(version, payload, account_sid: nil)
127
121
  super(version)
@@ -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 that created this
17
17
  # Token.
18
-
19
18
  # @return [TokenList] TokenList
20
19
  def initialize(version, account_sid: nil)
21
20
  super(version)
@@ -32,7 +31,6 @@ module Twilio
32
31
  # Request is executed immediately.
33
32
  # @param [String] ttl The duration in seconds for which the generated credentials
34
33
  # are valid
35
-
36
34
  # @return [TokenInstance] Newly created TokenInstance
37
35
  def create(ttl: nil)
38
36
  data = {
@@ -48,7 +46,7 @@ module Twilio
48
46
  return TokenInstance.new(
49
47
  @version,
50
48
  payload,
51
- account_sid: @solution['account_sid'],
49
+ account_sid: @solution[:account_sid],
52
50
  )
53
51
  end
54
52
 
@@ -67,7 +65,6 @@ module Twilio
67
65
  # @param [Hash] solution Path solution for the resource
68
66
  # @param [String] account_sid The unique id of the Account that created this
69
67
  # Token.
70
-
71
68
  # @return [TokenPage] TokenPage
72
69
  def initialize(version, response, solution)
73
70
  super(version, response)
@@ -79,13 +76,12 @@ module Twilio
79
76
  ##
80
77
  # Build an instance of TokenInstance
81
78
  # @param [Hash] payload Payload response from the API
82
-
83
79
  # @return [TokenInstance] TokenInstance
84
80
  def get_instance(payload)
85
81
  return TokenInstance.new(
86
82
  @version,
87
83
  payload,
88
- account_sid: @solution['account_sid'],
84
+ account_sid: @solution[:account_sid],
89
85
  )
90
86
  end
91
87
 
@@ -103,7 +99,6 @@ module Twilio
103
99
  # @param [Hash] payload payload that contains response from Twilio
104
100
  # @param [String] account_sid The unique id of the Account that created this
105
101
  # Token.
106
-
107
102
  # @return [TokenInstance] TokenInstance
108
103
  def initialize(version, payload, account_sid: nil)
109
104
  super(version)
@@ -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
  # transcription.
18
-
19
18
  # @return [TranscriptionList] TranscriptionList
20
19
  def initialize(version, account_sid: nil)
21
20
  super(version)
@@ -37,7 +36,6 @@ module Twilio
37
36
  # the default value of 50 records. If no page_size is defined
38
37
  # but a limit is defined, stream() will attempt to read the
39
38
  # limit with the most efficient page size, i.e. min(limit, 1000)
40
-
41
39
  # @return [Array] Array of up to limit results
42
40
  def list(limit: nil, page_size: nil)
43
41
  self.stream(
@@ -56,7 +54,6 @@ module Twilio
56
54
  # the default value of 50 records. If no page_size is defined
57
55
  # but a limit is defined, stream() will attempt to read the
58
56
  # limit with the most efficient page size, i.e. min(limit, 1000)
59
-
60
57
  # @return [Enumerable] Enumerable that will yield up to limit results
61
58
  def stream(limit: nil, page_size: nil)
62
59
  limits = @version.read_limits(limit, page_size)
@@ -96,7 +93,6 @@ module Twilio
96
93
  # @param [String] page_token PageToken provided by the API
97
94
  # @param [Integer] page_number Page Number, this value is simply for client state
98
95
  # @param [Integer] page_size Number of records to return, defaults to 50
99
-
100
96
  # @return [Page] Page of TranscriptionInstance
101
97
  def page(page_token: nil, page_number: nil, page_size: nil)
102
98
  params = {
@@ -127,7 +123,6 @@ module Twilio
127
123
  # @param [Hash] solution Path solution for the resource
128
124
  # @param [String] account_sid The unique id of the Account responsible for this
129
125
  # transcription.
130
-
131
126
  # @return [TranscriptionPage] TranscriptionPage
132
127
  def initialize(version, response, solution)
133
128
  super(version, response)
@@ -139,13 +134,12 @@ module Twilio
139
134
  ##
140
135
  # Build an instance of TranscriptionInstance
141
136
  # @param [Hash] payload Payload response from the API
142
-
143
137
  # @return [TranscriptionInstance] TranscriptionInstance
144
138
  def get_instance(payload)
145
139
  return TranscriptionInstance.new(
146
140
  @version,
147
141
  payload,
148
- account_sid: @solution['account_sid'],
142
+ account_sid: @solution[:account_sid],
149
143
  )
150
144
  end
151
145
 
@@ -162,7 +156,6 @@ module Twilio
162
156
  # @param [Version] version Version that contains the resource
163
157
  # @param [String] account_sid The account_sid
164
158
  # @param [String] sid The transcription Sid that uniquely identifies this resource
165
-
166
159
  # @return [TranscriptionContext] TranscriptionContext
167
160
  def initialize(version, account_sid, sid)
168
161
  super(version)
@@ -190,8 +183,8 @@ module Twilio
190
183
  return TranscriptionInstance.new(
191
184
  @version,
192
185
  payload,
193
- account_sid: @solution['account_sid'],
194
- sid: @solution['sid'],
186
+ account_sid: @solution[:account_sid],
187
+ sid: @solution[:sid],
195
188
  )
196
189
  end
197
190
 
@@ -218,7 +211,6 @@ module Twilio
218
211
  # @param [String] account_sid The unique id of the Account responsible for this
219
212
  # transcription.
220
213
  # @param [String] sid The transcription Sid that uniquely identifies this resource
221
-
222
214
  # @return [TranscriptionInstance] TranscriptionInstance
223
215
  def initialize(version, payload, account_sid: nil, sid: nil)
224
216
  super(version)
@@ -252,7 +244,6 @@ module Twilio
252
244
  # Generate an instance context for the instance, the context is capable of
253
245
  # performing various actions. All instance actions are proxied to the context
254
246
  # @param [Version] version Version that contains the resource
255
-
256
247
  # @return [TranscriptionContext] TranscriptionContext for this TranscriptionInstance
257
248
  def context
258
249
  unless @instance_context
@@ -321,21 +312,21 @@ module Twilio
321
312
  # Fetch a TranscriptionInstance
322
313
  # @return [TranscriptionInstance] Fetched TranscriptionInstance
323
314
  def fetch
324
- @context.fetch()
315
+ context.fetch
325
316
  end
326
317
 
327
318
  ##
328
319
  # Deletes the TranscriptionInstance
329
320
  # @return [Boolean] true if delete succeeds, true otherwise
330
321
  def delete
331
- @context.delete()
322
+ context.delete
332
323
  end
333
324
 
334
325
  ##
335
326
  # Provide a user friendly representation
336
327
  def to_s
337
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
338
- "<Twilio.Api.V2010.TranscriptionInstance #{context}>"
328
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
329
+ "<Twilio.Api.V2010.TranscriptionInstance #{values}>"
339
330
  end
340
331
  end
341
332
  end
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid A 34 character string that uniquely identifies this
19
19
  # resource.
20
-
21
20
  # @return [AllTimeList] AllTimeList
22
21
  def initialize(version, account_sid: nil)
23
22
  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 AllTimeInstance
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 A 34 character string that uniquely identifies this
131
127
  # resource.
132
-
133
128
  # @return [AllTimePage] AllTimePage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,13 +136,12 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of AllTimeInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [AllTimeInstance] AllTimeInstance
146
140
  def get_instance(payload)
147
141
  return AllTimeInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
144
+ account_sid: @solution[:account_sid],
151
145
  )
152
146
  end
153
147
 
@@ -165,7 +159,6 @@ module Twilio
165
159
  # @param [Hash] payload payload that contains response from Twilio
166
160
  # @param [String] account_sid A 34 character string that uniquely identifies this
167
161
  # resource.
168
-
169
162
  # @return [AllTimeInstance] AllTimeInstance
170
163
  def initialize(version, payload, account_sid: nil)
171
164
  super(version)
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid A 34 character string that uniquely identifies this
19
19
  # resource.
20
-
21
20
  # @return [DailyList] DailyList
22
21
  def initialize(version, account_sid: nil)
23
22
  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 DailyInstance
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 A 34 character string that uniquely identifies this
131
127
  # resource.
132
-
133
128
  # @return [DailyPage] DailyPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,13 +136,12 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of DailyInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [DailyInstance] DailyInstance
146
140
  def get_instance(payload)
147
141
  return DailyInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
144
+ account_sid: @solution[:account_sid],
151
145
  )
152
146
  end
153
147
 
@@ -165,7 +159,6 @@ module Twilio
165
159
  # @param [Hash] payload payload that contains response from Twilio
166
160
  # @param [String] account_sid A 34 character string that uniquely identifies this
167
161
  # resource.
168
-
169
162
  # @return [DailyInstance] DailyInstance
170
163
  def initialize(version, payload, account_sid: nil)
171
164
  super(version)