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
@@ -12,7 +12,6 @@ module Twilio
12
12
  ##
13
13
  # Initialize the ServiceList
14
14
  # @param [Version] version Version that contains the resource
15
-
16
15
  # @return [ServiceList] ServiceList
17
16
  def initialize(version)
18
17
  super(version)
@@ -26,7 +25,6 @@ module Twilio
26
25
  # Retrieve a single page of ServiceInstance records from the API.
27
26
  # Request is executed immediately.
28
27
  # @param [String] friendly_name The friendly_name
29
-
30
28
  # @return [ServiceInstance] Newly created ServiceInstance
31
29
  def create(friendly_name: nil)
32
30
  data = {
@@ -55,7 +53,6 @@ module Twilio
55
53
  # the default value of 50 records. If no page_size is defined
56
54
  # but a limit is defined, stream() will attempt to read the
57
55
  # limit with the most efficient page size, i.e. min(limit, 1000)
58
-
59
56
  # @return [Array] Array of up to limit results
60
57
  def list(limit: nil, page_size: nil)
61
58
  self.stream(
@@ -74,7 +71,6 @@ module Twilio
74
71
  # the default value of 50 records. If no page_size is defined
75
72
  # but a limit is defined, stream() will attempt to read the
76
73
  # limit with the most efficient page size, i.e. min(limit, 1000)
77
-
78
74
  # @return [Enumerable] Enumerable that will yield up to limit results
79
75
  def stream(limit: nil, page_size: nil)
80
76
  limits = @version.read_limits(limit, page_size)
@@ -114,7 +110,6 @@ module Twilio
114
110
  # @param [String] page_token PageToken provided by the API
115
111
  # @param [Integer] page_number Page Number, this value is simply for client state
116
112
  # @param [Integer] page_size Number of records to return, defaults to 50
117
-
118
113
  # @return [Page] Page of ServiceInstance
119
114
  def page(page_token: nil, page_number: nil, page_size: nil)
120
115
  params = {
@@ -143,7 +138,6 @@ module Twilio
143
138
  # @param [Version] version Version that contains the resource
144
139
  # @param [Response] response Response from the API
145
140
  # @param [Hash] solution Path solution for the resource
146
-
147
141
  # @return [ServicePage] ServicePage
148
142
  def initialize(version, response, solution)
149
143
  super(version, response)
@@ -155,7 +149,6 @@ module Twilio
155
149
  ##
156
150
  # Build an instance of ServiceInstance
157
151
  # @param [Hash] payload Payload response from the API
158
-
159
152
  # @return [ServiceInstance] ServiceInstance
160
153
  def get_instance(payload)
161
154
  return ServiceInstance.new(
@@ -176,7 +169,6 @@ module Twilio
176
169
  # Initialize the ServiceContext
177
170
  # @param [Version] version Version that contains the resource
178
171
  # @param [String] sid The sid
179
-
180
172
  # @return [ServiceContext] ServiceContext
181
173
  def initialize(version, sid)
182
174
  super(version)
@@ -208,7 +200,7 @@ module Twilio
208
200
  return ServiceInstance.new(
209
201
  @version,
210
202
  payload,
211
- sid: @solution['sid'],
203
+ sid: @solution[:sid],
212
204
  )
213
205
  end
214
206
 
@@ -229,8 +221,7 @@ module Twilio
229
221
  # @param [Boolean] read_status_enabled The read_status_enabled
230
222
  # @param [String] typing_indicator_timeout The typing_indicator_timeout
231
223
  # @param [String] consumption_report_interval The consumption_report_interval
232
- # @param [String] webhooks The webhooks
233
-
224
+ # @param [Hash] webhooks The webhooks
234
225
  # @return [ServiceInstance] Updated ServiceInstance
235
226
  def update(friendly_name: nil, default_service_role_sid: nil, default_channel_role_sid: nil, default_channel_creator_role_sid: nil, read_status_enabled: nil, typing_indicator_timeout: nil, consumption_report_interval: nil, webhooks: nil)
236
227
  data = {
@@ -253,7 +244,7 @@ module Twilio
253
244
  return ServiceInstance.new(
254
245
  @version,
255
246
  payload,
256
- sid: @solution['sid'],
247
+ sid: @solution[:sid],
257
248
  )
258
249
  end
259
250
 
@@ -337,7 +328,6 @@ module Twilio
337
328
  # @param [Version] version Version that contains the resource
338
329
  # @param [Hash] payload payload that contains response from Twilio
339
330
  # @param [String] sid The sid
340
-
341
331
  # @return [ServiceInstance] ServiceInstance
342
332
  def initialize(version, payload, sid: nil)
343
333
  super(version)
@@ -371,7 +361,6 @@ module Twilio
371
361
  # Generate an instance context for the instance, the context is capable of
372
362
  # performing various actions. All instance actions are proxied to the context
373
363
  # @param [Version] version Version that contains the resource
374
-
375
364
  # @return [ServiceContext] ServiceContext for this ServiceInstance
376
365
  def context
377
366
  unless @instance_context
@@ -443,14 +432,14 @@ module Twilio
443
432
  # Fetch a ServiceInstance
444
433
  # @return [ServiceInstance] Fetched ServiceInstance
445
434
  def fetch
446
- @context.fetch()
435
+ context.fetch
447
436
  end
448
437
 
449
438
  ##
450
439
  # Deletes the ServiceInstance
451
440
  # @return [Boolean] true if delete succeeds, true otherwise
452
441
  def delete
453
- @context.delete()
442
+ context.delete
454
443
  end
455
444
 
456
445
  ##
@@ -463,11 +452,11 @@ module Twilio
463
452
  # @param [Boolean] read_status_enabled The read_status_enabled
464
453
  # @param [String] typing_indicator_timeout The typing_indicator_timeout
465
454
  # @param [String] consumption_report_interval The consumption_report_interval
466
- # @param [String] webhooks The webhooks
467
-
455
+ # @param [Hash] webhooks The webhooks
468
456
  # @return [ServiceInstance] Updated ServiceInstance
469
457
  def update(friendly_name: nil, default_service_role_sid: nil, default_channel_role_sid: nil, default_channel_creator_role_sid: nil, read_status_enabled: nil, typing_indicator_timeout: nil, consumption_report_interval: nil, webhooks: nil)
470
- @context.update(
458
+ context.update(
459
+ friendly_name: friendly_name,
471
460
  default_service_role_sid: default_service_role_sid,
472
461
  default_channel_role_sid: default_channel_role_sid,
473
462
  default_channel_creator_role_sid: default_channel_creator_role_sid,
@@ -482,28 +471,28 @@ module Twilio
482
471
  # Access the channels
483
472
  # @return [channels] channels
484
473
  def channels
485
- @context.channels
474
+ context.channels
486
475
  end
487
476
 
488
477
  ##
489
478
  # Access the roles
490
479
  # @return [roles] roles
491
480
  def roles
492
- @context.roles
481
+ context.roles
493
482
  end
494
483
 
495
484
  ##
496
485
  # Access the users
497
486
  # @return [users] users
498
487
  def users
499
- @context.users
488
+ context.users
500
489
  end
501
490
 
502
491
  ##
503
492
  # Provide a user friendly representation
504
493
  def to_s
505
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
506
- "<Twilio.IpMessaging.V1.ServiceInstance #{context}>"
494
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
495
+ "<Twilio.IpMessaging.V1.ServiceInstance #{values}>"
507
496
  end
508
497
  end
509
498
  end
@@ -36,7 +36,7 @@ module Twilio
36
36
  ##
37
37
  # Provide a user friendly representation
38
38
  def to_s
39
- #<Twilio::REST::IpMessaging::V1>
39
+ '<Twilio::REST::IpMessaging::V1>'
40
40
  end
41
41
  end
42
42
  end
@@ -12,7 +12,6 @@ module Twilio
12
12
  ##
13
13
  # Initialize the PhoneNumberList
14
14
  # @param [Version] version Version that contains the resource
15
-
16
15
  # @return [PhoneNumberList] PhoneNumberList
17
16
  def initialize(version)
18
17
  super(version)
@@ -34,7 +33,6 @@ module Twilio
34
33
  # @param [Version] version Version that contains the resource
35
34
  # @param [Response] response Response from the API
36
35
  # @param [Hash] solution Path solution for the resource
37
-
38
36
  # @return [PhoneNumberPage] PhoneNumberPage
39
37
  def initialize(version, response, solution)
40
38
  super(version, response)
@@ -46,7 +44,6 @@ module Twilio
46
44
  ##
47
45
  # Build an instance of PhoneNumberInstance
48
46
  # @param [Hash] payload Payload response from the API
49
-
50
47
  # @return [PhoneNumberInstance] PhoneNumberInstance
51
48
  def get_instance(payload)
52
49
  return PhoneNumberInstance.new(
@@ -67,7 +64,6 @@ module Twilio
67
64
  # Initialize the PhoneNumberContext
68
65
  # @param [Version] version Version that contains the resource
69
66
  # @param [String] phone_number The phone_number
70
-
71
67
  # @return [PhoneNumberContext] PhoneNumberContext
72
68
  def initialize(version, phone_number)
73
69
  super(version)
@@ -85,7 +81,6 @@ module Twilio
85
81
  # @param [String] type The type
86
82
  # @param [String] add_ons The add_ons
87
83
  # @param [Hash] add_ons_data The add_ons_data
88
-
89
84
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
90
85
  def fetch(country_code: nil, type: nil, add_ons: nil, add_ons_data: nil)
91
86
  params = {
@@ -104,7 +99,7 @@ module Twilio
104
99
  return PhoneNumberInstance.new(
105
100
  @version,
106
101
  payload,
107
- phone_number: @solution['phone_number'],
102
+ phone_number: @solution[:phone_number],
108
103
  )
109
104
  end
110
105
 
@@ -122,7 +117,6 @@ module Twilio
122
117
  # @param [Version] version Version that contains the resource
123
118
  # @param [Hash] payload payload that contains response from Twilio
124
119
  # @param [String] phone_number The phone_number
125
-
126
120
  # @return [PhoneNumberInstance] PhoneNumberInstance
127
121
  def initialize(version, payload, phone_number: nil)
128
122
  super(version)
@@ -147,7 +141,6 @@ module Twilio
147
141
  # Generate an instance context for the instance, the context is capable of
148
142
  # performing various actions. All instance actions are proxied to the context
149
143
  # @param [Version] version Version that contains the resource
150
-
151
144
  # @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance
152
145
  def context
153
146
  unless @instance_context
@@ -185,10 +178,10 @@ module Twilio
185
178
  # @param [String] type The type
186
179
  # @param [String] add_ons The add_ons
187
180
  # @param [Hash] add_ons_data The add_ons_data
188
-
189
181
  # @return [PhoneNumberInstance] Fetched PhoneNumberInstance
190
182
  def fetch(country_code: nil, type: nil, add_ons: nil, add_ons_data: nil)
191
- @context.fetch(
183
+ context.fetch(
184
+ country_code: country_code,
192
185
  type: type,
193
186
  add_ons: add_ons,
194
187
  add_ons_data: add_ons_data,
@@ -198,8 +191,8 @@ module Twilio
198
191
  ##
199
192
  # Provide a user friendly representation
200
193
  def to_s
201
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
202
- "<Twilio.Lookups.V1.PhoneNumberInstance #{context}>"
194
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
195
+ "<Twilio.Lookups.V1.PhoneNumberInstance #{values}>"
203
196
  end
204
197
  end
205
198
  end
@@ -27,7 +27,7 @@ module Twilio
27
27
  ##
28
28
  # Provide a user friendly representation
29
29
  def to_s
30
- #<Twilio::REST::Lookups::V1>
30
+ '<Twilio::REST::Lookups::V1>'
31
31
  end
32
32
  end
33
33
  end
@@ -12,7 +12,6 @@ module Twilio
12
12
  ##
13
13
  # Initialize the AlertList
14
14
  # @param [Version] version Version that contains the resource
15
-
16
15
  # @return [AlertList] AlertList
17
16
  def initialize(version)
18
17
  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(log_level: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil, limit: nil, page_size: nil)
45
43
  self.stream(
@@ -72,7 +70,6 @@ module Twilio
72
70
  # the default value of 50 records. If no page_size is defined
73
71
  # but a limit is defined, stream() will attempt to read the
74
72
  # limit with the most efficient page size, i.e. min(limit, 1000)
75
-
76
73
  # @return [Enumerable] Enumerable that will yield up to limit results
77
74
  def stream(log_level: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil, limit: nil, page_size: nil)
78
75
  limits = @version.read_limits(limit, page_size)
@@ -133,7 +130,6 @@ module Twilio
133
130
  # @param [String] page_token PageToken provided by the API
134
131
  # @param [Integer] page_number Page Number, this value is simply for client state
135
132
  # @param [Integer] page_size Number of records to return, defaults to 50
136
-
137
133
  # @return [Page] Page of AlertInstance
138
134
  def page(log_level: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil, page_token: nil, page_number: nil, page_size: nil)
139
135
  params = {
@@ -169,7 +165,6 @@ module Twilio
169
165
  # @param [Version] version Version that contains the resource
170
166
  # @param [Response] response Response from the API
171
167
  # @param [Hash] solution Path solution for the resource
172
-
173
168
  # @return [AlertPage] AlertPage
174
169
  def initialize(version, response, solution)
175
170
  super(version, response)
@@ -181,7 +176,6 @@ module Twilio
181
176
  ##
182
177
  # Build an instance of AlertInstance
183
178
  # @param [Hash] payload Payload response from the API
184
-
185
179
  # @return [AlertInstance] AlertInstance
186
180
  def get_instance(payload)
187
181
  return AlertInstance.new(
@@ -202,7 +196,6 @@ module Twilio
202
196
  # Initialize the AlertContext
203
197
  # @param [Version] version Version that contains the resource
204
198
  # @param [String] sid The sid
205
-
206
199
  # @return [AlertContext] AlertContext
207
200
  def initialize(version, sid)
208
201
  super(version)
@@ -229,7 +222,7 @@ module Twilio
229
222
  return AlertInstance.new(
230
223
  @version,
231
224
  payload,
232
- sid: @solution['sid'],
225
+ sid: @solution[:sid],
233
226
  )
234
227
  end
235
228
 
@@ -254,7 +247,6 @@ module Twilio
254
247
  # @param [Version] version Version that contains the resource
255
248
  # @param [Hash] payload payload that contains response from Twilio
256
249
  # @param [String] sid The sid
257
-
258
250
  # @return [AlertInstance] AlertInstance
259
251
  def initialize(version, payload, sid: nil)
260
252
  super(version)
@@ -291,7 +283,6 @@ module Twilio
291
283
  # Generate an instance context for the instance, the context is capable of
292
284
  # performing various actions. All instance actions are proxied to the context
293
285
  # @param [Version] version Version that contains the resource
294
-
295
286
  # @return [AlertContext] AlertContext for this AlertInstance
296
287
  def context
297
288
  unless @instance_context
@@ -375,21 +366,21 @@ module Twilio
375
366
  # Fetch a AlertInstance
376
367
  # @return [AlertInstance] Fetched AlertInstance
377
368
  def fetch
378
- @context.fetch()
369
+ context.fetch
379
370
  end
380
371
 
381
372
  ##
382
373
  # Deletes the AlertInstance
383
374
  # @return [Boolean] true if delete succeeds, true otherwise
384
375
  def delete
385
- @context.delete()
376
+ context.delete
386
377
  end
387
378
 
388
379
  ##
389
380
  # Provide a user friendly representation
390
381
  def to_s
391
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
392
- "<Twilio.Monitor.V1.AlertInstance #{context}>"
382
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
383
+ "<Twilio.Monitor.V1.AlertInstance #{values}>"
393
384
  end
394
385
  end
395
386
  end
@@ -12,7 +12,6 @@ module Twilio
12
12
  ##
13
13
  # Initialize the EventList
14
14
  # @param [Version] version Version that contains the resource
15
-
16
15
  # @return [EventList] EventList
17
16
  def initialize(version)
18
17
  super(version)
@@ -42,7 +41,6 @@ module Twilio
42
41
  # the default value of 50 records. If no page_size is defined
43
42
  # but a limit is defined, stream() will attempt to read the
44
43
  # limit with the most efficient page size, i.e. min(limit, 1000)
45
-
46
44
  # @return [Array] Array of up to limit results
47
45
  def list(actor_sid: nil, end_date_before: nil, end_date: nil, end_date_after: nil, event_type: nil, resource_sid: nil, source_ip_address: nil, start_date_before: nil, start_date: nil, start_date_after: nil, limit: nil, page_size: nil)
48
46
  self.stream(
@@ -81,7 +79,6 @@ module Twilio
81
79
  # the default value of 50 records. If no page_size is defined
82
80
  # but a limit is defined, stream() will attempt to read the
83
81
  # limit with the most efficient page size, i.e. min(limit, 1000)
84
-
85
82
  # @return [Enumerable] Enumerable that will yield up to limit results
86
83
  def stream(actor_sid: nil, end_date_before: nil, end_date: nil, end_date_after: nil, event_type: nil, resource_sid: nil, source_ip_address: nil, start_date_before: nil, start_date: nil, start_date_after: nil, limit: nil, page_size: nil)
87
84
  limits = @version.read_limits(limit, page_size)
@@ -151,7 +148,6 @@ module Twilio
151
148
  # @param [String] page_token PageToken provided by the API
152
149
  # @param [Integer] page_number Page Number, this value is simply for client state
153
150
  # @param [Integer] page_size Number of records to return, defaults to 50
154
-
155
151
  # @return [Page] Page of EventInstance
156
152
  def page(actor_sid: nil, end_date_before: nil, end_date: nil, end_date_after: nil, event_type: nil, resource_sid: nil, source_ip_address: nil, start_date_before: nil, start_date: nil, start_date_after: nil, page_token: nil, page_number: nil, page_size: nil)
157
153
  params = {
@@ -190,7 +186,6 @@ module Twilio
190
186
  # @param [Version] version Version that contains the resource
191
187
  # @param [Response] response Response from the API
192
188
  # @param [Hash] solution Path solution for the resource
193
-
194
189
  # @return [EventPage] EventPage
195
190
  def initialize(version, response, solution)
196
191
  super(version, response)
@@ -202,7 +197,6 @@ module Twilio
202
197
  ##
203
198
  # Build an instance of EventInstance
204
199
  # @param [Hash] payload Payload response from the API
205
-
206
200
  # @return [EventInstance] EventInstance
207
201
  def get_instance(payload)
208
202
  return EventInstance.new(
@@ -223,7 +217,6 @@ module Twilio
223
217
  # Initialize the EventContext
224
218
  # @param [Version] version Version that contains the resource
225
219
  # @param [String] sid The sid
226
-
227
220
  # @return [EventContext] EventContext
228
221
  def initialize(version, sid)
229
222
  super(version)
@@ -250,7 +243,7 @@ module Twilio
250
243
  return EventInstance.new(
251
244
  @version,
252
245
  payload,
253
- sid: @solution['sid'],
246
+ sid: @solution[:sid],
254
247
  )
255
248
  end
256
249
 
@@ -268,7 +261,6 @@ module Twilio
268
261
  # @param [Version] version Version that contains the resource
269
262
  # @param [Hash] payload payload that contains response from Twilio
270
263
  # @param [String] sid The sid
271
-
272
264
  # @return [EventInstance] EventInstance
273
265
  def initialize(version, payload, sid: nil)
274
266
  super(version)
@@ -300,7 +292,6 @@ module Twilio
300
292
  # Generate an instance context for the instance, the context is capable of
301
293
  # performing various actions. All instance actions are proxied to the context
302
294
  # @param [Version] version Version that contains the resource
303
-
304
295
  # @return [EventContext] EventContext for this EventInstance
305
296
  def context
306
297
  unless @instance_context
@@ -364,14 +355,14 @@ module Twilio
364
355
  # Fetch a EventInstance
365
356
  # @return [EventInstance] Fetched EventInstance
366
357
  def fetch
367
- @context.fetch()
358
+ context.fetch
368
359
  end
369
360
 
370
361
  ##
371
362
  # Provide a user friendly representation
372
363
  def to_s
373
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
374
- "<Twilio.Monitor.V1.EventInstance #{context}>"
364
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
365
+ "<Twilio.Monitor.V1.EventInstance #{values}>"
375
366
  end
376
367
  end
377
368
  end