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
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the ChannelList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] service_sid The service_sid
17
-
18
17
  # @return [ChannelList] ChannelList
19
18
  def initialize(version, service_sid: nil)
20
19
  super(version)
@@ -31,9 +30,8 @@ module Twilio
31
30
  # Request is executed immediately.
32
31
  # @param [String] friendly_name The friendly_name
33
32
  # @param [String] unique_name The unique_name
34
- # @param [String] attributes The attributes
33
+ # @param [Hash] attributes The attributes
35
34
  # @param [channel.ChannelType] type The type
36
-
37
35
  # @return [ChannelInstance] Newly created ChannelInstance
38
36
  def create(friendly_name: nil, unique_name: nil, attributes: nil, type: nil)
39
37
  data = {
@@ -52,7 +50,7 @@ module Twilio
52
50
  return ChannelInstance.new(
53
51
  @version,
54
52
  payload,
55
- service_sid: @solution['service_sid'],
53
+ service_sid: @solution[:service_sid],
56
54
  )
57
55
  end
58
56
 
@@ -66,7 +64,6 @@ module Twilio
66
64
  # the default value of 50 records. If no page_size is defined
67
65
  # but a limit is defined, stream() will attempt to read the
68
66
  # limit with the most efficient page size, i.e. min(limit, 1000)
69
-
70
67
  # @return [Array] Array of up to limit results
71
68
  def list(limit: nil, page_size: nil)
72
69
  self.stream(
@@ -85,7 +82,6 @@ module Twilio
85
82
  # the default value of 50 records. If no page_size is defined
86
83
  # but a limit is defined, stream() will attempt to read the
87
84
  # limit with the most efficient page size, i.e. min(limit, 1000)
88
-
89
85
  # @return [Enumerable] Enumerable that will yield up to limit results
90
86
  def stream(limit: nil, page_size: nil)
91
87
  limits = @version.read_limits(limit, page_size)
@@ -125,7 +121,6 @@ module Twilio
125
121
  # @param [String] page_token PageToken provided by the API
126
122
  # @param [Integer] page_number Page Number, this value is simply for client state
127
123
  # @param [Integer] page_size Number of records to return, defaults to 50
128
-
129
124
  # @return [Page] Page of ChannelInstance
130
125
  def page(page_token: nil, page_number: nil, page_size: nil)
131
126
  params = {
@@ -155,7 +150,6 @@ module Twilio
155
150
  # @param [Response] response Response from the API
156
151
  # @param [Hash] solution Path solution for the resource
157
152
  # @param [String] service_sid The service_sid
158
-
159
153
  # @return [ChannelPage] ChannelPage
160
154
  def initialize(version, response, solution)
161
155
  super(version, response)
@@ -167,13 +161,12 @@ module Twilio
167
161
  ##
168
162
  # Build an instance of ChannelInstance
169
163
  # @param [Hash] payload Payload response from the API
170
-
171
164
  # @return [ChannelInstance] ChannelInstance
172
165
  def get_instance(payload)
173
166
  return ChannelInstance.new(
174
167
  @version,
175
168
  payload,
176
- service_sid: @solution['service_sid'],
169
+ service_sid: @solution[:service_sid],
177
170
  )
178
171
  end
179
172
 
@@ -190,7 +183,6 @@ module Twilio
190
183
  # @param [Version] version Version that contains the resource
191
184
  # @param [String] service_sid The service_sid
192
185
  # @param [String] sid The sid
193
-
194
186
  # @return [ChannelContext] ChannelContext
195
187
  def initialize(version, service_sid, sid)
196
188
  super(version)
@@ -222,8 +214,8 @@ module Twilio
222
214
  return ChannelInstance.new(
223
215
  @version,
224
216
  payload,
225
- service_sid: @solution['service_sid'],
226
- sid: @solution['sid'],
217
+ service_sid: @solution[:service_sid],
218
+ sid: @solution[:sid],
227
219
  )
228
220
  end
229
221
 
@@ -238,9 +230,8 @@ module Twilio
238
230
  # Update the ChannelInstance
239
231
  # @param [String] friendly_name The friendly_name
240
232
  # @param [String] unique_name The unique_name
241
- # @param [String] attributes The attributes
233
+ # @param [Hash] attributes The attributes
242
234
  # @param [channel.ChannelType] type The type
243
-
244
235
  # @return [ChannelInstance] Updated ChannelInstance
245
236
  def update(friendly_name: nil, unique_name: nil, attributes: nil, type: nil)
246
237
  data = {
@@ -259,8 +250,8 @@ module Twilio
259
250
  return ChannelInstance.new(
260
251
  @version,
261
252
  payload,
262
- service_sid: @solution['service_sid'],
263
- sid: @solution['sid'],
253
+ service_sid: @solution[:service_sid],
254
+ sid: @solution[:sid],
264
255
  )
265
256
  end
266
257
 
@@ -327,7 +318,6 @@ module Twilio
327
318
  # @param [Hash] payload payload that contains response from Twilio
328
319
  # @param [String] service_sid The service_sid
329
320
  # @param [String] sid The sid
330
-
331
321
  # @return [ChannelInstance] ChannelInstance
332
322
  def initialize(version, payload, service_sid: nil, sid: nil)
333
323
  super(version)
@@ -360,7 +350,6 @@ module Twilio
360
350
  # Generate an instance context for the instance, the context is capable of
361
351
  # performing various actions. All instance actions are proxied to the context
362
352
  # @param [Version] version Version that contains the resource
363
-
364
353
  # @return [ChannelContext] ChannelContext for this ChannelInstance
365
354
  def context
366
355
  unless @instance_context
@@ -425,26 +414,26 @@ module Twilio
425
414
  # Fetch a ChannelInstance
426
415
  # @return [ChannelInstance] Fetched ChannelInstance
427
416
  def fetch
428
- @context.fetch()
417
+ context.fetch
429
418
  end
430
419
 
431
420
  ##
432
421
  # Deletes the ChannelInstance
433
422
  # @return [Boolean] true if delete succeeds, true otherwise
434
423
  def delete
435
- @context.delete()
424
+ context.delete
436
425
  end
437
426
 
438
427
  ##
439
428
  # Update the ChannelInstance
440
429
  # @param [String] friendly_name The friendly_name
441
430
  # @param [String] unique_name The unique_name
442
- # @param [String] attributes The attributes
431
+ # @param [Hash] attributes The attributes
443
432
  # @param [channel.ChannelType] type The type
444
-
445
433
  # @return [ChannelInstance] Updated ChannelInstance
446
434
  def update(friendly_name: nil, unique_name: nil, attributes: nil, type: nil)
447
- @context.update(
435
+ context.update(
436
+ friendly_name: friendly_name,
448
437
  unique_name: unique_name,
449
438
  attributes: attributes,
450
439
  type: type,
@@ -455,21 +444,21 @@ module Twilio
455
444
  # Access the members
456
445
  # @return [members] members
457
446
  def members
458
- @context.members
447
+ context.members
459
448
  end
460
449
 
461
450
  ##
462
451
  # Access the messages
463
452
  # @return [messages] messages
464
453
  def messages
465
- @context.messages
454
+ context.messages
466
455
  end
467
456
 
468
457
  ##
469
458
  # Provide a user friendly representation
470
459
  def to_s
471
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
472
- "<Twilio.IpMessaging.V1.ChannelInstance #{context}>"
460
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
461
+ "<Twilio.IpMessaging.V1.ChannelInstance #{values}>"
473
462
  end
474
463
  end
475
464
  end
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the RoleList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] service_sid The service_sid
17
-
18
17
  # @return [RoleList] RoleList
19
18
  def initialize(version, service_sid: nil)
20
19
  super(version)
@@ -32,7 +31,6 @@ module Twilio
32
31
  # @param [String] friendly_name The friendly_name
33
32
  # @param [role.RoleType] type The type
34
33
  # @param [String] permission The permission
35
-
36
34
  # @return [RoleInstance] Newly created RoleInstance
37
35
  def create(friendly_name: nil, type: nil, permission: nil)
38
36
  data = {
@@ -50,7 +48,7 @@ module Twilio
50
48
  return RoleInstance.new(
51
49
  @version,
52
50
  payload,
53
- service_sid: @solution['service_sid'],
51
+ service_sid: @solution[:service_sid],
54
52
  )
55
53
  end
56
54
 
@@ -64,7 +62,6 @@ module Twilio
64
62
  # the default value of 50 records. If no page_size is defined
65
63
  # but a limit is defined, stream() will attempt to read the
66
64
  # limit with the most efficient page size, i.e. min(limit, 1000)
67
-
68
65
  # @return [Array] Array of up to limit results
69
66
  def list(limit: nil, page_size: nil)
70
67
  self.stream(
@@ -83,7 +80,6 @@ module Twilio
83
80
  # the default value of 50 records. If no page_size is defined
84
81
  # but a limit is defined, stream() will attempt to read the
85
82
  # limit with the most efficient page size, i.e. min(limit, 1000)
86
-
87
83
  # @return [Enumerable] Enumerable that will yield up to limit results
88
84
  def stream(limit: nil, page_size: nil)
89
85
  limits = @version.read_limits(limit, page_size)
@@ -123,7 +119,6 @@ module Twilio
123
119
  # @param [String] page_token PageToken provided by the API
124
120
  # @param [Integer] page_number Page Number, this value is simply for client state
125
121
  # @param [Integer] page_size Number of records to return, defaults to 50
126
-
127
122
  # @return [Page] Page of RoleInstance
128
123
  def page(page_token: nil, page_number: nil, page_size: nil)
129
124
  params = {
@@ -153,7 +148,6 @@ module Twilio
153
148
  # @param [Response] response Response from the API
154
149
  # @param [Hash] solution Path solution for the resource
155
150
  # @param [String] service_sid The service_sid
156
-
157
151
  # @return [RolePage] RolePage
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 RoleInstance
167
161
  # @param [Hash] payload Payload response from the API
168
-
169
162
  # @return [RoleInstance] RoleInstance
170
163
  def get_instance(payload)
171
164
  return RoleInstance.new(
172
165
  @version,
173
166
  payload,
174
- service_sid: @solution['service_sid'],
167
+ service_sid: @solution[:service_sid],
175
168
  )
176
169
  end
177
170
 
@@ -188,7 +181,6 @@ module Twilio
188
181
  # @param [Version] version Version that contains the resource
189
182
  # @param [String] service_sid The service_sid
190
183
  # @param [String] sid The sid
191
-
192
184
  # @return [RoleContext] RoleContext
193
185
  def initialize(version, service_sid, sid)
194
186
  super(version)
@@ -216,8 +208,8 @@ module Twilio
216
208
  return RoleInstance.new(
217
209
  @version,
218
210
  payload,
219
- service_sid: @solution['service_sid'],
220
- sid: @solution['sid'],
211
+ service_sid: @solution[:service_sid],
212
+ sid: @solution[:sid],
221
213
  )
222
214
  end
223
215
 
@@ -232,7 +224,6 @@ module Twilio
232
224
  # Update the RoleInstance
233
225
  # @param [String] friendly_name The friendly_name
234
226
  # @param [String] permission The permission
235
-
236
227
  # @return [RoleInstance] Updated RoleInstance
237
228
  def update(friendly_name: nil, permission: nil)
238
229
  data = {
@@ -249,8 +240,8 @@ module Twilio
249
240
  return RoleInstance.new(
250
241
  @version,
251
242
  payload,
252
- service_sid: @solution['service_sid'],
253
- sid: @solution['sid'],
243
+ service_sid: @solution[:service_sid],
244
+ sid: @solution[:sid],
254
245
  )
255
246
  end
256
247
 
@@ -269,7 +260,6 @@ module Twilio
269
260
  # @param [Hash] payload payload that contains response from Twilio
270
261
  # @param [String] service_sid The service_sid
271
262
  # @param [String] sid The sid
272
-
273
263
  # @return [RoleInstance] RoleInstance
274
264
  def initialize(version, payload, service_sid: nil, sid: nil)
275
265
  super(version)
@@ -299,7 +289,6 @@ module Twilio
299
289
  # Generate an instance context for the instance, the context is capable of
300
290
  # performing various actions. All instance actions are proxied to the context
301
291
  # @param [Version] version Version that contains the resource
302
-
303
292
  # @return [RoleContext] RoleContext for this RoleInstance
304
293
  def context
305
294
  unless @instance_context
@@ -352,24 +341,24 @@ module Twilio
352
341
  # Fetch a RoleInstance
353
342
  # @return [RoleInstance] Fetched RoleInstance
354
343
  def fetch
355
- @context.fetch()
344
+ context.fetch
356
345
  end
357
346
 
358
347
  ##
359
348
  # Deletes the RoleInstance
360
349
  # @return [Boolean] true if delete succeeds, true otherwise
361
350
  def delete
362
- @context.delete()
351
+ context.delete
363
352
  end
364
353
 
365
354
  ##
366
355
  # Update the RoleInstance
367
356
  # @param [String] friendly_name The friendly_name
368
357
  # @param [String] permission The permission
369
-
370
358
  # @return [RoleInstance] Updated RoleInstance
371
359
  def update(friendly_name: nil, permission: nil)
372
- @context.update(
360
+ context.update(
361
+ friendly_name: friendly_name,
373
362
  permission: permission,
374
363
  )
375
364
  end
@@ -377,8 +366,8 @@ module Twilio
377
366
  ##
378
367
  # Provide a user friendly representation
379
368
  def to_s
380
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
381
- "<Twilio.IpMessaging.V1.RoleInstance #{context}>"
369
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
370
+ "<Twilio.IpMessaging.V1.RoleInstance #{values}>"
382
371
  end
383
372
  end
384
373
  end
@@ -14,7 +14,6 @@ module Twilio
14
14
  # Initialize the UserList
15
15
  # @param [Version] version Version that contains the resource
16
16
  # @param [String] service_sid The service_sid
17
-
18
17
  # @return [UserList] UserList
19
18
  def initialize(version, service_sid: nil)
20
19
  super(version)
@@ -31,7 +30,6 @@ module Twilio
31
30
  # Request is executed immediately.
32
31
  # @param [String] identity The identity
33
32
  # @param [String] role_sid The role_sid
34
-
35
33
  # @return [UserInstance] Newly created UserInstance
36
34
  def create(identity: nil, role_sid: nil)
37
35
  data = {
@@ -48,7 +46,7 @@ module Twilio
48
46
  return UserInstance.new(
49
47
  @version,
50
48
  payload,
51
- service_sid: @solution['service_sid'],
49
+ service_sid: @solution[:service_sid],
52
50
  )
53
51
  end
54
52
 
@@ -62,7 +60,6 @@ module Twilio
62
60
  # the default value of 50 records. If no page_size is defined
63
61
  # but a limit is defined, stream() will attempt to read the
64
62
  # limit with the most efficient page size, i.e. min(limit, 1000)
65
-
66
63
  # @return [Array] Array of up to limit results
67
64
  def list(limit: nil, page_size: nil)
68
65
  self.stream(
@@ -81,7 +78,6 @@ module Twilio
81
78
  # the default value of 50 records. If no page_size is defined
82
79
  # but a limit is defined, stream() will attempt to read the
83
80
  # limit with the most efficient page size, i.e. min(limit, 1000)
84
-
85
81
  # @return [Enumerable] Enumerable that will yield up to limit results
86
82
  def stream(limit: nil, page_size: nil)
87
83
  limits = @version.read_limits(limit, page_size)
@@ -121,7 +117,6 @@ module Twilio
121
117
  # @param [String] page_token PageToken provided by the API
122
118
  # @param [Integer] page_number Page Number, this value is simply for client state
123
119
  # @param [Integer] page_size Number of records to return, defaults to 50
124
-
125
120
  # @return [Page] Page of UserInstance
126
121
  def page(page_token: nil, page_number: nil, page_size: nil)
127
122
  params = {
@@ -151,7 +146,6 @@ module Twilio
151
146
  # @param [Response] response Response from the API
152
147
  # @param [Hash] solution Path solution for the resource
153
148
  # @param [String] service_sid The service_sid
154
-
155
149
  # @return [UserPage] UserPage
156
150
  def initialize(version, response, solution)
157
151
  super(version, response)
@@ -163,13 +157,12 @@ module Twilio
163
157
  ##
164
158
  # Build an instance of UserInstance
165
159
  # @param [Hash] payload Payload response from the API
166
-
167
160
  # @return [UserInstance] UserInstance
168
161
  def get_instance(payload)
169
162
  return UserInstance.new(
170
163
  @version,
171
164
  payload,
172
- service_sid: @solution['service_sid'],
165
+ service_sid: @solution[:service_sid],
173
166
  )
174
167
  end
175
168
 
@@ -186,7 +179,6 @@ module Twilio
186
179
  # @param [Version] version Version that contains the resource
187
180
  # @param [String] service_sid The service_sid
188
181
  # @param [String] sid The sid
189
-
190
182
  # @return [UserContext] UserContext
191
183
  def initialize(version, service_sid, sid)
192
184
  super(version)
@@ -214,8 +206,8 @@ module Twilio
214
206
  return UserInstance.new(
215
207
  @version,
216
208
  payload,
217
- service_sid: @solution['service_sid'],
218
- sid: @solution['sid'],
209
+ service_sid: @solution[:service_sid],
210
+ sid: @solution[:sid],
219
211
  )
220
212
  end
221
213
 
@@ -229,11 +221,14 @@ module Twilio
229
221
  ##
230
222
  # Update the UserInstance
231
223
  # @param [String] role_sid The role_sid
232
-
224
+ # @param [Hash] attributes The attributes
225
+ # @param [String] friendly_name The friendly_name
233
226
  # @return [UserInstance] Updated UserInstance
234
- def update(role_sid: nil)
227
+ def update(role_sid: nil, attributes: nil, friendly_name: nil)
235
228
  data = {
236
229
  'RoleSid' => role_sid,
230
+ 'Attributes' => attributes,
231
+ 'FriendlyName' => friendly_name,
237
232
  }
238
233
 
239
234
  payload = @version.update(
@@ -245,8 +240,8 @@ module Twilio
245
240
  return UserInstance.new(
246
241
  @version,
247
242
  payload,
248
- service_sid: @solution['service_sid'],
249
- sid: @solution['sid'],
243
+ service_sid: @solution[:service_sid],
244
+ sid: @solution[:sid],
250
245
  )
251
246
  end
252
247
 
@@ -265,7 +260,6 @@ module Twilio
265
260
  # @param [Hash] payload payload that contains response from Twilio
266
261
  # @param [String] service_sid The service_sid
267
262
  # @param [String] sid The sid
268
-
269
263
  # @return [UserInstance] UserInstance
270
264
  def initialize(version, payload, service_sid: nil, sid: nil)
271
265
  super(version)
@@ -294,7 +288,6 @@ module Twilio
294
288
  # Generate an instance context for the instance, the context is capable of
295
289
  # performing various actions. All instance actions are proxied to the context
296
290
  # @param [Version] version Version that contains the resource
297
-
298
291
  # @return [UserContext] UserContext for this UserInstance
299
292
  def context
300
293
  unless @instance_context
@@ -343,30 +336,35 @@ module Twilio
343
336
  # Fetch a UserInstance
344
337
  # @return [UserInstance] Fetched UserInstance
345
338
  def fetch
346
- @context.fetch()
339
+ context.fetch
347
340
  end
348
341
 
349
342
  ##
350
343
  # Deletes the UserInstance
351
344
  # @return [Boolean] true if delete succeeds, true otherwise
352
345
  def delete
353
- @context.delete()
346
+ context.delete
354
347
  end
355
348
 
356
349
  ##
357
350
  # Update the UserInstance
358
351
  # @param [String] role_sid The role_sid
359
-
352
+ # @param [Hash] attributes The attributes
353
+ # @param [String] friendly_name The friendly_name
360
354
  # @return [UserInstance] Updated UserInstance
361
- def update(role_sid: nil)
362
- @context.update()
355
+ def update(role_sid: nil, attributes: nil, friendly_name: nil)
356
+ context.update(
357
+ role_sid: role_sid,
358
+ attributes: attributes,
359
+ friendly_name: friendly_name,
360
+ )
363
361
  end
364
362
 
365
363
  ##
366
364
  # Provide a user friendly representation
367
365
  def to_s
368
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
369
- "<Twilio.IpMessaging.V1.UserInstance #{context}>"
366
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
367
+ "<Twilio.IpMessaging.V1.UserInstance #{values}>"
370
368
  end
371
369
  end
372
370
  end