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
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid The account_sid
19
19
  # @param [String] ip_access_control_list_sid The ip_access_control_list_sid
20
-
21
20
  # @return [IpAddressList] IpAddressList
22
21
  def initialize(version, account_sid: nil, ip_access_control_list_sid: nil)
23
22
  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(limit: nil, page_size: nil)
46
44
  self.stream(
@@ -59,7 +57,6 @@ module Twilio
59
57
  # the default value of 50 records. If no page_size is defined
60
58
  # but a limit is defined, stream() will attempt to read the
61
59
  # limit with the most efficient page size, i.e. min(limit, 1000)
62
-
63
60
  # @return [Enumerable] Enumerable that will yield up to limit results
64
61
  def stream(limit: nil, page_size: nil)
65
62
  limits = @version.read_limits(limit, page_size)
@@ -99,7 +96,6 @@ module Twilio
99
96
  # @param [String] page_token PageToken provided by the API
100
97
  # @param [Integer] page_number Page Number, this value is simply for client state
101
98
  # @param [Integer] page_size Number of records to return, defaults to 50
102
-
103
99
  # @return [Page] Page of IpAddressInstance
104
100
  def page(page_token: nil, page_number: nil, page_size: nil)
105
101
  params = {
@@ -120,7 +116,6 @@ module Twilio
120
116
  # Request is executed immediately.
121
117
  # @param [String] friendly_name The friendly_name
122
118
  # @param [String] ip_address The ip_address
123
-
124
119
  # @return [IpAddressInstance] Newly created IpAddressInstance
125
120
  def create(friendly_name: nil, ip_address: nil)
126
121
  data = {
@@ -137,8 +132,8 @@ module Twilio
137
132
  return IpAddressInstance.new(
138
133
  @version,
139
134
  payload,
140
- account_sid: @solution['account_sid'],
141
- ip_access_control_list_sid: @solution['ip_access_control_list_sid'],
135
+ account_sid: @solution[:account_sid],
136
+ ip_access_control_list_sid: @solution[:ip_access_control_list_sid],
142
137
  )
143
138
  end
144
139
 
@@ -157,7 +152,6 @@ module Twilio
157
152
  # @param [Hash] solution Path solution for the resource
158
153
  # @param [String] account_sid The account_sid
159
154
  # @param [String] ip_access_control_list_sid The ip_access_control_list_sid
160
-
161
155
  # @return [IpAddressPage] IpAddressPage
162
156
  def initialize(version, response, solution)
163
157
  super(version, response)
@@ -169,14 +163,13 @@ module Twilio
169
163
  ##
170
164
  # Build an instance of IpAddressInstance
171
165
  # @param [Hash] payload Payload response from the API
172
-
173
166
  # @return [IpAddressInstance] IpAddressInstance
174
167
  def get_instance(payload)
175
168
  return IpAddressInstance.new(
176
169
  @version,
177
170
  payload,
178
- account_sid: @solution['account_sid'],
179
- ip_access_control_list_sid: @solution['ip_access_control_list_sid'],
171
+ account_sid: @solution[:account_sid],
172
+ ip_access_control_list_sid: @solution[:ip_access_control_list_sid],
180
173
  )
181
174
  end
182
175
 
@@ -194,7 +187,6 @@ module Twilio
194
187
  # @param [String] account_sid The account_sid
195
188
  # @param [String] ip_access_control_list_sid The ip_access_control_list_sid
196
189
  # @param [String] sid The sid
197
-
198
190
  # @return [IpAddressContext] IpAddressContext
199
191
  def initialize(version, account_sid, ip_access_control_list_sid, sid)
200
192
  super(version)
@@ -223,9 +215,9 @@ module Twilio
223
215
  return IpAddressInstance.new(
224
216
  @version,
225
217
  payload,
226
- account_sid: @solution['account_sid'],
227
- ip_access_control_list_sid: @solution['ip_access_control_list_sid'],
228
- sid: @solution['sid'],
218
+ account_sid: @solution[:account_sid],
219
+ ip_access_control_list_sid: @solution[:ip_access_control_list_sid],
220
+ sid: @solution[:sid],
229
221
  )
230
222
  end
231
223
 
@@ -233,7 +225,6 @@ module Twilio
233
225
  # Update the IpAddressInstance
234
226
  # @param [String] ip_address The ip_address
235
227
  # @param [String] friendly_name The friendly_name
236
-
237
228
  # @return [IpAddressInstance] Updated IpAddressInstance
238
229
  def update(ip_address: nil, friendly_name: nil)
239
230
  data = {
@@ -250,9 +241,9 @@ module Twilio
250
241
  return IpAddressInstance.new(
251
242
  @version,
252
243
  payload,
253
- account_sid: @solution['account_sid'],
254
- ip_access_control_list_sid: @solution['ip_access_control_list_sid'],
255
- sid: @solution['sid'],
244
+ account_sid: @solution[:account_sid],
245
+ ip_access_control_list_sid: @solution[:ip_access_control_list_sid],
246
+ sid: @solution[:sid],
256
247
  )
257
248
  end
258
249
 
@@ -279,7 +270,6 @@ module Twilio
279
270
  # @param [String] account_sid The account_sid
280
271
  # @param [String] ip_access_control_list_sid The ip_access_control_list_sid
281
272
  # @param [String] sid The sid
282
-
283
273
  # @return [IpAddressInstance] IpAddressInstance
284
274
  def initialize(version, payload, account_sid: nil, ip_access_control_list_sid: nil, sid: nil)
285
275
  super(version)
@@ -309,7 +299,6 @@ module Twilio
309
299
  # Generate an instance context for the instance, the context is capable of
310
300
  # performing various actions. All instance actions are proxied to the context
311
301
  # @param [Version] version Version that contains the resource
312
-
313
302
  # @return [IpAddressContext] IpAddressContext for this IpAddressInstance
314
303
  def context
315
304
  unless @instance_context
@@ -359,17 +348,17 @@ module Twilio
359
348
  # Fetch a IpAddressInstance
360
349
  # @return [IpAddressInstance] Fetched IpAddressInstance
361
350
  def fetch
362
- @context.fetch()
351
+ context.fetch
363
352
  end
364
353
 
365
354
  ##
366
355
  # Update the IpAddressInstance
367
356
  # @param [String] ip_address The ip_address
368
357
  # @param [String] friendly_name The friendly_name
369
-
370
358
  # @return [IpAddressInstance] Updated IpAddressInstance
371
359
  def update(ip_address: nil, friendly_name: nil)
372
- @context.update(
360
+ context.update(
361
+ ip_address: ip_address,
373
362
  friendly_name: friendly_name,
374
363
  )
375
364
  end
@@ -378,14 +367,14 @@ module Twilio
378
367
  # Deletes the IpAddressInstance
379
368
  # @return [Boolean] true if delete succeeds, true otherwise
380
369
  def delete
381
- @context.delete()
370
+ context.delete
382
371
  end
383
372
 
384
373
  ##
385
374
  # Provide a user friendly representation
386
375
  def to_s
387
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
388
- "<Twilio.Api.V2010.IpAddressInstance #{context}>"
376
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
377
+ "<Twilio.Api.V2010.IpAddressInstance #{values}>"
389
378
  end
390
379
  end
391
380
  end
@@ -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 [IpAccessControlListList] IpAccessControlListList
21
20
  def initialize(version, account_sid: nil)
22
21
  super(version)
@@ -38,7 +37,6 @@ module Twilio
38
37
  # the default value of 50 records. If no page_size is defined
39
38
  # but a limit is defined, stream() will attempt to read the
40
39
  # limit with the most efficient page size, i.e. min(limit, 1000)
41
-
42
40
  # @return [Array] Array of up to limit results
43
41
  def list(limit: nil, page_size: nil)
44
42
  self.stream(
@@ -57,7 +55,6 @@ module Twilio
57
55
  # the default value of 50 records. If no page_size is defined
58
56
  # but a limit is defined, stream() will attempt to read the
59
57
  # limit with the most efficient page size, i.e. min(limit, 1000)
60
-
61
58
  # @return [Enumerable] Enumerable that will yield up to limit results
62
59
  def stream(limit: nil, page_size: nil)
63
60
  limits = @version.read_limits(limit, page_size)
@@ -97,7 +94,6 @@ module Twilio
97
94
  # @param [String] page_token PageToken provided by the API
98
95
  # @param [Integer] page_number Page Number, this value is simply for client state
99
96
  # @param [Integer] page_size Number of records to return, defaults to 50
100
-
101
97
  # @return [Page] Page of IpAccessControlListInstance
102
98
  def page(page_token: nil, page_number: nil, page_size: nil)
103
99
  params = {
@@ -118,7 +114,6 @@ module Twilio
118
114
  # Request is executed immediately.
119
115
  # @param [String] friendly_name A human readable descriptive text, up to 64
120
116
  # characters long.
121
-
122
117
  # @return [IpAccessControlListInstance] Newly created IpAccessControlListInstance
123
118
  def create(friendly_name: nil)
124
119
  data = {
@@ -134,7 +129,7 @@ module Twilio
134
129
  return IpAccessControlListInstance.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
 
@@ -153,7 +148,6 @@ module Twilio
153
148
  # @param [Hash] solution Path solution for the resource
154
149
  # @param [String] account_sid A 34 character string that uniquely identifies this
155
150
  # resource.
156
-
157
151
  # @return [IpAccessControlListPage] IpAccessControlListPage
158
152
  def initialize(version, response, solution)
159
153
  super(version, response)
@@ -165,13 +159,12 @@ module Twilio
165
159
  ##
166
160
  # Build an instance of IpAccessControlListInstance
167
161
  # @param [Hash] payload Payload response from the API
168
-
169
162
  # @return [IpAccessControlListInstance] IpAccessControlListInstance
170
163
  def get_instance(payload)
171
164
  return IpAccessControlListInstance.new(
172
165
  @version,
173
166
  payload,
174
- account_sid: @solution['account_sid'],
167
+ account_sid: @solution[:account_sid],
175
168
  )
176
169
  end
177
170
 
@@ -189,7 +182,6 @@ module Twilio
189
182
  # @param [String] account_sid The account_sid
190
183
  # @param [String] sid The ip-access-control-list Sid that uniquely identifies this
191
184
  # resource
192
-
193
185
  # @return [IpAccessControlListContext] IpAccessControlListContext
194
186
  def initialize(version, account_sid, sid)
195
187
  super(version)
@@ -220,8 +212,8 @@ module Twilio
220
212
  return IpAccessControlListInstance.new(
221
213
  @version,
222
214
  payload,
223
- account_sid: @solution['account_sid'],
224
- sid: @solution['sid'],
215
+ account_sid: @solution[:account_sid],
216
+ sid: @solution[:sid],
225
217
  )
226
218
  end
227
219
 
@@ -229,7 +221,6 @@ module Twilio
229
221
  # Update the IpAccessControlListInstance
230
222
  # @param [String] friendly_name A human readable descriptive text, up to 64
231
223
  # characters long.
232
-
233
224
  # @return [IpAccessControlListInstance] Updated IpAccessControlListInstance
234
225
  def update(friendly_name: nil)
235
226
  data = {
@@ -245,8 +236,8 @@ module Twilio
245
236
  return IpAccessControlListInstance.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
 
@@ -298,7 +289,6 @@ module Twilio
298
289
  # resource.
299
290
  # @param [String] sid The ip-access-control-list Sid that uniquely identifies this
300
291
  # resource
301
-
302
292
  # @return [IpAccessControlListInstance] IpAccessControlListInstance
303
293
  def initialize(version, payload, account_sid: nil, sid: nil)
304
294
  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 [IpAccessControlListContext] IpAccessControlListContext for this IpAccessControlListInstance
331
320
  def context
332
321
  unless @instance_context
@@ -371,38 +360,39 @@ module Twilio
371
360
  # Fetch a IpAccessControlListInstance
372
361
  # @return [IpAccessControlListInstance] Fetched IpAccessControlListInstance
373
362
  def fetch
374
- @context.fetch()
363
+ context.fetch
375
364
  end
376
365
 
377
366
  ##
378
367
  # Update the IpAccessControlListInstance
379
368
  # @param [String] friendly_name A human readable descriptive text, up to 64
380
369
  # characters long.
381
-
382
370
  # @return [IpAccessControlListInstance] Updated IpAccessControlListInstance
383
371
  def update(friendly_name: nil)
384
- @context.update()
372
+ context.update(
373
+ friendly_name: friendly_name,
374
+ )
385
375
  end
386
376
 
387
377
  ##
388
378
  # Deletes the IpAccessControlListInstance
389
379
  # @return [Boolean] true if delete succeeds, true otherwise
390
380
  def delete
391
- @context.delete()
381
+ context.delete
392
382
  end
393
383
 
394
384
  ##
395
385
  # Access the ip_addresses
396
386
  # @return [ip_addresses] ip_addresses
397
387
  def ip_addresses
398
- @context.ip_addresses
388
+ context.ip_addresses
399
389
  end
400
390
 
401
391
  ##
402
392
  # Provide a user friendly representation
403
393
  def to_s
404
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
405
- "<Twilio.Api.V2010.IpAccessControlListInstance #{context}>"
394
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
395
+ "<Twilio.Api.V2010.IpAccessControlListInstance #{values}>"
406
396
  end
407
397
  end
408
398
  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 [SipList] SipList
20
19
  def initialize(version, account_sid: nil)
21
20
  super(version)
@@ -34,7 +33,6 @@ module Twilio
34
33
  ##
35
34
  # Access the domains
36
35
  # @param [String] sid The domain sid that uniquely identifies the resource
37
-
38
36
  # @return [DomainList] DomainList
39
37
  def domains(sid=:unset)
40
38
  if sid != :unset
@@ -55,7 +53,6 @@ module Twilio
55
53
  # Access the ip_access_control_lists
56
54
  # @param [String] sid The ip-access-control-list Sid that uniquely identifies this
57
55
  # resource
58
-
59
56
  # @return [IpAccessControlListList] IpAccessControlListList
60
57
  def ip_access_control_lists(sid=:unset)
61
58
  if sid != :unset
@@ -75,7 +72,6 @@ module Twilio
75
72
  ##
76
73
  # Access the credential_lists
77
74
  # @param [String] sid The credential Sid that uniquely identifies this resource
78
-
79
75
  # @return [CredentialListList] CredentialListList
80
76
  def credential_lists(sid=:unset)
81
77
  if sid != :unset
@@ -107,7 +103,6 @@ module Twilio
107
103
  # @param [Hash] solution Path solution for the resource
108
104
  # @param [String] account_sid A 34 character string that uniquely identifies this
109
105
  # resource.
110
-
111
106
  # @return [SipPage] SipPage
112
107
  def initialize(version, response, solution)
113
108
  super(version, response)
@@ -119,13 +114,12 @@ module Twilio
119
114
  ##
120
115
  # Build an instance of SipInstance
121
116
  # @param [Hash] payload Payload response from the API
122
-
123
117
  # @return [SipInstance] SipInstance
124
118
  def get_instance(payload)
125
119
  return SipInstance.new(
126
120
  @version,
127
121
  payload,
128
- account_sid: @solution['account_sid'],
122
+ account_sid: @solution[:account_sid],
129
123
  )
130
124
  end
131
125
 
@@ -143,7 +137,6 @@ module Twilio
143
137
  # @param [Hash] payload payload that contains response from Twilio
144
138
  # @param [String] account_sid A 34 character string that uniquely identifies this
145
139
  # resource.
146
-
147
140
  # @return [SipInstance] SipInstance
148
141
  def initialize(version, payload, account_sid: nil)
149
142
  super(version)
@@ -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 [ShortCodeList] ShortCodeList
21
20
  def initialize(version, account_sid: nil)
22
21
  super(version)
@@ -42,7 +41,6 @@ module Twilio
42
41
  # the default value of 50 records. If no page_size is defined
43
42
  # but a limit is defined, stream() will attempt to read the
44
43
  # limit with the most efficient page size, i.e. min(limit, 1000)
45
-
46
44
  # @return [Array] Array of up to limit results
47
45
  def list(friendly_name: nil, short_code: nil, limit: nil, page_size: nil)
48
46
  self.stream(
@@ -67,7 +65,6 @@ module Twilio
67
65
  # the default value of 50 records. If no page_size is defined
68
66
  # but a limit is defined, stream() will attempt to read the
69
67
  # limit with the most efficient page size, i.e. min(limit, 1000)
70
-
71
68
  # @return [Enumerable] Enumerable that will yield up to limit results
72
69
  def stream(friendly_name: nil, short_code: nil, limit: nil, page_size: nil)
73
70
  limits = @version.read_limits(limit, page_size)
@@ -117,7 +114,6 @@ module Twilio
117
114
  # @param [String] page_token PageToken provided by the API
118
115
  # @param [Integer] page_number Page Number, this value is simply for client state
119
116
  # @param [Integer] page_size Number of records to return, defaults to 50
120
-
121
117
  # @return [Page] Page of ShortCodeInstance
122
118
  def page(friendly_name: nil, short_code: nil, page_token: nil, page_number: nil, page_size: nil)
123
119
  params = {
@@ -150,7 +146,6 @@ module Twilio
150
146
  # @param [Hash] solution Path solution for the resource
151
147
  # @param [String] account_sid A 34 character string that uniquely identifies this
152
148
  # resource.
153
-
154
149
  # @return [ShortCodePage] ShortCodePage
155
150
  def initialize(version, response, solution)
156
151
  super(version, response)
@@ -162,13 +157,12 @@ module Twilio
162
157
  ##
163
158
  # Build an instance of ShortCodeInstance
164
159
  # @param [Hash] payload Payload response from the API
165
-
166
160
  # @return [ShortCodeInstance] ShortCodeInstance
167
161
  def get_instance(payload)
168
162
  return ShortCodeInstance.new(
169
163
  @version,
170
164
  payload,
171
- account_sid: @solution['account_sid'],
165
+ account_sid: @solution[:account_sid],
172
166
  )
173
167
  end
174
168
 
@@ -185,7 +179,6 @@ module Twilio
185
179
  # @param [Version] version Version that contains the resource
186
180
  # @param [String] account_sid The account_sid
187
181
  # @param [String] sid The short-code Sid that uniquely identifies this resource
188
-
189
182
  # @return [ShortCodeContext] ShortCodeContext
190
183
  def initialize(version, account_sid, sid)
191
184
  super(version)
@@ -213,8 +206,8 @@ module Twilio
213
206
  return ShortCodeInstance.new(
214
207
  @version,
215
208
  payload,
216
- account_sid: @solution['account_sid'],
217
- sid: @solution['sid'],
209
+ account_sid: @solution[:account_sid],
210
+ sid: @solution[:sid],
218
211
  )
219
212
  end
220
213
 
@@ -233,7 +226,6 @@ module Twilio
233
226
  # occurs retrieving or executing the TwiML from `SmsUrl`.
234
227
  # @param [String] sms_fallback_method The HTTP method Twilio will use when
235
228
  # requesting the above URL. Either `GET` or `POST`.
236
-
237
229
  # @return [ShortCodeInstance] Updated ShortCodeInstance
238
230
  def update(friendly_name: nil, api_version: nil, sms_url: nil, sms_method: nil, sms_fallback_url: nil, sms_fallback_method: nil)
239
231
  data = {
@@ -254,8 +246,8 @@ module Twilio
254
246
  return ShortCodeInstance.new(
255
247
  @version,
256
248
  payload,
257
- account_sid: @solution['account_sid'],
258
- sid: @solution['sid'],
249
+ account_sid: @solution[:account_sid],
250
+ sid: @solution[:sid],
259
251
  )
260
252
  end
261
253
 
@@ -275,7 +267,6 @@ module Twilio
275
267
  # @param [String] account_sid A 34 character string that uniquely identifies this
276
268
  # resource.
277
269
  # @param [String] sid The short-code Sid that uniquely identifies this resource
278
-
279
270
  # @return [ShortCodeInstance] ShortCodeInstance
280
271
  def initialize(version, payload, account_sid: nil, sid: nil)
281
272
  super(version)
@@ -308,7 +299,6 @@ module Twilio
308
299
  # Generate an instance context for the instance, the context is capable of
309
300
  # performing various actions. All instance actions are proxied to the context
310
301
  # @param [Version] version Version that contains the resource
311
-
312
302
  # @return [ShortCodeContext] ShortCodeContext for this ShortCodeInstance
313
303
  def context
314
304
  unless @instance_context
@@ -373,7 +363,7 @@ module Twilio
373
363
  # Fetch a ShortCodeInstance
374
364
  # @return [ShortCodeInstance] Fetched ShortCodeInstance
375
365
  def fetch
376
- @context.fetch()
366
+ context.fetch
377
367
  end
378
368
 
379
369
  ##
@@ -391,10 +381,10 @@ module Twilio
391
381
  # occurs retrieving or executing the TwiML from `SmsUrl`.
392
382
  # @param [String] sms_fallback_method The HTTP method Twilio will use when
393
383
  # requesting the above URL. Either `GET` or `POST`.
394
-
395
384
  # @return [ShortCodeInstance] Updated ShortCodeInstance
396
385
  def update(friendly_name: nil, api_version: nil, sms_url: nil, sms_method: nil, sms_fallback_url: nil, sms_fallback_method: nil)
397
- @context.update(
386
+ context.update(
387
+ friendly_name: friendly_name,
398
388
  api_version: api_version,
399
389
  sms_url: sms_url,
400
390
  sms_method: sms_method,
@@ -406,8 +396,8 @@ module Twilio
406
396
  ##
407
397
  # Provide a user friendly representation
408
398
  def to_s
409
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
410
- "<Twilio.Api.V2010.ShortCodeInstance #{context}>"
399
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
400
+ "<Twilio.Api.V2010.ShortCodeInstance #{values}>"
411
401
  end
412
402
  end
413
403
  end