twilio-ruby 5.19.0 → 5.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +13 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api.rb +16 -13
  5. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +85 -88
  6. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +4 -4
  7. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +135 -146
  8. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +21 -17
  9. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +14 -8
  10. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +150 -166
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +174 -79
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +147 -160
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +174 -79
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +174 -79
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +147 -160
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +174 -79
  17. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +51 -51
  18. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +246 -251
  19. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +31 -26
  20. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +34 -26
  21. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +109 -112
  22. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +108 -112
  23. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +108 -112
  24. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +21 -11
  25. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
  26. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +7 -6
  27. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +32 -25
  28. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +36 -36
  29. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
  30. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +70 -66
  31. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +10 -10
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +14 -14
  33. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +26 -23
  34. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +26 -23
  35. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +12 -12
  36. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +26 -23
  37. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +4 -4
  38. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +4 -4
  39. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +11 -9
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +2 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +56 -47
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +59 -44
  43. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +59 -44
  44. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +59 -47
  45. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +59 -44
  46. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +59 -44
  47. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +59 -44
  48. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +59 -44
  49. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +59 -44
  50. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +76 -74
  51. data/lib/twilio-ruby/rest/authy.rb +8 -8
  52. data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
  53. data/lib/twilio-ruby/rest/client.rb +16 -13
  54. data/lib/twilio-ruby/rest/messaging.rb +15 -0
  55. data/lib/twilio-ruby/rest/messaging/v1.rb +23 -0
  56. data/lib/twilio-ruby/rest/messaging/v1/session.rb +482 -0
  57. data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +434 -0
  58. data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +458 -0
  59. data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +285 -0
  60. data/lib/twilio-ruby/rest/preview.rb +8 -8
  61. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  62. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -2
  63. data/lib/twilio-ruby/rest/video.rb +9 -9
  64. data/lib/twilio-ruby/rest/video/v1.rb +16 -16
  65. data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -6
  66. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +37 -21
  67. data/lib/twilio-ruby/rest/video/v1/recording.rb +12 -3
  68. data/lib/twilio-ruby/security/request_validator.rb +2 -2
  69. data/lib/twilio-ruby/version.rb +1 -1
  70. data/spec/integration/messaging/v1/session/message_spec.rb +238 -0
  71. data/spec/integration/messaging/v1/session/participant_spec.rb +256 -0
  72. data/spec/integration/messaging/v1/session_spec.rb +223 -0
  73. data/spec/integration/messaging/v1/webhook_spec.rb +92 -0
  74. data/spec/integration/video/v1/composition_hook_spec.rb +1 -1
  75. data/spec/security/request_validator_spec.rb +5 -7
  76. metadata +14 -2
@@ -0,0 +1,285 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Messaging < Domain
12
+ class V1 < Version
13
+ ##
14
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
+ class WebhookList < ListResource
16
+ ##
17
+ # Initialize the WebhookList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [WebhookList] WebhookList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ '#<Twilio.Messaging.V1.WebhookList>'
31
+ end
32
+ end
33
+
34
+ ##
35
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
36
+ class WebhookPage < Page
37
+ ##
38
+ # Initialize the WebhookPage
39
+ # @param [Version] version Version that contains the resource
40
+ # @param [Response] response Response from the API
41
+ # @param [Hash] solution Path solution for the resource
42
+ # @return [WebhookPage] WebhookPage
43
+ def initialize(version, response, solution)
44
+ super(version, response)
45
+
46
+ # Path Solution
47
+ @solution = solution
48
+ end
49
+
50
+ ##
51
+ # Build an instance of WebhookInstance
52
+ # @param [Hash] payload Payload response from the API
53
+ # @return [WebhookInstance] WebhookInstance
54
+ def get_instance(payload)
55
+ WebhookInstance.new(@version, payload, )
56
+ end
57
+
58
+ ##
59
+ # Provide a user friendly representation
60
+ def to_s
61
+ '<Twilio.Messaging.V1.WebhookPage>'
62
+ end
63
+ end
64
+
65
+ ##
66
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
67
+ class WebhookContext < InstanceContext
68
+ ##
69
+ # Initialize the WebhookContext
70
+ # @param [Version] version Version that contains the resource
71
+ # @return [WebhookContext] WebhookContext
72
+ def initialize(version)
73
+ super(version)
74
+
75
+ # Path Solution
76
+ @solution = {}
77
+ @uri = "/Sessions/Webhooks"
78
+ end
79
+
80
+ ##
81
+ # Fetch a WebhookInstance
82
+ # @return [WebhookInstance] Fetched WebhookInstance
83
+ def fetch
84
+ params = Twilio::Values.of({})
85
+
86
+ payload = @version.fetch(
87
+ 'GET',
88
+ @uri,
89
+ params,
90
+ )
91
+
92
+ WebhookInstance.new(@version, payload, )
93
+ end
94
+
95
+ ##
96
+ # Update the WebhookInstance
97
+ # @param [String] webhook_method The HTTP method to be used when sending a webhook
98
+ # request.
99
+ # @param [String] webhook_filters The list of webhook event triggers that are
100
+ # enabled for this Service.
101
+ # @param [String] pre_webhook_url The absolute url the pre-event webhook request
102
+ # should be sent to.
103
+ # @param [String] post_webhook_url The absolute url the post-event webhook request
104
+ # should be sent to.
105
+ # @param [String] pre_webhook_retry_count The number of retries in case of
106
+ # pre-event webhook request failures. Maximum 3 retries are allowed, the default
107
+ # value is 0.
108
+ # @param [String] post_webhook_retry_count The number of retries in case of
109
+ # post-event webhook request failures. Maximum 3 retries are allowed, the default
110
+ # value is 0.
111
+ # @return [WebhookInstance] Updated WebhookInstance
112
+ def update(webhook_method: :unset, webhook_filters: :unset, pre_webhook_url: :unset, post_webhook_url: :unset, pre_webhook_retry_count: :unset, post_webhook_retry_count: :unset)
113
+ data = Twilio::Values.of({
114
+ 'WebhookMethod' => webhook_method,
115
+ 'WebhookFilters' => Twilio.serialize_list(webhook_filters) { |e| e },
116
+ 'PreWebhookUrl' => pre_webhook_url,
117
+ 'PostWebhookUrl' => post_webhook_url,
118
+ 'PreWebhookRetryCount' => pre_webhook_retry_count,
119
+ 'PostWebhookRetryCount' => post_webhook_retry_count,
120
+ })
121
+
122
+ payload = @version.update(
123
+ 'POST',
124
+ @uri,
125
+ data: data,
126
+ )
127
+
128
+ WebhookInstance.new(@version, payload, )
129
+ end
130
+
131
+ ##
132
+ # Provide a user friendly representation
133
+ def to_s
134
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
135
+ "#<Twilio.Messaging.V1.WebhookContext #{context}>"
136
+ end
137
+ end
138
+
139
+ ##
140
+ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
141
+ class WebhookInstance < InstanceResource
142
+ ##
143
+ # Initialize the WebhookInstance
144
+ # @param [Version] version Version that contains the resource
145
+ # @param [Hash] payload payload that contains response from Twilio
146
+ # @return [WebhookInstance] WebhookInstance
147
+ def initialize(version, payload)
148
+ super(version)
149
+
150
+ # Marshaled Properties
151
+ @properties = {
152
+ 'account_sid' => payload['account_sid'],
153
+ 'service_sid' => payload['service_sid'],
154
+ 'webhook_method' => payload['webhook_method'],
155
+ 'webhook_filters' => payload['webhook_filters'],
156
+ 'pre_webhook_url' => payload['pre_webhook_url'],
157
+ 'post_webhook_url' => payload['post_webhook_url'],
158
+ 'pre_webhook_retry_count' => payload['pre_webhook_retry_count'].to_i,
159
+ 'post_webhook_retry_count' => payload['post_webhook_retry_count'].to_i,
160
+ 'url' => payload['url'],
161
+ }
162
+
163
+ # Context
164
+ @instance_context = nil
165
+ @params = {}
166
+ end
167
+
168
+ ##
169
+ # Generate an instance context for the instance, the context is capable of
170
+ # performing various actions. All instance actions are proxied to the context
171
+ # @return [WebhookContext] WebhookContext for this WebhookInstance
172
+ def context
173
+ unless @instance_context
174
+ @instance_context = WebhookContext.new(@version, )
175
+ end
176
+ @instance_context
177
+ end
178
+
179
+ ##
180
+ # @return [String] The unique id of the Account responsible for this session.
181
+ def account_sid
182
+ @properties['account_sid']
183
+ end
184
+
185
+ ##
186
+ # @return [String] The unique id of the Chat Service this session belongs to.
187
+ def service_sid
188
+ @properties['service_sid']
189
+ end
190
+
191
+ ##
192
+ # @return [String] The HTTP method to be used when sending a webhook request.
193
+ def webhook_method
194
+ @properties['webhook_method']
195
+ end
196
+
197
+ ##
198
+ # @return [String] The list of webhook event triggers that are enabled for this Service.
199
+ def webhook_filters
200
+ @properties['webhook_filters']
201
+ end
202
+
203
+ ##
204
+ # @return [String] The absolute url the pre-event webhook request should be sent to.
205
+ def pre_webhook_url
206
+ @properties['pre_webhook_url']
207
+ end
208
+
209
+ ##
210
+ # @return [String] The absolute url the post-event webhook request should be sent to.
211
+ def post_webhook_url
212
+ @properties['post_webhook_url']
213
+ end
214
+
215
+ ##
216
+ # @return [String] The number of retries in case of pre-event webhook request failures.
217
+ def pre_webhook_retry_count
218
+ @properties['pre_webhook_retry_count']
219
+ end
220
+
221
+ ##
222
+ # @return [String] The number of retries in case of post-event webhook request failures.
223
+ def post_webhook_retry_count
224
+ @properties['post_webhook_retry_count']
225
+ end
226
+
227
+ ##
228
+ # @return [String] An absolute URL for this webhook.
229
+ def url
230
+ @properties['url']
231
+ end
232
+
233
+ ##
234
+ # Fetch a WebhookInstance
235
+ # @return [WebhookInstance] Fetched WebhookInstance
236
+ def fetch
237
+ context.fetch
238
+ end
239
+
240
+ ##
241
+ # Update the WebhookInstance
242
+ # @param [String] webhook_method The HTTP method to be used when sending a webhook
243
+ # request.
244
+ # @param [String] webhook_filters The list of webhook event triggers that are
245
+ # enabled for this Service.
246
+ # @param [String] pre_webhook_url The absolute url the pre-event webhook request
247
+ # should be sent to.
248
+ # @param [String] post_webhook_url The absolute url the post-event webhook request
249
+ # should be sent to.
250
+ # @param [String] pre_webhook_retry_count The number of retries in case of
251
+ # pre-event webhook request failures. Maximum 3 retries are allowed, the default
252
+ # value is 0.
253
+ # @param [String] post_webhook_retry_count The number of retries in case of
254
+ # post-event webhook request failures. Maximum 3 retries are allowed, the default
255
+ # value is 0.
256
+ # @return [WebhookInstance] Updated WebhookInstance
257
+ def update(webhook_method: :unset, webhook_filters: :unset, pre_webhook_url: :unset, post_webhook_url: :unset, pre_webhook_retry_count: :unset, post_webhook_retry_count: :unset)
258
+ context.update(
259
+ webhook_method: webhook_method,
260
+ webhook_filters: webhook_filters,
261
+ pre_webhook_url: pre_webhook_url,
262
+ post_webhook_url: post_webhook_url,
263
+ pre_webhook_retry_count: pre_webhook_retry_count,
264
+ post_webhook_retry_count: post_webhook_retry_count,
265
+ )
266
+ end
267
+
268
+ ##
269
+ # Provide a user friendly representation
270
+ def to_s
271
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
272
+ "<Twilio.Messaging.V1.WebhookInstance #{values}>"
273
+ end
274
+
275
+ ##
276
+ # Provide a detailed, user friendly representation
277
+ def inspect
278
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
279
+ "<Twilio.Messaging.V1.WebhookInstance #{values}>"
280
+ end
281
+ end
282
+ end
283
+ end
284
+ end
285
+ end
@@ -120,14 +120,6 @@ module Twilio
120
120
  self.hosted_numbers.hosted_number_orders(sid)
121
121
  end
122
122
 
123
- ##
124
- # @param [String] sid A 34 character string that uniquely identifies this Add-on.
125
- # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
126
- # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
127
- def available_add_ons(sid=:unset)
128
- self.marketplace.available_add_ons(sid)
129
- end
130
-
131
123
  ##
132
124
  # @param [String] sid 34 character string that uniquely identifies the Add-on.
133
125
  # This Sid can also be found in the Console on that specific Add-ons page as the
@@ -138,6 +130,14 @@ module Twilio
138
130
  self.marketplace.installed_add_ons(sid)
139
131
  end
140
132
 
133
+ ##
134
+ # @param [String] sid A 34 character string that uniquely identifies this Add-on.
135
+ # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
136
+ # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
137
+ def available_add_ons(sid=:unset)
138
+ self.marketplace.available_add_ons(sid)
139
+ end
140
+
141
141
  ##
142
142
  # @param [String] sid The sid
143
143
  # @return [Twilio::REST::Preview::Sync::ServiceInstance] if sid was passed.
@@ -15,37 +15,37 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'marketplace'
18
- @available_add_ons = nil
19
18
  @installed_add_ons = nil
19
+ @available_add_ons = nil
20
20
  end
21
21
 
22
22
  ##
23
- # @param [String] sid The Available Add-on Sid that uniquely identifies this
23
+ # @param [String] sid The Installed Add-on Sid that uniquely identifies this
24
24
  # resource
25
- # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed.
26
- # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
27
- def available_add_ons(sid=:unset)
25
+ # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed.
26
+ # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList]
27
+ def installed_add_ons(sid=:unset)
28
28
  if sid.nil?
29
29
  raise ArgumentError, 'sid cannot be nil'
30
30
  elsif sid == :unset
31
- @available_add_ons ||= AvailableAddOnList.new self
31
+ @installed_add_ons ||= InstalledAddOnList.new self
32
32
  else
33
- AvailableAddOnContext.new(self, sid)
33
+ InstalledAddOnContext.new(self, sid)
34
34
  end
35
35
  end
36
36
 
37
37
  ##
38
- # @param [String] sid The Installed Add-on Sid that uniquely identifies this
38
+ # @param [String] sid The Available Add-on Sid that uniquely identifies this
39
39
  # resource
40
- # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed.
41
- # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList]
42
- def installed_add_ons(sid=:unset)
40
+ # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed.
41
+ # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
42
+ def available_add_ons(sid=:unset)
43
43
  if sid.nil?
44
44
  raise ArgumentError, 'sid cannot be nil'
45
45
  elsif sid == :unset
46
- @installed_add_ons ||= InstalledAddOnList.new self
46
+ @available_add_ons ||= AvailableAddOnList.new self
47
47
  else
48
- InstalledAddOnContext.new(self, sid)
48
+ AvailableAddOnContext.new(self, sid)
49
49
  end
50
50
  end
51
51
 
@@ -114,8 +114,9 @@ module Twilio
114
114
  # Request is executed immediately.
115
115
  # @param [String] unique_name Your unique identifier for this Session such as a
116
116
  # Job ID or conversation ID. *Should not contain PII.*
117
- # @param [Time] date_expiry An absolute time (ISO 8601) at which this Session
118
- # should close. If this is populated, it takes precedence over TTL values.
117
+ # @param [Time] date_expiry An absolute time (ISO 8601) in the future at which
118
+ # this Session should close. If this is populated, it takes precedence over TTL
119
+ # values.
119
120
  # @param [String] ttl The time, in seconds, after the latest of Session create
120
121
  # time or the Session's last Interaction time at which the session will expire.
121
122
  # @param [session.Mode] mode The type of communications mediums allowed on a
@@ -28,15 +28,6 @@ module Twilio
28
28
  @v1 ||= V1.new self
29
29
  end
30
30
 
31
- ##
32
- # @param [String] sid `CJxx…xx` A system-generated 34-character string that
33
- # uniquely identifies this Composition.
34
- # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
35
- # @return [Twilio::REST::Video::V1::CompositionList]
36
- def compositions(sid=:unset)
37
- self.v1.compositions(sid)
38
- end
39
-
40
31
  ##
41
32
  # @param [String] sid `HKxx…xx` A system-generated 34-character string that
42
33
  # uniquely identifies this Composition Hook.
@@ -67,6 +58,15 @@ module Twilio
67
58
  self.v1.recording_settings()
68
59
  end
69
60
 
61
+ ##
62
+ # @param [String] sid `CJxx…xx` A system-generated 34-character string that
63
+ # uniquely identifies this Composition.
64
+ # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
65
+ # @return [Twilio::REST::Video::V1::CompositionList]
66
+ def compositions(sid=:unset)
67
+ self.v1.compositions(sid)
68
+ end
69
+
70
70
  ##
71
71
  # @param [String] sid A system-generated 34-character string that uniquely
72
72
  # identifies this resource.
@@ -15,29 +15,14 @@ module Twilio
15
15
  def initialize(domain)
16
16
  super
17
17
  @version = 'v1'
18
- @compositions = nil
19
18
  @composition_hooks = nil
20
19
  @composition_settings = nil
21
20
  @recordings = nil
22
21
  @recording_settings = nil
22
+ @compositions = nil
23
23
  @rooms = nil
24
24
  end
25
25
 
26
- ##
27
- # @param [String] sid The Composition Sid that uniquely identifies the Composition
28
- # to fetch.
29
- # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
30
- # @return [Twilio::REST::Video::V1::CompositionList]
31
- def compositions(sid=:unset)
32
- if sid.nil?
33
- raise ArgumentError, 'sid cannot be nil'
34
- elsif sid == :unset
35
- @compositions ||= CompositionList.new self
36
- else
37
- CompositionContext.new(self, sid)
38
- end
39
- end
40
-
41
26
  ##
42
27
  # @param [String] sid The Composition Hook Sid that uniquely identifies the
43
28
  # Composition Hook to fetch.
@@ -80,6 +65,21 @@ module Twilio
80
65
  @recording_settings ||= RecordingSettingsContext.new self
81
66
  end
82
67
 
68
+ ##
69
+ # @param [String] sid The Composition Sid that uniquely identifies the Composition
70
+ # to fetch.
71
+ # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
72
+ # @return [Twilio::REST::Video::V1::CompositionList]
73
+ def compositions(sid=:unset)
74
+ if sid.nil?
75
+ raise ArgumentError, 'sid cannot be nil'
76
+ elsif sid == :unset
77
+ @compositions ||= CompositionList.new self
78
+ else
79
+ CompositionContext.new(self, sid)
80
+ end
81
+ end
82
+
83
83
  ##
84
84
  # @param [String] sid The Room Sid or name that uniquely identifies this resource.
85
85
  # @return [Twilio::REST::Video::V1::RoomContext] if sid was passed.