twilio-ruby 5.11.2 → 5.12.0
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.
- checksums.yaml +4 -4
- data/CHANGES.md +20 -0
- data/Makefile +2 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +13 -6
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +10 -4
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +18 -6
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +7 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +13 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +10 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +18 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +7 -3
- data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -46
- data/lib/twilio-ruby/rest/preview.rb +13 -20
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent.rb +16 -0
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb +226 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +102 -50
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/twiml/voice_response.rb +42 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/chat/v2/service/channel/message_spec.rb +1 -1
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +1 -1
- data/spec/integration/preview/understand/assistant/intent/intent_statistics_spec.rb +50 -0
- data/spec/integration/preview/understand/assistant/intent_spec.rb +8 -4
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +31 -0
- metadata +6 -37
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +0 -225
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +0 -438
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +0 -262
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +0 -438
- data/lib/twilio-ruby/rest/preview/proxy.rb +0 -43
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +0 -464
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +0 -347
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +0 -497
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +0 -437
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +0 -514
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +0 -455
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +0 -342
- data/spec/integration/notify/v1/service/segment_spec.rb +0 -86
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +0 -118
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +0 -268
- data/spec/integration/notify/v1/service/user_spec.rb +0 -213
- data/spec/integration/preview/proxy/service/phone_number_spec.rb +0 -173
- data/spec/integration/preview/proxy/service/session/interaction_spec.rb +0 -106
- data/spec/integration/preview/proxy/service/session/participant/message_interaction_spec.rb +0 -166
- data/spec/integration/preview/proxy/service/session/participant_spec.rb +0 -226
- data/spec/integration/preview/proxy/service/session_spec.rb +0 -218
- data/spec/integration/preview/proxy/service/short_code_spec.rb +0 -173
- data/spec/integration/preview/proxy/service_spec.rb +0 -202
@@ -1,438 +0,0 @@
|
|
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 Notify < Domain
|
12
|
-
class V1 < Version
|
13
|
-
class ServiceContext < InstanceContext
|
14
|
-
class UserContext < InstanceContext
|
15
|
-
##
|
16
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
17
|
-
class UserBindingList < ListResource
|
18
|
-
##
|
19
|
-
# Initialize the UserBindingList
|
20
|
-
# @param [Version] version Version that contains the resource
|
21
|
-
# @param [String] service_sid The service_sid
|
22
|
-
# @param [String] identity The identity
|
23
|
-
# @return [UserBindingList] UserBindingList
|
24
|
-
def initialize(version, service_sid: nil, identity: nil)
|
25
|
-
super(version)
|
26
|
-
|
27
|
-
# Path Solution
|
28
|
-
@solution = {service_sid: service_sid, identity: identity}
|
29
|
-
@uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:identity]}/Bindings"
|
30
|
-
end
|
31
|
-
|
32
|
-
##
|
33
|
-
# Retrieve a single page of UserBindingInstance records from the API.
|
34
|
-
# Request is executed immediately.
|
35
|
-
# @param [user_binding.BindingType] binding_type The binding_type
|
36
|
-
# @param [String] address The address
|
37
|
-
# @param [String] tag The tag
|
38
|
-
# @param [String] notification_protocol_version The notification_protocol_version
|
39
|
-
# @param [String] credential_sid The credential_sid
|
40
|
-
# @param [String] endpoint The endpoint
|
41
|
-
# @return [UserBindingInstance] Newly created UserBindingInstance
|
42
|
-
def create(binding_type: nil, address: nil, tag: :unset, notification_protocol_version: :unset, credential_sid: :unset, endpoint: :unset)
|
43
|
-
data = Twilio::Values.of({
|
44
|
-
'BindingType' => binding_type,
|
45
|
-
'Address' => address,
|
46
|
-
'Tag' => Twilio.serialize_list(tag) { |e| e },
|
47
|
-
'NotificationProtocolVersion' => notification_protocol_version,
|
48
|
-
'CredentialSid' => credential_sid,
|
49
|
-
'Endpoint' => endpoint,
|
50
|
-
})
|
51
|
-
|
52
|
-
payload = @version.create(
|
53
|
-
'POST',
|
54
|
-
@uri,
|
55
|
-
data: data
|
56
|
-
)
|
57
|
-
|
58
|
-
UserBindingInstance.new(
|
59
|
-
@version,
|
60
|
-
payload,
|
61
|
-
service_sid: @solution[:service_sid],
|
62
|
-
identity: @solution[:identity],
|
63
|
-
)
|
64
|
-
end
|
65
|
-
|
66
|
-
##
|
67
|
-
# Lists UserBindingInstance records from the API as a list.
|
68
|
-
# Unlike stream(), this operation is eager and will load `limit` records into
|
69
|
-
# memory before returning.
|
70
|
-
# @param [Date] start_date The start_date
|
71
|
-
# @param [Date] end_date The end_date
|
72
|
-
# @param [String] tag The tag
|
73
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
74
|
-
# guarantees to never return more than limit. Default is no limit
|
75
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
76
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
77
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
78
|
-
# efficient page size, i.e. min(limit, 1000)
|
79
|
-
# @return [Array] Array of up to limit results
|
80
|
-
def list(start_date: :unset, end_date: :unset, tag: :unset, limit: nil, page_size: nil)
|
81
|
-
self.stream(
|
82
|
-
start_date: start_date,
|
83
|
-
end_date: end_date,
|
84
|
-
tag: tag,
|
85
|
-
limit: limit,
|
86
|
-
page_size: page_size
|
87
|
-
).entries
|
88
|
-
end
|
89
|
-
|
90
|
-
##
|
91
|
-
# Streams UserBindingInstance records from the API as an Enumerable.
|
92
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
93
|
-
# is reached.
|
94
|
-
# @param [Date] start_date The start_date
|
95
|
-
# @param [Date] end_date The end_date
|
96
|
-
# @param [String] tag The tag
|
97
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
98
|
-
# guarantees to never return more than limit. Default is no limit.
|
99
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
100
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
101
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
102
|
-
# efficient page size, i.e. min(limit, 1000)
|
103
|
-
# @return [Enumerable] Enumerable that will yield up to limit results
|
104
|
-
def stream(start_date: :unset, end_date: :unset, tag: :unset, limit: nil, page_size: nil)
|
105
|
-
limits = @version.read_limits(limit, page_size)
|
106
|
-
|
107
|
-
page = self.page(
|
108
|
-
start_date: start_date,
|
109
|
-
end_date: end_date,
|
110
|
-
tag: tag,
|
111
|
-
page_size: limits[:page_size],
|
112
|
-
)
|
113
|
-
|
114
|
-
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
115
|
-
end
|
116
|
-
|
117
|
-
##
|
118
|
-
# When passed a block, yields UserBindingInstance records from the API.
|
119
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
120
|
-
# is reached.
|
121
|
-
def each
|
122
|
-
limits = @version.read_limits
|
123
|
-
|
124
|
-
page = self.page(page_size: limits[:page_size], )
|
125
|
-
|
126
|
-
@version.stream(page,
|
127
|
-
limit: limits[:limit],
|
128
|
-
page_limit: limits[:page_limit]).each {|x| yield x}
|
129
|
-
end
|
130
|
-
|
131
|
-
##
|
132
|
-
# Retrieve a single page of UserBindingInstance records from the API.
|
133
|
-
# Request is executed immediately.
|
134
|
-
# @param [Date] start_date The start_date
|
135
|
-
# @param [Date] end_date The end_date
|
136
|
-
# @param [String] tag The tag
|
137
|
-
# @param [String] page_token PageToken provided by the API
|
138
|
-
# @param [Integer] page_number Page Number, this value is simply for client state
|
139
|
-
# @param [Integer] page_size Number of records to return, defaults to 50
|
140
|
-
# @return [Page] Page of UserBindingInstance
|
141
|
-
def page(start_date: :unset, end_date: :unset, tag: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
142
|
-
params = Twilio::Values.of({
|
143
|
-
'StartDate' => Twilio.serialize_iso8601_date(start_date),
|
144
|
-
'EndDate' => Twilio.serialize_iso8601_date(end_date),
|
145
|
-
'Tag' => Twilio.serialize_list(tag) { |e| e },
|
146
|
-
'PageToken' => page_token,
|
147
|
-
'Page' => page_number,
|
148
|
-
'PageSize' => page_size,
|
149
|
-
})
|
150
|
-
response = @version.page(
|
151
|
-
'GET',
|
152
|
-
@uri,
|
153
|
-
params
|
154
|
-
)
|
155
|
-
UserBindingPage.new(@version, response, @solution)
|
156
|
-
end
|
157
|
-
|
158
|
-
##
|
159
|
-
# Retrieve a single page of UserBindingInstance records from the API.
|
160
|
-
# Request is executed immediately.
|
161
|
-
# @param [String] target_url API-generated URL for the requested results page
|
162
|
-
# @return [Page] Page of UserBindingInstance
|
163
|
-
def get_page(target_url)
|
164
|
-
response = @version.domain.request(
|
165
|
-
'GET',
|
166
|
-
target_url
|
167
|
-
)
|
168
|
-
UserBindingPage.new(@version, response, @solution)
|
169
|
-
end
|
170
|
-
|
171
|
-
##
|
172
|
-
# Provide a user friendly representation
|
173
|
-
def to_s
|
174
|
-
'#<Twilio.Notify.V1.UserBindingList>'
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
##
|
179
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
180
|
-
class UserBindingPage < Page
|
181
|
-
##
|
182
|
-
# Initialize the UserBindingPage
|
183
|
-
# @param [Version] version Version that contains the resource
|
184
|
-
# @param [Response] response Response from the API
|
185
|
-
# @param [Hash] solution Path solution for the resource
|
186
|
-
# @return [UserBindingPage] UserBindingPage
|
187
|
-
def initialize(version, response, solution)
|
188
|
-
super(version, response)
|
189
|
-
|
190
|
-
# Path Solution
|
191
|
-
@solution = solution
|
192
|
-
end
|
193
|
-
|
194
|
-
##
|
195
|
-
# Build an instance of UserBindingInstance
|
196
|
-
# @param [Hash] payload Payload response from the API
|
197
|
-
# @return [UserBindingInstance] UserBindingInstance
|
198
|
-
def get_instance(payload)
|
199
|
-
UserBindingInstance.new(
|
200
|
-
@version,
|
201
|
-
payload,
|
202
|
-
service_sid: @solution[:service_sid],
|
203
|
-
identity: @solution[:identity],
|
204
|
-
)
|
205
|
-
end
|
206
|
-
|
207
|
-
##
|
208
|
-
# Provide a user friendly representation
|
209
|
-
def to_s
|
210
|
-
'<Twilio.Notify.V1.UserBindingPage>'
|
211
|
-
end
|
212
|
-
end
|
213
|
-
|
214
|
-
##
|
215
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
216
|
-
class UserBindingContext < InstanceContext
|
217
|
-
##
|
218
|
-
# Initialize the UserBindingContext
|
219
|
-
# @param [Version] version Version that contains the resource
|
220
|
-
# @param [String] service_sid The service_sid
|
221
|
-
# @param [String] identity The identity
|
222
|
-
# @param [String] sid The sid
|
223
|
-
# @return [UserBindingContext] UserBindingContext
|
224
|
-
def initialize(version, service_sid, identity, sid)
|
225
|
-
super(version)
|
226
|
-
|
227
|
-
# Path Solution
|
228
|
-
@solution = {service_sid: service_sid, identity: identity, sid: sid, }
|
229
|
-
@uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:identity]}/Bindings/#{@solution[:sid]}"
|
230
|
-
end
|
231
|
-
|
232
|
-
##
|
233
|
-
# Fetch a UserBindingInstance
|
234
|
-
# @return [UserBindingInstance] Fetched UserBindingInstance
|
235
|
-
def fetch
|
236
|
-
params = Twilio::Values.of({})
|
237
|
-
|
238
|
-
payload = @version.fetch(
|
239
|
-
'GET',
|
240
|
-
@uri,
|
241
|
-
params,
|
242
|
-
)
|
243
|
-
|
244
|
-
UserBindingInstance.new(
|
245
|
-
@version,
|
246
|
-
payload,
|
247
|
-
service_sid: @solution[:service_sid],
|
248
|
-
identity: @solution[:identity],
|
249
|
-
sid: @solution[:sid],
|
250
|
-
)
|
251
|
-
end
|
252
|
-
|
253
|
-
##
|
254
|
-
# Deletes the UserBindingInstance
|
255
|
-
# @return [Boolean] true if delete succeeds, true otherwise
|
256
|
-
def delete
|
257
|
-
@version.delete('delete', @uri)
|
258
|
-
end
|
259
|
-
|
260
|
-
##
|
261
|
-
# Provide a user friendly representation
|
262
|
-
def to_s
|
263
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
264
|
-
"#<Twilio.Notify.V1.UserBindingContext #{context}>"
|
265
|
-
end
|
266
|
-
end
|
267
|
-
|
268
|
-
##
|
269
|
-
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
270
|
-
class UserBindingInstance < InstanceResource
|
271
|
-
##
|
272
|
-
# Initialize the UserBindingInstance
|
273
|
-
# @param [Version] version Version that contains the resource
|
274
|
-
# @param [Hash] payload payload that contains response from Twilio
|
275
|
-
# @param [String] service_sid The service_sid
|
276
|
-
# @param [String] identity The identity
|
277
|
-
# @param [String] sid The sid
|
278
|
-
# @return [UserBindingInstance] UserBindingInstance
|
279
|
-
def initialize(version, payload, service_sid: nil, identity: nil, sid: nil)
|
280
|
-
super(version)
|
281
|
-
|
282
|
-
# Marshaled Properties
|
283
|
-
@properties = {
|
284
|
-
'sid' => payload['sid'],
|
285
|
-
'account_sid' => payload['account_sid'],
|
286
|
-
'service_sid' => payload['service_sid'],
|
287
|
-
'credential_sid' => payload['credential_sid'],
|
288
|
-
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
289
|
-
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
290
|
-
'notification_protocol_version' => payload['notification_protocol_version'],
|
291
|
-
'endpoint' => payload['endpoint'],
|
292
|
-
'identity' => payload['identity'],
|
293
|
-
'binding_type' => payload['binding_type'],
|
294
|
-
'address' => payload['address'],
|
295
|
-
'tags' => payload['tags'],
|
296
|
-
'url' => payload['url'],
|
297
|
-
'links' => payload['links'],
|
298
|
-
}
|
299
|
-
|
300
|
-
# Context
|
301
|
-
@instance_context = nil
|
302
|
-
@params = {'service_sid' => service_sid, 'identity' => identity, 'sid' => sid || @properties['sid'], }
|
303
|
-
end
|
304
|
-
|
305
|
-
##
|
306
|
-
# Generate an instance context for the instance, the context is capable of
|
307
|
-
# performing various actions. All instance actions are proxied to the context
|
308
|
-
# @return [UserBindingContext] UserBindingContext for this UserBindingInstance
|
309
|
-
def context
|
310
|
-
unless @instance_context
|
311
|
-
@instance_context = UserBindingContext.new(
|
312
|
-
@version,
|
313
|
-
@params['service_sid'],
|
314
|
-
@params['identity'],
|
315
|
-
@params['sid'],
|
316
|
-
)
|
317
|
-
end
|
318
|
-
@instance_context
|
319
|
-
end
|
320
|
-
|
321
|
-
##
|
322
|
-
# @return [String] The sid
|
323
|
-
def sid
|
324
|
-
@properties['sid']
|
325
|
-
end
|
326
|
-
|
327
|
-
##
|
328
|
-
# @return [String] The account_sid
|
329
|
-
def account_sid
|
330
|
-
@properties['account_sid']
|
331
|
-
end
|
332
|
-
|
333
|
-
##
|
334
|
-
# @return [String] The service_sid
|
335
|
-
def service_sid
|
336
|
-
@properties['service_sid']
|
337
|
-
end
|
338
|
-
|
339
|
-
##
|
340
|
-
# @return [String] The credential_sid
|
341
|
-
def credential_sid
|
342
|
-
@properties['credential_sid']
|
343
|
-
end
|
344
|
-
|
345
|
-
##
|
346
|
-
# @return [Time] The date_created
|
347
|
-
def date_created
|
348
|
-
@properties['date_created']
|
349
|
-
end
|
350
|
-
|
351
|
-
##
|
352
|
-
# @return [Time] The date_updated
|
353
|
-
def date_updated
|
354
|
-
@properties['date_updated']
|
355
|
-
end
|
356
|
-
|
357
|
-
##
|
358
|
-
# @return [String] The notification_protocol_version
|
359
|
-
def notification_protocol_version
|
360
|
-
@properties['notification_protocol_version']
|
361
|
-
end
|
362
|
-
|
363
|
-
##
|
364
|
-
# @return [String] The endpoint
|
365
|
-
def endpoint
|
366
|
-
@properties['endpoint']
|
367
|
-
end
|
368
|
-
|
369
|
-
##
|
370
|
-
# @return [String] The identity
|
371
|
-
def identity
|
372
|
-
@properties['identity']
|
373
|
-
end
|
374
|
-
|
375
|
-
##
|
376
|
-
# @return [String] The binding_type
|
377
|
-
def binding_type
|
378
|
-
@properties['binding_type']
|
379
|
-
end
|
380
|
-
|
381
|
-
##
|
382
|
-
# @return [String] The address
|
383
|
-
def address
|
384
|
-
@properties['address']
|
385
|
-
end
|
386
|
-
|
387
|
-
##
|
388
|
-
# @return [String] The tags
|
389
|
-
def tags
|
390
|
-
@properties['tags']
|
391
|
-
end
|
392
|
-
|
393
|
-
##
|
394
|
-
# @return [String] The url
|
395
|
-
def url
|
396
|
-
@properties['url']
|
397
|
-
end
|
398
|
-
|
399
|
-
##
|
400
|
-
# @return [String] The links
|
401
|
-
def links
|
402
|
-
@properties['links']
|
403
|
-
end
|
404
|
-
|
405
|
-
##
|
406
|
-
# Fetch a UserBindingInstance
|
407
|
-
# @return [UserBindingInstance] Fetched UserBindingInstance
|
408
|
-
def fetch
|
409
|
-
context.fetch
|
410
|
-
end
|
411
|
-
|
412
|
-
##
|
413
|
-
# Deletes the UserBindingInstance
|
414
|
-
# @return [Boolean] true if delete succeeds, true otherwise
|
415
|
-
def delete
|
416
|
-
context.delete
|
417
|
-
end
|
418
|
-
|
419
|
-
##
|
420
|
-
# Provide a user friendly representation
|
421
|
-
def to_s
|
422
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
423
|
-
"<Twilio.Notify.V1.UserBindingInstance #{values}>"
|
424
|
-
end
|
425
|
-
|
426
|
-
##
|
427
|
-
# Provide a detailed, user friendly representation
|
428
|
-
def inspect
|
429
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
430
|
-
"<Twilio.Notify.V1.UserBindingInstance #{values}>"
|
431
|
-
end
|
432
|
-
end
|
433
|
-
end
|
434
|
-
end
|
435
|
-
end
|
436
|
-
end
|
437
|
-
end
|
438
|
-
end
|
@@ -1,43 +0,0 @@
|
|
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 Preview
|
12
|
-
class Proxy < Version
|
13
|
-
##
|
14
|
-
# Initialize the Proxy version of Preview
|
15
|
-
def initialize(domain)
|
16
|
-
super
|
17
|
-
@version = 'Proxy'
|
18
|
-
@services = nil
|
19
|
-
end
|
20
|
-
|
21
|
-
##
|
22
|
-
# @param [String] sid A 34 character string that uniquely identifies this Service.
|
23
|
-
# @return [Twilio::REST::Preview::Proxy::ServiceContext] if sid was passed.
|
24
|
-
# @return [Twilio::REST::Preview::Proxy::ServiceList]
|
25
|
-
def services(sid=:unset)
|
26
|
-
if sid.nil?
|
27
|
-
raise ArgumentError, 'sid cannot be nil'
|
28
|
-
elsif sid == :unset
|
29
|
-
@services ||= ServiceList.new self
|
30
|
-
else
|
31
|
-
ServiceContext.new(self, sid)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
##
|
36
|
-
# Provide a user friendly representation
|
37
|
-
def to_s
|
38
|
-
'<Twilio::REST::Preview::Proxy>'
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|