twilio-ruby 5.0.0.rc9 → 5.0.0.rc10

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -27,7 +27,7 @@ module Twilio
27
27
  ##
28
28
  # Provide a user friendly representation
29
29
  def to_s
30
- #<Twilio::REST::Taskrouter::V1>
30
+ '<Twilio::REST::Taskrouter::V1>'
31
31
  end
32
32
  end
33
33
  end
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the CredentialListList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] trunk_sid The trunk_sid
17
-
18
17
  # @return [CredentialListList] CredentialListList
19
18
  def initialize(version, trunk_sid: nil)
20
19
  super(version)
@@ -30,7 +29,6 @@ module Twilio
30
29
  # Retrieve a single page of CredentialListInstance records from the API.
31
30
  # Request is executed immediately.
32
31
  # @param [String] credential_list_sid The credential_list_sid
33
-
34
32
  # @return [CredentialListInstance] Newly created CredentialListInstance
35
33
  def create(credential_list_sid: nil)
36
34
  data = {
@@ -46,7 +44,7 @@ module Twilio
46
44
  return CredentialListInstance.new(
47
45
  @version,
48
46
  payload,
49
- trunk_sid: @solution['trunk_sid'],
47
+ trunk_sid: @solution[:trunk_sid],
50
48
  )
51
49
  end
52
50
 
@@ -60,7 +58,6 @@ module Twilio
60
58
  # the default value of 50 records. If no page_size is defined
61
59
  # but a limit is defined, stream() will attempt to read the
62
60
  # limit with the most efficient page size, i.e. min(limit, 1000)
63
-
64
61
  # @return [Array] Array of up to limit results
65
62
  def list(limit: nil, page_size: nil)
66
63
  self.stream(
@@ -79,7 +76,6 @@ module Twilio
79
76
  # the default value of 50 records. If no page_size is defined
80
77
  # but a limit is defined, stream() will attempt to read the
81
78
  # limit with the most efficient page size, i.e. min(limit, 1000)
82
-
83
79
  # @return [Enumerable] Enumerable that will yield up to limit results
84
80
  def stream(limit: nil, page_size: nil)
85
81
  limits = @version.read_limits(limit, page_size)
@@ -119,7 +115,6 @@ module Twilio
119
115
  # @param [String] page_token PageToken provided by the API
120
116
  # @param [Integer] page_number Page Number, this value is simply for client state
121
117
  # @param [Integer] page_size Number of records to return, defaults to 50
122
-
123
118
  # @return [Page] Page of CredentialListInstance
124
119
  def page(page_token: nil, page_number: nil, page_size: nil)
125
120
  params = {
@@ -149,7 +144,6 @@ module Twilio
149
144
  # @param [Response] response Response from the API
150
145
  # @param [Hash] solution Path solution for the resource
151
146
  # @param [String] trunk_sid The trunk_sid
152
-
153
147
  # @return [CredentialListPage] CredentialListPage
154
148
  def initialize(version, response, solution)
155
149
  super(version, response)
@@ -161,13 +155,12 @@ module Twilio
161
155
  ##
162
156
  # Build an instance of CredentialListInstance
163
157
  # @param [Hash] payload Payload response from the API
164
-
165
158
  # @return [CredentialListInstance] CredentialListInstance
166
159
  def get_instance(payload)
167
160
  return CredentialListInstance.new(
168
161
  @version,
169
162
  payload,
170
- trunk_sid: @solution['trunk_sid'],
163
+ trunk_sid: @solution[:trunk_sid],
171
164
  )
172
165
  end
173
166
 
@@ -184,7 +177,6 @@ module Twilio
184
177
  # @param [Version] version Version that contains the resource
185
178
  # @param [String] trunk_sid The trunk_sid
186
179
  # @param [String] sid The sid
187
-
188
180
  # @return [CredentialListContext] CredentialListContext
189
181
  def initialize(version, trunk_sid, sid)
190
182
  super(version)
@@ -212,8 +204,8 @@ module Twilio
212
204
  return CredentialListInstance.new(
213
205
  @version,
214
206
  payload,
215
- trunk_sid: @solution['trunk_sid'],
216
- sid: @solution['sid'],
207
+ trunk_sid: @solution[:trunk_sid],
208
+ sid: @solution[:sid],
217
209
  )
218
210
  end
219
211
 
@@ -239,7 +231,6 @@ module Twilio
239
231
  # @param [Hash] payload payload that contains response from Twilio
240
232
  # @param [String] trunk_sid The trunk_sid
241
233
  # @param [String] sid The sid
242
-
243
234
  # @return [CredentialListInstance] CredentialListInstance
244
235
  def initialize(version, payload, trunk_sid: nil, sid: nil)
245
236
  super(version)
@@ -267,7 +258,6 @@ module Twilio
267
258
  # Generate an instance context for the instance, the context is capable of
268
259
  # performing various actions. All instance actions are proxied to the context
269
260
  # @param [Version] version Version that contains the resource
270
-
271
261
  # @return [CredentialListContext] CredentialListContext for this CredentialListInstance
272
262
  def context
273
263
  unless @instance_context
@@ -312,21 +302,21 @@ module Twilio
312
302
  # Fetch a CredentialListInstance
313
303
  # @return [CredentialListInstance] Fetched CredentialListInstance
314
304
  def fetch
315
- @context.fetch()
305
+ context.fetch
316
306
  end
317
307
 
318
308
  ##
319
309
  # Deletes the CredentialListInstance
320
310
  # @return [Boolean] true if delete succeeds, true otherwise
321
311
  def delete
322
- @context.delete()
312
+ context.delete
323
313
  end
324
314
 
325
315
  ##
326
316
  # Provide a user friendly representation
327
317
  def to_s
328
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
329
- "<Twilio.Trunking.V1.CredentialListInstance #{context}>"
318
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
319
+ "<Twilio.Trunking.V1.CredentialListInstance #{values}>"
330
320
  end
331
321
  end
332
322
  end
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the IpAccessControlListList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] trunk_sid The trunk_sid
17
-
18
17
  # @return [IpAccessControlListList] IpAccessControlListList
19
18
  def initialize(version, trunk_sid: nil)
20
19
  super(version)
@@ -30,7 +29,6 @@ module Twilio
30
29
  # Retrieve a single page of IpAccessControlListInstance records from the API.
31
30
  # Request is executed immediately.
32
31
  # @param [String] ip_access_control_list_sid The ip_access_control_list_sid
33
-
34
32
  # @return [IpAccessControlListInstance] Newly created IpAccessControlListInstance
35
33
  def create(ip_access_control_list_sid: nil)
36
34
  data = {
@@ -46,7 +44,7 @@ module Twilio
46
44
  return IpAccessControlListInstance.new(
47
45
  @version,
48
46
  payload,
49
- trunk_sid: @solution['trunk_sid'],
47
+ trunk_sid: @solution[:trunk_sid],
50
48
  )
51
49
  end
52
50
 
@@ -60,7 +58,6 @@ module Twilio
60
58
  # the default value of 50 records. If no page_size is defined
61
59
  # but a limit is defined, stream() will attempt to read the
62
60
  # limit with the most efficient page size, i.e. min(limit, 1000)
63
-
64
61
  # @return [Array] Array of up to limit results
65
62
  def list(limit: nil, page_size: nil)
66
63
  self.stream(
@@ -79,7 +76,6 @@ module Twilio
79
76
  # the default value of 50 records. If no page_size is defined
80
77
  # but a limit is defined, stream() will attempt to read the
81
78
  # limit with the most efficient page size, i.e. min(limit, 1000)
82
-
83
79
  # @return [Enumerable] Enumerable that will yield up to limit results
84
80
  def stream(limit: nil, page_size: nil)
85
81
  limits = @version.read_limits(limit, page_size)
@@ -119,7 +115,6 @@ module Twilio
119
115
  # @param [String] page_token PageToken provided by the API
120
116
  # @param [Integer] page_number Page Number, this value is simply for client state
121
117
  # @param [Integer] page_size Number of records to return, defaults to 50
122
-
123
118
  # @return [Page] Page of IpAccessControlListInstance
124
119
  def page(page_token: nil, page_number: nil, page_size: nil)
125
120
  params = {
@@ -149,7 +144,6 @@ module Twilio
149
144
  # @param [Response] response Response from the API
150
145
  # @param [Hash] solution Path solution for the resource
151
146
  # @param [String] trunk_sid The trunk_sid
152
-
153
147
  # @return [IpAccessControlListPage] IpAccessControlListPage
154
148
  def initialize(version, response, solution)
155
149
  super(version, response)
@@ -161,13 +155,12 @@ module Twilio
161
155
  ##
162
156
  # Build an instance of IpAccessControlListInstance
163
157
  # @param [Hash] payload Payload response from the API
164
-
165
158
  # @return [IpAccessControlListInstance] IpAccessControlListInstance
166
159
  def get_instance(payload)
167
160
  return IpAccessControlListInstance.new(
168
161
  @version,
169
162
  payload,
170
- trunk_sid: @solution['trunk_sid'],
163
+ trunk_sid: @solution[:trunk_sid],
171
164
  )
172
165
  end
173
166
 
@@ -184,7 +177,6 @@ module Twilio
184
177
  # @param [Version] version Version that contains the resource
185
178
  # @param [String] trunk_sid The trunk_sid
186
179
  # @param [String] sid The sid
187
-
188
180
  # @return [IpAccessControlListContext] IpAccessControlListContext
189
181
  def initialize(version, trunk_sid, sid)
190
182
  super(version)
@@ -212,8 +204,8 @@ module Twilio
212
204
  return IpAccessControlListInstance.new(
213
205
  @version,
214
206
  payload,
215
- trunk_sid: @solution['trunk_sid'],
216
- sid: @solution['sid'],
207
+ trunk_sid: @solution[:trunk_sid],
208
+ sid: @solution[:sid],
217
209
  )
218
210
  end
219
211
 
@@ -239,7 +231,6 @@ module Twilio
239
231
  # @param [Hash] payload payload that contains response from Twilio
240
232
  # @param [String] trunk_sid The trunk_sid
241
233
  # @param [String] sid The sid
242
-
243
234
  # @return [IpAccessControlListInstance] IpAccessControlListInstance
244
235
  def initialize(version, payload, trunk_sid: nil, sid: nil)
245
236
  super(version)
@@ -267,7 +258,6 @@ module Twilio
267
258
  # Generate an instance context for the instance, the context is capable of
268
259
  # performing various actions. All instance actions are proxied to the context
269
260
  # @param [Version] version Version that contains the resource
270
-
271
261
  # @return [IpAccessControlListContext] IpAccessControlListContext for this IpAccessControlListInstance
272
262
  def context
273
263
  unless @instance_context
@@ -312,21 +302,21 @@ module Twilio
312
302
  # Fetch a IpAccessControlListInstance
313
303
  # @return [IpAccessControlListInstance] Fetched IpAccessControlListInstance
314
304
  def fetch
315
- @context.fetch()
305
+ context.fetch
316
306
  end
317
307
 
318
308
  ##
319
309
  # Deletes the IpAccessControlListInstance
320
310
  # @return [Boolean] true if delete succeeds, true otherwise
321
311
  def delete
322
- @context.delete()
312
+ context.delete
323
313
  end
324
314
 
325
315
  ##
326
316
  # Provide a user friendly representation
327
317
  def to_s
328
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
329
- "<Twilio.Trunking.V1.IpAccessControlListInstance #{context}>"
318
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
319
+ "<Twilio.Trunking.V1.IpAccessControlListInstance #{values}>"
330
320
  end
331
321
  end
332
322
  end
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the OriginationUrlList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] trunk_sid The trunk_sid
17
-
18
17
  # @return [OriginationUrlList] OriginationUrlList
19
18
  def initialize(version, trunk_sid: nil)
20
19
  super(version)
@@ -34,7 +33,6 @@ module Twilio
34
33
  # @param [Boolean] enabled The enabled
35
34
  # @param [String] friendly_name The friendly_name
36
35
  # @param [String] sip_url The sip_url
37
-
38
36
  # @return [OriginationUrlInstance] Newly created OriginationUrlInstance
39
37
  def create(weight: nil, priority: nil, enabled: nil, friendly_name: nil, sip_url: nil)
40
38
  data = {
@@ -54,7 +52,7 @@ module Twilio
54
52
  return OriginationUrlInstance.new(
55
53
  @version,
56
54
  payload,
57
- trunk_sid: @solution['trunk_sid'],
55
+ trunk_sid: @solution[:trunk_sid],
58
56
  )
59
57
  end
60
58
 
@@ -68,7 +66,6 @@ module Twilio
68
66
  # the default value of 50 records. If no page_size is defined
69
67
  # but a limit is defined, stream() will attempt to read the
70
68
  # limit with the most efficient page size, i.e. min(limit, 1000)
71
-
72
69
  # @return [Array] Array of up to limit results
73
70
  def list(limit: nil, page_size: nil)
74
71
  self.stream(
@@ -87,7 +84,6 @@ module Twilio
87
84
  # the default value of 50 records. If no page_size is defined
88
85
  # but a limit is defined, stream() will attempt to read the
89
86
  # limit with the most efficient page size, i.e. min(limit, 1000)
90
-
91
87
  # @return [Enumerable] Enumerable that will yield up to limit results
92
88
  def stream(limit: nil, page_size: nil)
93
89
  limits = @version.read_limits(limit, page_size)
@@ -127,7 +123,6 @@ module Twilio
127
123
  # @param [String] page_token PageToken provided by the API
128
124
  # @param [Integer] page_number Page Number, this value is simply for client state
129
125
  # @param [Integer] page_size Number of records to return, defaults to 50
130
-
131
126
  # @return [Page] Page of OriginationUrlInstance
132
127
  def page(page_token: nil, page_number: nil, page_size: nil)
133
128
  params = {
@@ -157,7 +152,6 @@ module Twilio
157
152
  # @param [Response] response Response from the API
158
153
  # @param [Hash] solution Path solution for the resource
159
154
  # @param [String] trunk_sid The trunk_sid
160
-
161
155
  # @return [OriginationUrlPage] OriginationUrlPage
162
156
  def initialize(version, response, solution)
163
157
  super(version, response)
@@ -169,13 +163,12 @@ module Twilio
169
163
  ##
170
164
  # Build an instance of OriginationUrlInstance
171
165
  # @param [Hash] payload Payload response from the API
172
-
173
166
  # @return [OriginationUrlInstance] OriginationUrlInstance
174
167
  def get_instance(payload)
175
168
  return OriginationUrlInstance.new(
176
169
  @version,
177
170
  payload,
178
- trunk_sid: @solution['trunk_sid'],
171
+ trunk_sid: @solution[:trunk_sid],
179
172
  )
180
173
  end
181
174
 
@@ -192,7 +185,6 @@ module Twilio
192
185
  # @param [Version] version Version that contains the resource
193
186
  # @param [String] trunk_sid The trunk_sid
194
187
  # @param [String] sid The sid
195
-
196
188
  # @return [OriginationUrlContext] OriginationUrlContext
197
189
  def initialize(version, trunk_sid, sid)
198
190
  super(version)
@@ -220,8 +212,8 @@ module Twilio
220
212
  return OriginationUrlInstance.new(
221
213
  @version,
222
214
  payload,
223
- trunk_sid: @solution['trunk_sid'],
224
- sid: @solution['sid'],
215
+ trunk_sid: @solution[:trunk_sid],
216
+ sid: @solution[:sid],
225
217
  )
226
218
  end
227
219
 
@@ -239,7 +231,6 @@ module Twilio
239
231
  # @param [Boolean] enabled The enabled
240
232
  # @param [String] friendly_name The friendly_name
241
233
  # @param [String] sip_url The sip_url
242
-
243
234
  # @return [OriginationUrlInstance] Updated OriginationUrlInstance
244
235
  def update(weight: nil, priority: nil, enabled: nil, friendly_name: nil, sip_url: nil)
245
236
  data = {
@@ -259,8 +250,8 @@ module Twilio
259
250
  return OriginationUrlInstance.new(
260
251
  @version,
261
252
  payload,
262
- trunk_sid: @solution['trunk_sid'],
263
- sid: @solution['sid'],
253
+ trunk_sid: @solution[:trunk_sid],
254
+ sid: @solution[:sid],
264
255
  )
265
256
  end
266
257
 
@@ -279,7 +270,6 @@ module Twilio
279
270
  # @param [Hash] payload payload that contains response from Twilio
280
271
  # @param [String] trunk_sid The trunk_sid
281
272
  # @param [String] sid The sid
282
-
283
273
  # @return [OriginationUrlInstance] OriginationUrlInstance
284
274
  def initialize(version, payload, trunk_sid: nil, sid: nil)
285
275
  super(version)
@@ -311,7 +301,6 @@ module Twilio
311
301
  # Generate an instance context for the instance, the context is capable of
312
302
  # performing various actions. All instance actions are proxied to the context
313
303
  # @param [Version] version Version that contains the resource
314
-
315
304
  # @return [OriginationUrlContext] OriginationUrlContext for this OriginationUrlInstance
316
305
  def context
317
306
  unless @instance_context
@@ -372,14 +361,14 @@ module Twilio
372
361
  # Fetch a OriginationUrlInstance
373
362
  # @return [OriginationUrlInstance] Fetched OriginationUrlInstance
374
363
  def fetch
375
- @context.fetch()
364
+ context.fetch
376
365
  end
377
366
 
378
367
  ##
379
368
  # Deletes the OriginationUrlInstance
380
369
  # @return [Boolean] true if delete succeeds, true otherwise
381
370
  def delete
382
- @context.delete()
371
+ context.delete
383
372
  end
384
373
 
385
374
  ##
@@ -389,10 +378,10 @@ module Twilio
389
378
  # @param [Boolean] enabled The enabled
390
379
  # @param [String] friendly_name The friendly_name
391
380
  # @param [String] sip_url The sip_url
392
-
393
381
  # @return [OriginationUrlInstance] Updated OriginationUrlInstance
394
382
  def update(weight: nil, priority: nil, enabled: nil, friendly_name: nil, sip_url: nil)
395
- @context.update(
383
+ context.update(
384
+ weight: weight,
396
385
  priority: priority,
397
386
  enabled: enabled,
398
387
  friendly_name: friendly_name,
@@ -403,8 +392,8 @@ module Twilio
403
392
  ##
404
393
  # Provide a user friendly representation
405
394
  def to_s
406
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
407
- "<Twilio.Trunking.V1.OriginationUrlInstance #{context}>"
395
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
396
+ "<Twilio.Trunking.V1.OriginationUrlInstance #{values}>"
408
397
  end
409
398
  end
410
399
  end
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the PhoneNumberList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] trunk_sid The trunk_sid
17
-
18
17
  # @return [PhoneNumberList] PhoneNumberList
19
18
  def initialize(version, trunk_sid: nil)
20
19
  super(version)
@@ -30,7 +29,6 @@ module Twilio
30
29
  # Retrieve a single page of PhoneNumberInstance records from the API.
31
30
  # Request is executed immediately.
32
31
  # @param [String] phone_number_sid The phone_number_sid
33
-
34
32
  # @return [PhoneNumberInstance] Newly created PhoneNumberInstance
35
33
  def create(phone_number_sid: nil)
36
34
  data = {
@@ -46,7 +44,7 @@ module Twilio
46
44
  return PhoneNumberInstance.new(
47
45
  @version,
48
46
  payload,
49
- trunk_sid: @solution['trunk_sid'],
47
+ trunk_sid: @solution[:trunk_sid],
50
48
  )
51
49
  end
52
50
 
@@ -60,7 +58,6 @@ module Twilio
60
58
  # the default value of 50 records. If no page_size is defined
61
59
  # but a limit is defined, stream() will attempt to read the
62
60
  # limit with the most efficient page size, i.e. min(limit, 1000)
63
-
64
61
  # @return [Array] Array of up to limit results
65
62
  def list(limit: nil, page_size: nil)
66
63
  self.stream(
@@ -79,7 +76,6 @@ module Twilio
79
76
  # the default value of 50 records. If no page_size is defined
80
77
  # but a limit is defined, stream() will attempt to read the
81
78
  # limit with the most efficient page size, i.e. min(limit, 1000)
82
-
83
79
  # @return [Enumerable] Enumerable that will yield up to limit results
84
80
  def stream(limit: nil, page_size: nil)
85
81
  limits = @version.read_limits(limit, page_size)
@@ -119,7 +115,6 @@ module Twilio
119
115
  # @param [String] page_token PageToken provided by the API
120
116
  # @param [Integer] page_number Page Number, this value is simply for client state
121
117
  # @param [Integer] page_size Number of records to return, defaults to 50
122
-
123
118
  # @return [Page] Page of PhoneNumberInstance
124
119
  def page(page_token: nil, page_number: nil, page_size: nil)
125
120
  params = {
@@ -149,7 +144,6 @@ module Twilio
149
144
  # @param [Response] response Response from the API
150
145
  # @param [Hash] solution Path solution for the resource
151
146
  # @param [String] trunk_sid The trunk_sid
152
-
153
147
  # @return [PhoneNumberPage] PhoneNumberPage
154
148
  def initialize(version, response, solution)
155
149
  super(version, response)
@@ -161,13 +155,12 @@ module Twilio
161
155
  ##
162
156
  # Build an instance of PhoneNumberInstance
163
157
  # @param [Hash] payload Payload response from the API
164
-
165
158
  # @return [PhoneNumberInstance] PhoneNumberInstance
166
159
  def get_instance(payload)
167
160
  return PhoneNumberInstance.new(
168
161
  @version,
169
162
  payload,
170
- trunk_sid: @solution['trunk_sid'],
163
+ trunk_sid: @solution[:trunk_sid],
171
164
  )
172
165
  end
173
166
 
@@ -184,7 +177,6 @@ module Twilio
184
177
  # @param [Version] version Version that contains the resource
185
178
  # @param [String] trunk_sid The trunk_sid
186
179
  # @param [String] sid The sid
187
-
188
180
  # @return [PhoneNumberContext] PhoneNumberContext
189
181
  def initialize(version, trunk_sid, sid)
190
182
  super(version)
@@ -212,8 +204,8 @@ module Twilio
212
204
  return PhoneNumberInstance.new(
213
205
  @version,
214
206
  payload,
215
- trunk_sid: @solution['trunk_sid'],
216
- sid: @solution['sid'],
207
+ trunk_sid: @solution[:trunk_sid],
208
+ sid: @solution[:sid],
217
209
  )
218
210
  end
219
211
 
@@ -239,7 +231,6 @@ module Twilio
239
231
  # @param [Hash] payload payload that contains response from Twilio
240
232
  # @param [String] trunk_sid The trunk_sid
241
233
  # @param [String] sid The sid
242
-
243
234
  # @return [PhoneNumberInstance] PhoneNumberInstance
244
235
  def initialize(version, payload, trunk_sid: nil, sid: nil)
245
236
  super(version)
@@ -286,7 +277,6 @@ module Twilio
286
277
  # Generate an instance context for the instance, the context is capable of
287
278
  # performing various actions. All instance actions are proxied to the context
288
279
  # @param [Version] version Version that contains the resource
289
-
290
280
  # @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance
291
281
  def context
292
282
  unless @instance_context
@@ -407,21 +397,21 @@ module Twilio
407
397
  # Fetch a PhoneNumberInstance
408
398
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
409
399
  def fetch
410
- @context.fetch()
400
+ context.fetch
411
401
  end
412
402
 
413
403
  ##
414
404
  # Deletes the PhoneNumberInstance
415
405
  # @return [Boolean] true if delete succeeds, true otherwise
416
406
  def delete
417
- @context.delete()
407
+ context.delete
418
408
  end
419
409
 
420
410
  ##
421
411
  # Provide a user friendly representation
422
412
  def to_s
423
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
424
- "<Twilio.Trunking.V1.PhoneNumberInstance #{context}>"
413
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
414
+ "<Twilio.Trunking.V1.PhoneNumberInstance #{values}>"
425
415
  end
426
416
  end
427
417
  end