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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9e0a088bb7495380c32b2eb9e4699c0d709a712
4
- data.tar.gz: 532d5bbe3b1caf0297b29081ec94db582f0776cd
3
+ metadata.gz: befdd4f96aa0b5e442b72e11092febd7e239f710
4
+ data.tar.gz: 0efa699b3d93dbf76b0252cfb55fb78475c37247
5
5
  SHA512:
6
- metadata.gz: b91721c811c2178e85ae9cb9cc4dcaf422cfcb490ac95b2c47a79a2bb5e521978fe643c40c8566d3326b796a3b4662466567c3b2ad191e15b1361d950e70fe19
7
- data.tar.gz: 0c31e5e6f419979d75b95269b6b840777abda4498353d52c149878b7c3650d51d0147bbf4db8b22e663ddb91c1d6e54e00a13f7a47dc64e4fea7319e04904f59
6
+ metadata.gz: 8e746dba563996ad009d22c9177ab41d8474a7b65ef149d047235bca7abd2a8204228942bbd1ba8ab3ab7ecf8070c324c8a313089b832d191bc7adb5c4336a0c
7
+ data.tar.gz: 2316f5410d312dc300d2ac8e507afe1b869306af9eae5a69ec1116f920258436cc5827591f51bf4033e8223ebe110bf90f6c7f443acc699c0c5bcef1bb50df9e
@@ -16,7 +16,6 @@ module Twilio
16
16
  # @param [Version] version Version that contains the resource
17
17
  # @param [String] account_sid The account_sid
18
18
  # @param [String] address_sid The sid
19
-
20
19
  # @return [DependentPhoneNumberList] DependentPhoneNumberList
21
20
  def initialize(version, account_sid: nil, address_sid: nil)
22
21
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # the default value of 50 records. If no page_size is defined
40
39
  # but a limit is defined, stream() will attempt to read the
41
40
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
-
43
41
  # @return [Array] Array of up to limit results
44
42
  def list(limit: nil, page_size: nil)
45
43
  self.stream(
@@ -58,7 +56,6 @@ module Twilio
58
56
  # the default value of 50 records. If no page_size is defined
59
57
  # but a limit is defined, stream() will attempt to read the
60
58
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
-
62
59
  # @return [Enumerable] Enumerable that will yield up to limit results
63
60
  def stream(limit: nil, page_size: nil)
64
61
  limits = @version.read_limits(limit, page_size)
@@ -98,7 +95,6 @@ module Twilio
98
95
  # @param [String] page_token PageToken provided by the API
99
96
  # @param [Integer] page_number Page Number, this value is simply for client state
100
97
  # @param [Integer] page_size Number of records to return, defaults to 50
101
-
102
98
  # @return [Page] Page of DependentPhoneNumberInstance
103
99
  def page(page_token: nil, page_number: nil, page_size: nil)
104
100
  params = {
@@ -129,7 +125,6 @@ module Twilio
129
125
  # @param [Hash] solution Path solution for the resource
130
126
  # @param [String] account_sid The account_sid
131
127
  # @param [String] address_sid The sid
132
-
133
128
  # @return [DependentPhoneNumberPage] DependentPhoneNumberPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,14 +136,13 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of DependentPhoneNumberInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [DependentPhoneNumberInstance] DependentPhoneNumberInstance
146
140
  def get_instance(payload)
147
141
  return DependentPhoneNumberInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
151
- address_sid: @solution['address_sid'],
144
+ account_sid: @solution[:account_sid],
145
+ address_sid: @solution[:address_sid],
152
146
  )
153
147
  end
154
148
 
@@ -166,7 +160,6 @@ module Twilio
166
160
  # @param [Hash] payload payload that contains response from Twilio
167
161
  # @param [String] account_sid The account_sid
168
162
  # @param [String] address_sid The sid
169
-
170
163
  # @return [DependentPhoneNumberInstance] DependentPhoneNumberInstance
171
164
  def initialize(version, payload, account_sid: nil, address_sid: nil)
172
165
  super(version)
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the AddressList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] account_sid The account_sid
17
-
18
17
  # @return [AddressList] AddressList
19
18
  def initialize(version, account_sid: nil)
20
19
  super(version)
@@ -36,7 +35,6 @@ module Twilio
36
35
  # @param [String] postal_code The postal_code
37
36
  # @param [String] iso_country The iso_country
38
37
  # @param [String] friendly_name The friendly_name
39
-
40
38
  # @return [AddressInstance] Newly created AddressInstance
41
39
  def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil, iso_country: nil, friendly_name: nil)
42
40
  data = {
@@ -58,7 +56,7 @@ module Twilio
58
56
  return AddressInstance.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
 
@@ -75,7 +73,6 @@ module Twilio
75
73
  # the default value of 50 records. If no page_size is defined
76
74
  # but a limit is defined, stream() will attempt to read the
77
75
  # limit with the most efficient page size, i.e. min(limit, 1000)
78
-
79
76
  # @return [Array] Array of up to limit results
80
77
  def list(customer_name: nil, friendly_name: nil, iso_country: nil, limit: nil, page_size: nil)
81
78
  self.stream(
@@ -100,7 +97,6 @@ module Twilio
100
97
  # the default value of 50 records. If no page_size is defined
101
98
  # but a limit is defined, stream() will attempt to read the
102
99
  # limit with the most efficient page size, i.e. min(limit, 1000)
103
-
104
100
  # @return [Enumerable] Enumerable that will yield up to limit results
105
101
  def stream(customer_name: nil, friendly_name: nil, iso_country: nil, limit: nil, page_size: nil)
106
102
  limits = @version.read_limits(limit, page_size)
@@ -149,7 +145,6 @@ module Twilio
149
145
  # @param [String] page_token PageToken provided by the API
150
146
  # @param [Integer] page_number Page Number, this value is simply for client state
151
147
  # @param [Integer] page_size Number of records to return, defaults to 50
152
-
153
148
  # @return [Page] Page of AddressInstance
154
149
  def page(customer_name: nil, friendly_name: nil, iso_country: nil, page_token: nil, page_number: nil, page_size: nil)
155
150
  params = {
@@ -182,7 +177,6 @@ module Twilio
182
177
  # @param [Response] response Response from the API
183
178
  # @param [Hash] solution Path solution for the resource
184
179
  # @param [String] account_sid The account_sid
185
-
186
180
  # @return [AddressPage] AddressPage
187
181
  def initialize(version, response, solution)
188
182
  super(version, response)
@@ -194,13 +188,12 @@ module Twilio
194
188
  ##
195
189
  # Build an instance of AddressInstance
196
190
  # @param [Hash] payload Payload response from the API
197
-
198
191
  # @return [AddressInstance] AddressInstance
199
192
  def get_instance(payload)
200
193
  return AddressInstance.new(
201
194
  @version,
202
195
  payload,
203
- account_sid: @solution['account_sid'],
196
+ account_sid: @solution[:account_sid],
204
197
  )
205
198
  end
206
199
 
@@ -217,7 +210,6 @@ module Twilio
217
210
  # @param [Version] version Version that contains the resource
218
211
  # @param [String] account_sid The account_sid
219
212
  # @param [String] sid The sid
220
-
221
213
  # @return [AddressContext] AddressContext
222
214
  def initialize(version, account_sid, sid)
223
215
  super(version)
@@ -255,8 +247,8 @@ module Twilio
255
247
  return AddressInstance.new(
256
248
  @version,
257
249
  payload,
258
- account_sid: @solution['account_sid'],
259
- sid: @solution['sid'],
250
+ account_sid: @solution[:account_sid],
251
+ sid: @solution[:sid],
260
252
  )
261
253
  end
262
254
 
@@ -268,7 +260,6 @@ module Twilio
268
260
  # @param [String] city The city
269
261
  # @param [String] region The region
270
262
  # @param [String] postal_code The postal_code
271
-
272
263
  # @return [AddressInstance] Updated AddressInstance
273
264
  def update(friendly_name: nil, customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil)
274
265
  data = {
@@ -289,8 +280,8 @@ module Twilio
289
280
  return AddressInstance.new(
290
281
  @version,
291
282
  payload,
292
- account_sid: @solution['account_sid'],
293
- sid: @solution['sid'],
283
+ account_sid: @solution[:account_sid],
284
+ sid: @solution[:sid],
294
285
  )
295
286
  end
296
287
 
@@ -324,7 +315,6 @@ module Twilio
324
315
  # @param [Hash] payload payload that contains response from Twilio
325
316
  # @param [String] account_sid The account_sid
326
317
  # @param [String] sid The sid
327
-
328
318
  # @return [AddressInstance] AddressInstance
329
319
  def initialize(version, payload, account_sid: nil, sid: nil)
330
320
  super(version)
@@ -357,7 +347,6 @@ module Twilio
357
347
  # Generate an instance context for the instance, the context is capable of
358
348
  # performing various actions. All instance actions are proxied to the context
359
349
  # @param [Version] version Version that contains the resource
360
-
361
350
  # @return [AddressContext] AddressContext for this AddressInstance
362
351
  def context
363
352
  unless @instance_context
@@ -422,14 +411,14 @@ module Twilio
422
411
  # Deletes the AddressInstance
423
412
  # @return [Boolean] true if delete succeeds, true otherwise
424
413
  def delete
425
- @context.delete()
414
+ context.delete
426
415
  end
427
416
 
428
417
  ##
429
418
  # Fetch a AddressInstance
430
419
  # @return [AddressInstance] Fetched AddressInstance
431
420
  def fetch
432
- @context.fetch()
421
+ context.fetch
433
422
  end
434
423
 
435
424
  ##
@@ -440,10 +429,10 @@ module Twilio
440
429
  # @param [String] city The city
441
430
  # @param [String] region The region
442
431
  # @param [String] postal_code The postal_code
443
-
444
432
  # @return [AddressInstance] Updated AddressInstance
445
433
  def update(friendly_name: nil, customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil)
446
- @context.update(
434
+ context.update(
435
+ friendly_name: friendly_name,
447
436
  customer_name: customer_name,
448
437
  street: street,
449
438
  city: city,
@@ -456,14 +445,14 @@ module Twilio
456
445
  # Access the dependent_phone_numbers
457
446
  # @return [dependent_phone_numbers] dependent_phone_numbers
458
447
  def dependent_phone_numbers
459
- @context.dependent_phone_numbers
448
+ context.dependent_phone_numbers
460
449
  end
461
450
 
462
451
  ##
463
452
  # Provide a user friendly representation
464
453
  def to_s
465
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
466
- "<Twilio.Api.V2010.AddressInstance #{context}>"
454
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
455
+ "<Twilio.Api.V2010.AddressInstance #{values}>"
467
456
  end
468
457
  end
469
458
  end
@@ -15,7 +15,6 @@ module Twilio
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] account_sid The unique id of the Account that created this
17
17
  # application.
18
-
19
18
  # @return [ApplicationList] ApplicationList
20
19
  def initialize(version, account_sid: nil)
21
20
  super(version)
@@ -63,7 +62,6 @@ module Twilio
63
62
  # this URL to pass status parameters (such as sent or failed) to your application
64
63
  # if you use the `/Messages` endpoint to send the message and specify this
65
64
  # application's `Sid` as the `ApplicationSid` on an outgoing SMS request.
66
-
67
65
  # @return [ApplicationInstance] Newly created ApplicationInstance
68
66
  def create(friendly_name: nil, api_version: nil, voice_url: nil, voice_method: nil, voice_fallback_url: nil, voice_fallback_method: nil, status_callback: nil, status_callback_method: nil, voice_caller_id_lookup: nil, sms_url: nil, sms_method: nil, sms_fallback_url: nil, sms_fallback_method: nil, sms_status_callback: nil, message_status_callback: nil)
69
67
  data = {
@@ -93,7 +91,7 @@ module Twilio
93
91
  return ApplicationInstance.new(
94
92
  @version,
95
93
  payload,
96
- account_sid: @solution['account_sid'],
94
+ account_sid: @solution[:account_sid],
97
95
  )
98
96
  end
99
97
 
@@ -109,7 +107,6 @@ module Twilio
109
107
  # the default value of 50 records. If no page_size is defined
110
108
  # but a limit is defined, stream() will attempt to read the
111
109
  # limit with the most efficient page size, i.e. min(limit, 1000)
112
-
113
110
  # @return [Array] Array of up to limit results
114
111
  def list(friendly_name: nil, limit: nil, page_size: nil)
115
112
  self.stream(
@@ -131,7 +128,6 @@ module Twilio
131
128
  # the default value of 50 records. If no page_size is defined
132
129
  # but a limit is defined, stream() will attempt to read the
133
130
  # limit with the most efficient page size, i.e. min(limit, 1000)
134
-
135
131
  # @return [Enumerable] Enumerable that will yield up to limit results
136
132
  def stream(friendly_name: nil, limit: nil, page_size: nil)
137
133
  limits = @version.read_limits(limit, page_size)
@@ -176,7 +172,6 @@ module Twilio
176
172
  # @param [String] page_token PageToken provided by the API
177
173
  # @param [Integer] page_number Page Number, this value is simply for client state
178
174
  # @param [Integer] page_size Number of records to return, defaults to 50
179
-
180
175
  # @return [Page] Page of ApplicationInstance
181
176
  def page(friendly_name: nil, page_token: nil, page_number: nil, page_size: nil)
182
177
  params = {
@@ -208,7 +203,6 @@ module Twilio
208
203
  # @param [Hash] solution Path solution for the resource
209
204
  # @param [String] account_sid The unique id of the Account that created this
210
205
  # application.
211
-
212
206
  # @return [ApplicationPage] ApplicationPage
213
207
  def initialize(version, response, solution)
214
208
  super(version, response)
@@ -220,13 +214,12 @@ module Twilio
220
214
  ##
221
215
  # Build an instance of ApplicationInstance
222
216
  # @param [Hash] payload Payload response from the API
223
-
224
217
  # @return [ApplicationInstance] ApplicationInstance
225
218
  def get_instance(payload)
226
219
  return ApplicationInstance.new(
227
220
  @version,
228
221
  payload,
229
- account_sid: @solution['account_sid'],
222
+ account_sid: @solution[:account_sid],
230
223
  )
231
224
  end
232
225
 
@@ -244,7 +237,6 @@ module Twilio
244
237
  # @param [String] account_sid The account_sid
245
238
  # @param [String] sid The application Sid that that uniquely identifies this
246
239
  # resource
247
-
248
240
  # @return [ApplicationContext] ApplicationContext
249
241
  def initialize(version, account_sid, sid)
250
242
  super(version)
@@ -279,8 +271,8 @@ module Twilio
279
271
  return ApplicationInstance.new(
280
272
  @version,
281
273
  payload,
282
- account_sid: @solution['account_sid'],
283
- sid: @solution['sid'],
274
+ account_sid: @solution[:account_sid],
275
+ sid: @solution[:sid],
284
276
  )
285
277
  end
286
278
 
@@ -319,7 +311,6 @@ module Twilio
319
311
  # this URL to pass status parameters (such as sent or failed) to your application
320
312
  # if you use the `/Messages` endpoint to send the message and specify this
321
313
  # application's `Sid` as the `ApplicationSid` on an outgoing SMS request.
322
-
323
314
  # @return [ApplicationInstance] Updated ApplicationInstance
324
315
  def update(friendly_name: nil, api_version: nil, voice_url: nil, voice_method: nil, voice_fallback_url: nil, voice_fallback_method: nil, status_callback: nil, status_callback_method: nil, voice_caller_id_lookup: nil, sms_url: nil, sms_method: nil, sms_fallback_url: nil, sms_fallback_method: nil, sms_status_callback: nil, message_status_callback: nil)
325
316
  data = {
@@ -349,8 +340,8 @@ module Twilio
349
340
  return ApplicationInstance.new(
350
341
  @version,
351
342
  payload,
352
- account_sid: @solution['account_sid'],
353
- sid: @solution['sid'],
343
+ account_sid: @solution[:account_sid],
344
+ sid: @solution[:sid],
354
345
  )
355
346
  end
356
347
 
@@ -371,7 +362,6 @@ module Twilio
371
362
  # application.
372
363
  # @param [String] sid The application Sid that that uniquely identifies this
373
364
  # resource
374
-
375
365
  # @return [ApplicationInstance] ApplicationInstance
376
366
  def initialize(version, payload, account_sid: nil, sid: nil)
377
367
  super(version)
@@ -412,7 +402,6 @@ module Twilio
412
402
  # Generate an instance context for the instance, the context is capable of
413
403
  # performing various actions. All instance actions are proxied to the context
414
404
  # @param [Version] version Version that contains the resource
415
-
416
405
  # @return [ApplicationContext] ApplicationContext for this ApplicationInstance
417
406
  def context
418
407
  unless @instance_context
@@ -509,14 +498,14 @@ module Twilio
509
498
  # Deletes the ApplicationInstance
510
499
  # @return [Boolean] true if delete succeeds, true otherwise
511
500
  def delete
512
- @context.delete()
501
+ context.delete
513
502
  end
514
503
 
515
504
  ##
516
505
  # Fetch a ApplicationInstance
517
506
  # @return [ApplicationInstance] Fetched ApplicationInstance
518
507
  def fetch
519
- @context.fetch()
508
+ context.fetch
520
509
  end
521
510
 
522
511
  ##
@@ -554,10 +543,10 @@ module Twilio
554
543
  # this URL to pass status parameters (such as sent or failed) to your application
555
544
  # if you use the `/Messages` endpoint to send the message and specify this
556
545
  # application's `Sid` as the `ApplicationSid` on an outgoing SMS request.
557
-
558
546
  # @return [ApplicationInstance] Updated ApplicationInstance
559
547
  def update(friendly_name: nil, api_version: nil, voice_url: nil, voice_method: nil, voice_fallback_url: nil, voice_fallback_method: nil, status_callback: nil, status_callback_method: nil, voice_caller_id_lookup: nil, sms_url: nil, sms_method: nil, sms_fallback_url: nil, sms_fallback_method: nil, sms_status_callback: nil, message_status_callback: nil)
560
- @context.update(
548
+ context.update(
549
+ friendly_name: friendly_name,
561
550
  api_version: api_version,
562
551
  voice_url: voice_url,
563
552
  voice_method: voice_method,
@@ -578,8 +567,8 @@ module Twilio
578
567
  ##
579
568
  # Provide a user friendly representation
580
569
  def to_s
581
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
582
- "<Twilio.Api.V2010.ApplicationInstance #{context}>"
570
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
571
+ "<Twilio.Api.V2010.ApplicationInstance #{values}>"
583
572
  end
584
573
  end
585
574
  end
@@ -15,7 +15,6 @@ module Twilio
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] account_sid The unique id of the SubAccount this Connect App has
17
17
  # access to.
18
-
19
18
  # @return [AuthorizedConnectAppList] AuthorizedConnectAppList
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 AuthorizedConnectAppInstance
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 SubAccount this Connect App has
129
125
  # access to.
130
-
131
126
  # @return [AuthorizedConnectAppPage] AuthorizedConnectAppPage
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 AuthorizedConnectAppInstance
141
136
  # @param [Hash] payload Payload response from the API
142
-
143
137
  # @return [AuthorizedConnectAppInstance] AuthorizedConnectAppInstance
144
138
  def get_instance(payload)
145
139
  return AuthorizedConnectAppInstance.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] connect_app_sid The connect_app_sid
165
-
166
159
  # @return [AuthorizedConnectAppContext] AuthorizedConnectAppContext
167
160
  def initialize(version, account_sid, connect_app_sid)
168
161
  super(version)
@@ -190,8 +183,8 @@ module Twilio
190
183
  return AuthorizedConnectAppInstance.new(
191
184
  @version,
192
185
  payload,
193
- account_sid: @solution['account_sid'],
194
- connect_app_sid: @solution['connect_app_sid'],
186
+ account_sid: @solution[:account_sid],
187
+ connect_app_sid: @solution[:connect_app_sid],
195
188
  )
196
189
  end
197
190
 
@@ -211,7 +204,6 @@ module Twilio
211
204
  # @param [String] account_sid The unique id of the SubAccount this Connect App has
212
205
  # access to.
213
206
  # @param [String] connect_app_sid The connect_app_sid
214
-
215
207
  # @return [AuthorizedConnectAppInstance] AuthorizedConnectAppInstance
216
208
  def initialize(version, payload, account_sid: nil, connect_app_sid: nil)
217
209
  super(version)
@@ -242,7 +234,6 @@ module Twilio
242
234
  # Generate an instance context for the instance, the context is capable of
243
235
  # performing various actions. All instance actions are proxied to the context
244
236
  # @param [Version] version Version that contains the resource
245
-
246
237
  # @return [AuthorizedConnectAppContext] AuthorizedConnectAppContext for this AuthorizedConnectAppInstance
247
238
  def context
248
239
  unless @instance_context
@@ -299,14 +290,14 @@ module Twilio
299
290
  # Fetch a AuthorizedConnectAppInstance
300
291
  # @return [AuthorizedConnectAppInstance] Fetched AuthorizedConnectAppInstance
301
292
  def fetch
302
- @context.fetch()
293
+ context.fetch
303
294
  end
304
295
 
305
296
  ##
306
297
  # Provide a user friendly representation
307
298
  def to_s
308
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
309
- "<Twilio.Api.V2010.AuthorizedConnectAppInstance #{context}>"
299
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
300
+ "<Twilio.Api.V2010.AuthorizedConnectAppInstance #{values}>"
310
301
  end
311
302
  end
312
303
  end