twilio-ruby 5.0.0.rc9 → 5.0.0.rc10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +2 -9
  3. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +13 -24
  4. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +12 -23
  5. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +6 -15
  6. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -9
  7. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -9
  9. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +9 -18
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +15 -23
  11. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +8 -15
  12. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +9 -18
  13. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +9 -18
  14. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +20 -28
  15. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +15 -24
  16. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +7 -16
  17. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +10 -20
  18. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +2 -10
  19. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +2 -10
  20. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +2 -10
  21. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +12 -23
  22. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +324 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +4 -9
  24. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -18
  25. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +23 -29
  26. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +145 -0
  27. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +145 -0
  28. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +7 -16
  29. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +12 -21
  30. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +13 -23
  31. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +13 -24
  32. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +9 -18
  33. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +8 -17
  34. data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +8 -15
  35. data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +324 -0
  36. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +16 -27
  37. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +14 -24
  38. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -21
  39. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -21
  40. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +23 -31
  41. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +16 -27
  42. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +14 -24
  43. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +1 -8
  44. data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +10 -20
  45. data/lib/twilio-ruby/rest/api/v2010/account/sms/sms_message.rb +13 -23
  46. data/lib/twilio-ruby/rest/api/v2010/account/sms.rb +1 -7
  47. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +2 -7
  48. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +7 -16
  49. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -8
  50. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -8
  51. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -8
  52. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -8
  53. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -8
  54. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -8
  55. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -8
  56. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -8
  57. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -8
  58. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +12 -23
  59. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +1 -6
  60. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +2 -7
  61. data/lib/twilio-ruby/rest/api/v2010/account.rb +131 -38
  62. data/lib/twilio-ruby/rest/api/v2010.rb +17 -1
  63. data/lib/twilio-ruby/rest/api.rb +16 -0
  64. data/lib/twilio-ruby/rest/client.rb +16 -0
  65. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +13 -28
  66. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +11 -21
  67. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +62 -20
  68. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +17 -28
  69. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +12 -23
  70. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +23 -25
  71. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +13 -24
  72. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +1 -1
  73. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +5 -12
  74. data/lib/twilio-ruby/rest/lookups/v1.rb +1 -1
  75. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +5 -14
  76. data/lib/twilio-ruby/rest/monitor/v1/event.rb +4 -13
  77. data/lib/twilio-ruby/rest/monitor/v1.rb +1 -1
  78. data/lib/twilio-ruby/rest/notifications/v1/credential.rb +13 -28
  79. data/lib/twilio-ruby/rest/notifications/v1/service/binding.rb +8 -18
  80. data/lib/twilio-ruby/rest/notifications/v1/service/notification.rb +8 -8
  81. data/lib/twilio-ruby/rest/notifications/v1/service.rb +10 -21
  82. data/lib/twilio-ruby/rest/notifications/v1.rb +1 -1
  83. data/lib/twilio-ruby/rest/preview/wireless/command.rb +4 -14
  84. data/lib/twilio-ruby/rest/preview/wireless/device/usage.rb +6 -13
  85. data/lib/twilio-ruby/rest/preview/wireless/device.rb +8 -19
  86. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +4 -13
  87. data/lib/twilio-ruby/rest/preview/wireless.rb +1 -1
  88. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +4 -13
  89. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -5
  90. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +4 -13
  91. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -5
  92. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +4 -13
  93. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +4 -10
  94. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -6
  95. data/lib/twilio-ruby/rest/pricing/v1.rb +1 -1
  96. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +13 -23
  97. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +6 -15
  98. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +13 -23
  99. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +13 -24
  100. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +8 -15
  101. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +1 -8
  102. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +13 -24
  103. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +8 -15
  104. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -13
  105. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +13 -24
  106. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +8 -15
  107. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +13 -24
  108. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -13
  109. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +15 -26
  110. data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
  111. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +8 -18
  112. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +8 -18
  113. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +12 -23
  114. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +8 -18
  115. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +12 -23
  116. data/lib/twilio-ruby/rest/trunking/v1.rb +1 -1
  117. data/lib/twilio-ruby/version.rb +1 -1
  118. data/spec/integration/api/v2010/account/key_spec.rb +178 -0
  119. data/spec/integration/api/v2010/account/message_spec.rb +2 -3
  120. data/spec/integration/api/v2010/account/new_key_spec.rb +45 -0
  121. data/spec/integration/api/v2010/account/new_signing_key_spec.rb +45 -0
  122. data/spec/integration/api/v2010/account/signing_key_spec.rb +178 -0
  123. data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +3 -7
  124. data/spec/integration/ip_messaging/v1/credential_spec.rb +5 -10
  125. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +37 -0
  126. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +3 -7
  127. data/spec/integration/ip_messaging/v1/service/user_spec.rb +3 -6
  128. data/spec/integration/notifications/v1/credential_spec.rb +5 -10
  129. data/spec/integration/notifications/v1/service/notification_spec.rb +1 -0
  130. data/spec/integration/preview/wireless/device_spec.rb +4 -4
  131. data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +3 -6
  132. metadata +15 -3
@@ -0,0 +1,145 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ module Twilio
8
+ module REST
9
+ class Api < Domain
10
+ class V2010 < Version
11
+ class AccountContext < InstanceContext
12
+ class NewSigningKeyList < ListResource
13
+ ##
14
+ # Initialize the NewSigningKeyList
15
+ # @param [Version] version Version that contains the resource
16
+ # @param [String] account_sid A 34 character string that uniquely identifies this
17
+ # resource.
18
+ # @return [NewSigningKeyList] NewSigningKeyList
19
+ def initialize(version, account_sid: nil)
20
+ super(version)
21
+
22
+ # Path Solution
23
+ @solution = {
24
+ account_sid: account_sid
25
+ }
26
+ @uri = "/Accounts/#{@solution[:account_sid]}/SigningKeys.json"
27
+ end
28
+
29
+ ##
30
+ # Retrieve a single page of NewSigningKeyInstance records from the API.
31
+ # Request is executed immediately.
32
+ # @param [String] friendly_name The friendly_name
33
+ # @return [NewSigningKeyInstance] Newly created NewSigningKeyInstance
34
+ def create(friendly_name: nil)
35
+ data = {
36
+ 'FriendlyName' => friendly_name,
37
+ }
38
+
39
+ payload = @version.create(
40
+ 'POST',
41
+ @uri,
42
+ data: data
43
+ )
44
+
45
+ return NewSigningKeyInstance.new(
46
+ @version,
47
+ payload,
48
+ account_sid: @solution[:account_sid],
49
+ )
50
+ end
51
+
52
+ ##
53
+ # Provide a user friendly representation
54
+ def to_s
55
+ '#<Twilio.Api.V2010.NewSigningKeyList>'
56
+ end
57
+ end
58
+
59
+ class NewSigningKeyPage < Page
60
+ ##
61
+ # Initialize the NewSigningKeyPage
62
+ # @param [Version] version Version that contains the resource
63
+ # @param [Response] response Response from the API
64
+ # @param [Hash] solution Path solution for the resource
65
+ # @param [String] account_sid A 34 character string that uniquely identifies this
66
+ # resource.
67
+ # @return [NewSigningKeyPage] NewSigningKeyPage
68
+ def initialize(version, response, solution)
69
+ super(version, response)
70
+
71
+ # Path Solution
72
+ @solution = solution
73
+ end
74
+
75
+ ##
76
+ # Build an instance of NewSigningKeyInstance
77
+ # @param [Hash] payload Payload response from the API
78
+ # @return [NewSigningKeyInstance] NewSigningKeyInstance
79
+ def get_instance(payload)
80
+ return NewSigningKeyInstance.new(
81
+ @version,
82
+ payload,
83
+ account_sid: @solution[:account_sid],
84
+ )
85
+ end
86
+
87
+ ##
88
+ # Provide a user friendly representation
89
+ def to_s
90
+ '<Twilio.Api.V2010.NewSigningKeyPage>'
91
+ end
92
+ end
93
+
94
+ class NewSigningKeyInstance < InstanceResource
95
+ ##
96
+ # Initialize the NewSigningKeyInstance
97
+ # @param [Version] version Version that contains the resource
98
+ # @param [Hash] payload payload that contains response from Twilio
99
+ # @param [String] account_sid A 34 character string that uniquely identifies this
100
+ # resource.
101
+ # @return [NewSigningKeyInstance] NewSigningKeyInstance
102
+ def initialize(version, payload, account_sid: nil)
103
+ super(version)
104
+
105
+ # Marshaled Properties
106
+ @properties = {
107
+ 'sid' => payload['sid'],
108
+ 'friendly_name' => payload['friendly_name'],
109
+ 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
110
+ 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
111
+ 'secret' => payload['secret'],
112
+ }
113
+ end
114
+
115
+ def sid
116
+ @properties['sid']
117
+ end
118
+
119
+ def friendly_name
120
+ @properties['friendly_name']
121
+ end
122
+
123
+ def date_created
124
+ @properties['date_created']
125
+ end
126
+
127
+ def date_updated
128
+ @properties['date_updated']
129
+ end
130
+
131
+ def secret
132
+ @properties['secret']
133
+ end
134
+
135
+ ##
136
+ # Provide a user friendly representation
137
+ def to_s
138
+ "<Twilio.Api.V2010.NewSigningKeyInstance>"
139
+ end
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
145
+ 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 responsible for this
17
17
  # notification.
18
-
19
18
  # @return [NotificationList] NotificationList
20
19
  def initialize(version, account_sid: nil)
21
20
  super(version)
@@ -41,7 +40,6 @@ module Twilio
41
40
  # the default value of 50 records. If no page_size is defined
42
41
  # but a limit is defined, stream() will attempt to read the
43
42
  # limit with the most efficient page size, i.e. min(limit, 1000)
44
-
45
43
  # @return [Array] Array of up to limit results
46
44
  def list(log: nil, message_date_before: nil, message_date: nil, message_date_after: nil, limit: nil, page_size: nil)
47
45
  self.stream(
@@ -68,7 +66,6 @@ module Twilio
68
66
  # the default value of 50 records. If no page_size is defined
69
67
  # but a limit is defined, stream() will attempt to read the
70
68
  # limit with the most efficient page size, i.e. min(limit, 1000)
71
-
72
69
  # @return [Enumerable] Enumerable that will yield up to limit results
73
70
  def stream(log: nil, message_date_before: nil, message_date: nil, message_date_after: nil, limit: nil, page_size: nil)
74
71
  limits = @version.read_limits(limit, page_size)
@@ -120,7 +117,6 @@ module Twilio
120
117
  # @param [String] page_token PageToken provided by the API
121
118
  # @param [Integer] page_number Page Number, this value is simply for client state
122
119
  # @param [Integer] page_size Number of records to return, defaults to 50
123
-
124
120
  # @return [Page] Page of NotificationInstance
125
121
  def page(log: nil, message_date_before: nil, message_date: nil, message_date_after: nil, page_token: nil, page_number: nil, page_size: nil)
126
122
  params = {
@@ -155,7 +151,6 @@ module Twilio
155
151
  # @param [Hash] solution Path solution for the resource
156
152
  # @param [String] account_sid The unique id of the Account responsible for this
157
153
  # notification.
158
-
159
154
  # @return [NotificationPage] NotificationPage
160
155
  def initialize(version, response, solution)
161
156
  super(version, response)
@@ -167,13 +162,12 @@ module Twilio
167
162
  ##
168
163
  # Build an instance of NotificationInstance
169
164
  # @param [Hash] payload Payload response from the API
170
-
171
165
  # @return [NotificationInstance] NotificationInstance
172
166
  def get_instance(payload)
173
167
  return NotificationInstance.new(
174
168
  @version,
175
169
  payload,
176
- account_sid: @solution['account_sid'],
170
+ account_sid: @solution[:account_sid],
177
171
  )
178
172
  end
179
173
 
@@ -190,7 +184,6 @@ module Twilio
190
184
  # @param [Version] version Version that contains the resource
191
185
  # @param [String] account_sid The account_sid
192
186
  # @param [String] sid The notification Sid that uniquely identifies this resource
193
-
194
187
  # @return [NotificationContext] NotificationContext
195
188
  def initialize(version, account_sid, sid)
196
189
  super(version)
@@ -218,8 +211,8 @@ module Twilio
218
211
  return NotificationInstance.new(
219
212
  @version,
220
213
  payload,
221
- account_sid: @solution['account_sid'],
222
- sid: @solution['sid'],
214
+ account_sid: @solution[:account_sid],
215
+ sid: @solution[:sid],
223
216
  )
224
217
  end
225
218
 
@@ -246,7 +239,6 @@ module Twilio
246
239
  # @param [String] account_sid The unique id of the Account responsible for this
247
240
  # notification.
248
241
  # @param [String] sid The notification Sid that uniquely identifies this resource
249
-
250
242
  # @return [NotificationInstance] NotificationInstance
251
243
  def initialize(version, payload, account_sid: nil, sid: nil)
252
244
  super(version)
@@ -284,7 +276,6 @@ module Twilio
284
276
  # Generate an instance context for the instance, the context is capable of
285
277
  # performing various actions. All instance actions are proxied to the context
286
278
  # @param [Version] version Version that contains the resource
287
-
288
279
  # @return [NotificationContext] NotificationContext for this NotificationInstance
289
280
  def context
290
281
  unless @instance_context
@@ -369,21 +360,21 @@ module Twilio
369
360
  # Fetch a NotificationInstance
370
361
  # @return [NotificationInstance] Fetched NotificationInstance
371
362
  def fetch
372
- @context.fetch()
363
+ context.fetch
373
364
  end
374
365
 
375
366
  ##
376
367
  # Deletes the NotificationInstance
377
368
  # @return [Boolean] true if delete succeeds, true otherwise
378
369
  def delete
379
- @context.delete()
370
+ context.delete
380
371
  end
381
372
 
382
373
  ##
383
374
  # Provide a user friendly representation
384
375
  def to_s
385
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
386
- "<Twilio.Api.V2010.NotificationInstance #{context}>"
376
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
377
+ "<Twilio.Api.V2010.NotificationInstance #{values}>"
387
378
  end
388
379
  end
389
380
  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 responsible for this
17
17
  # Caller Id.
18
-
19
18
  # @return [OutgoingCallerIdList] OutgoingCallerIdList
20
19
  def initialize(version, account_sid: nil)
21
20
  super(version)
@@ -41,7 +40,6 @@ module Twilio
41
40
  # the default value of 50 records. If no page_size is defined
42
41
  # but a limit is defined, stream() will attempt to read the
43
42
  # limit with the most efficient page size, i.e. min(limit, 1000)
44
-
45
43
  # @return [Array] Array of up to limit results
46
44
  def list(phone_number: nil, friendly_name: nil, limit: nil, page_size: nil)
47
45
  self.stream(
@@ -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 [Enumerable] Enumerable that will yield up to limit results
71
68
  def stream(phone_number: nil, friendly_name: nil, limit: nil, page_size: nil)
72
69
  limits = @version.read_limits(limit, page_size)
@@ -116,7 +113,6 @@ module Twilio
116
113
  # @param [String] page_token PageToken provided by the API
117
114
  # @param [Integer] page_number Page Number, this value is simply for client state
118
115
  # @param [Integer] page_size Number of records to return, defaults to 50
119
-
120
116
  # @return [Page] Page of OutgoingCallerIdInstance
121
117
  def page(phone_number: nil, friendly_name: nil, page_token: nil, page_number: nil, page_size: nil)
122
118
  params = {
@@ -149,7 +145,6 @@ module Twilio
149
145
  # @param [Hash] solution Path solution for the resource
150
146
  # @param [String] account_sid The unique id of the Account responsible for this
151
147
  # Caller Id.
152
-
153
148
  # @return [OutgoingCallerIdPage] OutgoingCallerIdPage
154
149
  def initialize(version, response, solution)
155
150
  super(version, response)
@@ -161,13 +156,12 @@ module Twilio
161
156
  ##
162
157
  # Build an instance of OutgoingCallerIdInstance
163
158
  # @param [Hash] payload Payload response from the API
164
-
165
159
  # @return [OutgoingCallerIdInstance] OutgoingCallerIdInstance
166
160
  def get_instance(payload)
167
161
  return OutgoingCallerIdInstance.new(
168
162
  @version,
169
163
  payload,
170
- account_sid: @solution['account_sid'],
164
+ account_sid: @solution[:account_sid],
171
165
  )
172
166
  end
173
167
 
@@ -185,7 +179,6 @@ module Twilio
185
179
  # @param [String] account_sid The account_sid
186
180
  # @param [String] sid The outgoing-caller-id Sid that uniquely identifies this
187
181
  # resource
188
-
189
182
  # @return [OutgoingCallerIdContext] OutgoingCallerIdContext
190
183
  def initialize(version, account_sid, sid)
191
184
  super(version)
@@ -213,15 +206,14 @@ module Twilio
213
206
  return OutgoingCallerIdInstance.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
 
221
214
  ##
222
215
  # Update the OutgoingCallerIdInstance
223
216
  # @param [String] friendly_name A human readable description of the caller ID
224
-
225
217
  # @return [OutgoingCallerIdInstance] Updated OutgoingCallerIdInstance
226
218
  def update(friendly_name: nil)
227
219
  data = {
@@ -237,8 +229,8 @@ module Twilio
237
229
  return OutgoingCallerIdInstance.new(
238
230
  @version,
239
231
  payload,
240
- account_sid: @solution['account_sid'],
241
- sid: @solution['sid'],
232
+ account_sid: @solution[:account_sid],
233
+ sid: @solution[:sid],
242
234
  )
243
235
  end
244
236
 
@@ -266,7 +258,6 @@ module Twilio
266
258
  # Caller Id.
267
259
  # @param [String] sid The outgoing-caller-id Sid that uniquely identifies this
268
260
  # resource
269
-
270
261
  # @return [OutgoingCallerIdInstance] OutgoingCallerIdInstance
271
262
  def initialize(version, payload, account_sid: nil, sid: nil)
272
263
  super(version)
@@ -294,7 +285,6 @@ module Twilio
294
285
  # Generate an instance context for the instance, the context is capable of
295
286
  # performing various actions. All instance actions are proxied to the context
296
287
  # @param [Version] version Version that contains the resource
297
-
298
288
  # @return [OutgoingCallerIdContext] OutgoingCallerIdContext for this OutgoingCallerIdInstance
299
289
  def context
300
290
  unless @instance_context
@@ -339,30 +329,31 @@ module Twilio
339
329
  # Fetch a OutgoingCallerIdInstance
340
330
  # @return [OutgoingCallerIdInstance] Fetched OutgoingCallerIdInstance
341
331
  def fetch
342
- @context.fetch()
332
+ context.fetch
343
333
  end
344
334
 
345
335
  ##
346
336
  # Update the OutgoingCallerIdInstance
347
337
  # @param [String] friendly_name A human readable description of the caller ID
348
-
349
338
  # @return [OutgoingCallerIdInstance] Updated OutgoingCallerIdInstance
350
339
  def update(friendly_name: nil)
351
- @context.update()
340
+ context.update(
341
+ friendly_name: friendly_name,
342
+ )
352
343
  end
353
344
 
354
345
  ##
355
346
  # Deletes the OutgoingCallerIdInstance
356
347
  # @return [Boolean] true if delete succeeds, true otherwise
357
348
  def delete
358
- @context.delete()
349
+ context.delete
359
350
  end
360
351
 
361
352
  ##
362
353
  # Provide a user friendly representation
363
354
  def to_s
364
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
365
- "<Twilio.Api.V2010.OutgoingCallerIdInstance #{context}>"
355
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
356
+ "<Twilio.Api.V2010.OutgoingCallerIdInstance #{values}>"
366
357
  end
367
358
  end
368
359
  end
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [String] account_sid The account_sid
18
18
  # @param [String] queue_sid A 34 character string that uniquely identifies this
19
19
  # queue.
20
-
21
20
  # @return [MemberList] MemberList
22
21
  def initialize(version, account_sid: nil, queue_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 MemberInstance
104
100
  def page(page_token: nil, page_number: nil, page_size: nil)
105
101
  params = {
@@ -131,7 +127,6 @@ module Twilio
131
127
  # @param [String] account_sid The account_sid
132
128
  # @param [String] queue_sid A 34 character string that uniquely identifies this
133
129
  # queue.
134
-
135
130
  # @return [MemberPage] MemberPage
136
131
  def initialize(version, response, solution)
137
132
  super(version, response)
@@ -143,14 +138,13 @@ module Twilio
143
138
  ##
144
139
  # Build an instance of MemberInstance
145
140
  # @param [Hash] payload Payload response from the API
146
-
147
141
  # @return [MemberInstance] MemberInstance
148
142
  def get_instance(payload)
149
143
  return MemberInstance.new(
150
144
  @version,
151
145
  payload,
152
- account_sid: @solution['account_sid'],
153
- queue_sid: @solution['queue_sid'],
146
+ account_sid: @solution[:account_sid],
147
+ queue_sid: @solution[:queue_sid],
154
148
  )
155
149
  end
156
150
 
@@ -168,7 +162,6 @@ module Twilio
168
162
  # @param [String] account_sid The account_sid
169
163
  # @param [String] queue_sid The Queue in which to find the members
170
164
  # @param [String] call_sid The call_sid
171
-
172
165
  # @return [MemberContext] MemberContext
173
166
  def initialize(version, account_sid, queue_sid, call_sid)
174
167
  super(version)
@@ -197,9 +190,9 @@ module Twilio
197
190
  return MemberInstance.new(
198
191
  @version,
199
192
  payload,
200
- account_sid: @solution['account_sid'],
201
- queue_sid: @solution['queue_sid'],
202
- call_sid: @solution['call_sid'],
193
+ account_sid: @solution[:account_sid],
194
+ queue_sid: @solution[:queue_sid],
195
+ call_sid: @solution[:call_sid],
203
196
  )
204
197
  end
205
198
 
@@ -207,7 +200,6 @@ module Twilio
207
200
  # Update the MemberInstance
208
201
  # @param [String] url The url
209
202
  # @param [String] method The method
210
-
211
203
  # @return [MemberInstance] Updated MemberInstance
212
204
  def update(url: nil, method: nil)
213
205
  data = {
@@ -224,9 +216,9 @@ module Twilio
224
216
  return MemberInstance.new(
225
217
  @version,
226
218
  payload,
227
- account_sid: @solution['account_sid'],
228
- queue_sid: @solution['queue_sid'],
229
- call_sid: @solution['call_sid'],
219
+ account_sid: @solution[:account_sid],
220
+ queue_sid: @solution[:queue_sid],
221
+ call_sid: @solution[:call_sid],
230
222
  )
231
223
  end
232
224
 
@@ -247,7 +239,6 @@ module Twilio
247
239
  # @param [String] queue_sid A 34 character string that uniquely identifies this
248
240
  # queue.
249
241
  # @param [String] call_sid The call_sid
250
-
251
242
  # @return [MemberInstance] MemberInstance
252
243
  def initialize(version, payload, account_sid: nil, queue_sid: nil, call_sid: nil)
253
244
  super(version)
@@ -274,7 +265,6 @@ module Twilio
274
265
  # Generate an instance context for the instance, the context is capable of
275
266
  # performing various actions. All instance actions are proxied to the context
276
267
  # @param [Version] version Version that contains the resource
277
-
278
268
  # @return [MemberContext] MemberContext for this MemberInstance
279
269
  def context
280
270
  unless @instance_context
@@ -312,17 +302,17 @@ module Twilio
312
302
  # Fetch a MemberInstance
313
303
  # @return [MemberInstance] Fetched MemberInstance
314
304
  def fetch
315
- @context.fetch()
305
+ context.fetch
316
306
  end
317
307
 
318
308
  ##
319
309
  # Update the MemberInstance
320
310
  # @param [String] url The url
321
311
  # @param [String] method The method
322
-
323
312
  # @return [MemberInstance] Updated MemberInstance
324
313
  def update(url: nil, method: nil)
325
- @context.update(
314
+ context.update(
315
+ url: url,
326
316
  method: method,
327
317
  )
328
318
  end
@@ -330,8 +320,8 @@ module Twilio
330
320
  ##
331
321
  # Provide a user friendly representation
332
322
  def to_s
333
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
334
- "<Twilio.Api.V2010.MemberInstance #{context}>"
323
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
324
+ "<Twilio.Api.V2010.MemberInstance #{values}>"
335
325
  end
336
326
  end
337
327
  end