twilio-ruby 5.11.1 → 5.11.2
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 +18 -0
- data/README.md +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +24 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +133 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +161 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +349 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +349 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +135 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +349 -0
- data/lib/twilio-ruby/rest/preview.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +3 -16
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +42 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +33 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +27 -19
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +11 -11
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +18 -18
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +17 -15
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/rest/video/v1/room.rb +2 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +20 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping_spec.rb +220 -0
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping_spec.rb +220 -0
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping_spec.rb +12 -0
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping_spec.rb +220 -0
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping_spec.rb +12 -0
- data/spec/integration/api/v2010/account/sip/domain/auth_types_spec.rb +12 -0
- data/spec/integration/preview/understand/assistant_spec.rb +0 -4
- data/spec/integration/proxy/v1/service/phone_number_spec.rb +51 -3
- data/spec/integration/proxy/v1/service/short_code_spec.rb +50 -3
- metadata +21 -3
@@ -0,0 +1,349 @@
|
|
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 Api < Domain
|
12
|
+
class V2010 < Version
|
13
|
+
class AccountContext < InstanceContext
|
14
|
+
class SipList < ListResource
|
15
|
+
class DomainContext < InstanceContext
|
16
|
+
class AuthTypesList < ListResource
|
17
|
+
class AuthTypeRegistrationsList < ListResource
|
18
|
+
class AuthRegistrationsCredentialListMappingList < ListResource
|
19
|
+
##
|
20
|
+
# Initialize the AuthRegistrationsCredentialListMappingList
|
21
|
+
# @param [Version] version Version that contains the resource
|
22
|
+
# @param [String] account_sid The unique id of the
|
23
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
|
24
|
+
# @param [String] domain_sid A 34 character string that uniquely identifies the
|
25
|
+
# SIP domain in Twilio.
|
26
|
+
# @return [AuthRegistrationsCredentialListMappingList] AuthRegistrationsCredentialListMappingList
|
27
|
+
def initialize(version, account_sid: nil, domain_sid: nil)
|
28
|
+
super(version)
|
29
|
+
|
30
|
+
# Path Solution
|
31
|
+
@solution = {account_sid: account_sid, domain_sid: domain_sid}
|
32
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/SIP/Domains/#{@solution[:domain_sid]}/Auth/Registrations/CredentialListMappings.json"
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Retrieve a single page of AuthRegistrationsCredentialListMappingInstance records from the API.
|
37
|
+
# Request is executed immediately.
|
38
|
+
# @param [String] credential_list_sid A 34 character string that uniquely
|
39
|
+
# identifies this credential list resource
|
40
|
+
# @return [AuthRegistrationsCredentialListMappingInstance] Newly created AuthRegistrationsCredentialListMappingInstance
|
41
|
+
def create(credential_list_sid: nil)
|
42
|
+
data = Twilio::Values.of({'CredentialListSid' => credential_list_sid, })
|
43
|
+
|
44
|
+
payload = @version.create(
|
45
|
+
'POST',
|
46
|
+
@uri,
|
47
|
+
data: data
|
48
|
+
)
|
49
|
+
|
50
|
+
AuthRegistrationsCredentialListMappingInstance.new(
|
51
|
+
@version,
|
52
|
+
payload,
|
53
|
+
account_sid: @solution[:account_sid],
|
54
|
+
domain_sid: @solution[:domain_sid],
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Lists AuthRegistrationsCredentialListMappingInstance records from the API as a list.
|
60
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
61
|
+
# memory before returning.
|
62
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
63
|
+
# guarantees to never return more than limit. Default is no limit
|
64
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
65
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
66
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
67
|
+
# efficient page size, i.e. min(limit, 1000)
|
68
|
+
# @return [Array] Array of up to limit results
|
69
|
+
def list(limit: nil, page_size: nil)
|
70
|
+
self.stream(limit: limit, page_size: page_size).entries
|
71
|
+
end
|
72
|
+
|
73
|
+
##
|
74
|
+
# Streams AuthRegistrationsCredentialListMappingInstance records from the API as an Enumerable.
|
75
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
76
|
+
# is reached.
|
77
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
78
|
+
# guarantees to never return more than limit. Default is no limit.
|
79
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
80
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
81
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
82
|
+
# efficient page size, i.e. min(limit, 1000)
|
83
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
84
|
+
def stream(limit: nil, page_size: nil)
|
85
|
+
limits = @version.read_limits(limit, page_size)
|
86
|
+
|
87
|
+
page = self.page(page_size: limits[:page_size], )
|
88
|
+
|
89
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# When passed a block, yields AuthRegistrationsCredentialListMappingInstance records from the API.
|
94
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
95
|
+
# is reached.
|
96
|
+
def each
|
97
|
+
limits = @version.read_limits
|
98
|
+
|
99
|
+
page = self.page(page_size: limits[:page_size], )
|
100
|
+
|
101
|
+
@version.stream(page,
|
102
|
+
limit: limits[:limit],
|
103
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Retrieve a single page of AuthRegistrationsCredentialListMappingInstance records from the API.
|
108
|
+
# Request is executed immediately.
|
109
|
+
# @param [String] page_token PageToken provided by the API
|
110
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
111
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
112
|
+
# @return [Page] Page of AuthRegistrationsCredentialListMappingInstance
|
113
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
114
|
+
params = Twilio::Values.of({
|
115
|
+
'PageToken' => page_token,
|
116
|
+
'Page' => page_number,
|
117
|
+
'PageSize' => page_size,
|
118
|
+
})
|
119
|
+
response = @version.page(
|
120
|
+
'GET',
|
121
|
+
@uri,
|
122
|
+
params
|
123
|
+
)
|
124
|
+
AuthRegistrationsCredentialListMappingPage.new(@version, response, @solution)
|
125
|
+
end
|
126
|
+
|
127
|
+
##
|
128
|
+
# Retrieve a single page of AuthRegistrationsCredentialListMappingInstance records from the API.
|
129
|
+
# Request is executed immediately.
|
130
|
+
# @param [String] target_url API-generated URL for the requested results page
|
131
|
+
# @return [Page] Page of AuthRegistrationsCredentialListMappingInstance
|
132
|
+
def get_page(target_url)
|
133
|
+
response = @version.domain.request(
|
134
|
+
'GET',
|
135
|
+
target_url
|
136
|
+
)
|
137
|
+
AuthRegistrationsCredentialListMappingPage.new(@version, response, @solution)
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# Provide a user friendly representation
|
142
|
+
def to_s
|
143
|
+
'#<Twilio.Api.V2010.AuthRegistrationsCredentialListMappingList>'
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
class AuthRegistrationsCredentialListMappingPage < Page
|
148
|
+
##
|
149
|
+
# Initialize the AuthRegistrationsCredentialListMappingPage
|
150
|
+
# @param [Version] version Version that contains the resource
|
151
|
+
# @param [Response] response Response from the API
|
152
|
+
# @param [Hash] solution Path solution for the resource
|
153
|
+
# @return [AuthRegistrationsCredentialListMappingPage] AuthRegistrationsCredentialListMappingPage
|
154
|
+
def initialize(version, response, solution)
|
155
|
+
super(version, response)
|
156
|
+
|
157
|
+
# Path Solution
|
158
|
+
@solution = solution
|
159
|
+
end
|
160
|
+
|
161
|
+
##
|
162
|
+
# Build an instance of AuthRegistrationsCredentialListMappingInstance
|
163
|
+
# @param [Hash] payload Payload response from the API
|
164
|
+
# @return [AuthRegistrationsCredentialListMappingInstance] AuthRegistrationsCredentialListMappingInstance
|
165
|
+
def get_instance(payload)
|
166
|
+
AuthRegistrationsCredentialListMappingInstance.new(
|
167
|
+
@version,
|
168
|
+
payload,
|
169
|
+
account_sid: @solution[:account_sid],
|
170
|
+
domain_sid: @solution[:domain_sid],
|
171
|
+
)
|
172
|
+
end
|
173
|
+
|
174
|
+
##
|
175
|
+
# Provide a user friendly representation
|
176
|
+
def to_s
|
177
|
+
'<Twilio.Api.V2010.AuthRegistrationsCredentialListMappingPage>'
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
class AuthRegistrationsCredentialListMappingContext < InstanceContext
|
182
|
+
##
|
183
|
+
# Initialize the AuthRegistrationsCredentialListMappingContext
|
184
|
+
# @param [Version] version Version that contains the resource
|
185
|
+
# @param [String] account_sid The account_sid
|
186
|
+
# @param [String] domain_sid The domain_sid
|
187
|
+
# @param [String] sid The credential list Sid that uniquely identifies this
|
188
|
+
# resource
|
189
|
+
# @return [AuthRegistrationsCredentialListMappingContext] AuthRegistrationsCredentialListMappingContext
|
190
|
+
def initialize(version, account_sid, domain_sid, sid)
|
191
|
+
super(version)
|
192
|
+
|
193
|
+
# Path Solution
|
194
|
+
@solution = {account_sid: account_sid, domain_sid: domain_sid, sid: sid, }
|
195
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/SIP/Domains/#{@solution[:domain_sid]}/Auth/Registrations/CredentialListMappings/#{@solution[:sid]}.json"
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# Fetch a AuthRegistrationsCredentialListMappingInstance
|
200
|
+
# @return [AuthRegistrationsCredentialListMappingInstance] Fetched AuthRegistrationsCredentialListMappingInstance
|
201
|
+
def fetch
|
202
|
+
params = Twilio::Values.of({})
|
203
|
+
|
204
|
+
payload = @version.fetch(
|
205
|
+
'GET',
|
206
|
+
@uri,
|
207
|
+
params,
|
208
|
+
)
|
209
|
+
|
210
|
+
AuthRegistrationsCredentialListMappingInstance.new(
|
211
|
+
@version,
|
212
|
+
payload,
|
213
|
+
account_sid: @solution[:account_sid],
|
214
|
+
domain_sid: @solution[:domain_sid],
|
215
|
+
sid: @solution[:sid],
|
216
|
+
)
|
217
|
+
end
|
218
|
+
|
219
|
+
##
|
220
|
+
# Deletes the AuthRegistrationsCredentialListMappingInstance
|
221
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
222
|
+
def delete
|
223
|
+
@version.delete('delete', @uri)
|
224
|
+
end
|
225
|
+
|
226
|
+
##
|
227
|
+
# Provide a user friendly representation
|
228
|
+
def to_s
|
229
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
230
|
+
"#<Twilio.Api.V2010.AuthRegistrationsCredentialListMappingContext #{context}>"
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
class AuthRegistrationsCredentialListMappingInstance < InstanceResource
|
235
|
+
##
|
236
|
+
# Initialize the AuthRegistrationsCredentialListMappingInstance
|
237
|
+
# @param [Version] version Version that contains the resource
|
238
|
+
# @param [Hash] payload payload that contains response from Twilio
|
239
|
+
# @param [String] account_sid The unique id of the
|
240
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
|
241
|
+
# @param [String] domain_sid A 34 character string that uniquely identifies the
|
242
|
+
# SIP domain in Twilio.
|
243
|
+
# @param [String] sid The credential list Sid that uniquely identifies this
|
244
|
+
# resource
|
245
|
+
# @return [AuthRegistrationsCredentialListMappingInstance] AuthRegistrationsCredentialListMappingInstance
|
246
|
+
def initialize(version, payload, account_sid: nil, domain_sid: nil, sid: nil)
|
247
|
+
super(version)
|
248
|
+
|
249
|
+
# Marshaled Properties
|
250
|
+
@properties = {
|
251
|
+
'account_sid' => payload['account_sid'],
|
252
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
253
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
254
|
+
'friendly_name' => payload['friendly_name'],
|
255
|
+
'sid' => payload['sid'],
|
256
|
+
}
|
257
|
+
|
258
|
+
# Context
|
259
|
+
@instance_context = nil
|
260
|
+
@params = {
|
261
|
+
'account_sid' => account_sid,
|
262
|
+
'domain_sid' => domain_sid,
|
263
|
+
'sid' => sid || @properties['sid'],
|
264
|
+
}
|
265
|
+
end
|
266
|
+
|
267
|
+
##
|
268
|
+
# Generate an instance context for the instance, the context is capable of
|
269
|
+
# performing various actions. All instance actions are proxied to the context
|
270
|
+
# @return [AuthRegistrationsCredentialListMappingContext] AuthRegistrationsCredentialListMappingContext for this AuthRegistrationsCredentialListMappingInstance
|
271
|
+
def context
|
272
|
+
unless @instance_context
|
273
|
+
@instance_context = AuthRegistrationsCredentialListMappingContext.new(
|
274
|
+
@version,
|
275
|
+
@params['account_sid'],
|
276
|
+
@params['domain_sid'],
|
277
|
+
@params['sid'],
|
278
|
+
)
|
279
|
+
end
|
280
|
+
@instance_context
|
281
|
+
end
|
282
|
+
|
283
|
+
##
|
284
|
+
# @return [String] The unique sid that identifies this account
|
285
|
+
def account_sid
|
286
|
+
@properties['account_sid']
|
287
|
+
end
|
288
|
+
|
289
|
+
##
|
290
|
+
# @return [Time] The date this resource was created
|
291
|
+
def date_created
|
292
|
+
@properties['date_created']
|
293
|
+
end
|
294
|
+
|
295
|
+
##
|
296
|
+
# @return [Time] The date this resource was last updated
|
297
|
+
def date_updated
|
298
|
+
@properties['date_updated']
|
299
|
+
end
|
300
|
+
|
301
|
+
##
|
302
|
+
# @return [String] A human readable description of this resource
|
303
|
+
def friendly_name
|
304
|
+
@properties['friendly_name']
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# @return [String] A string that uniquely identifies this resource
|
309
|
+
def sid
|
310
|
+
@properties['sid']
|
311
|
+
end
|
312
|
+
|
313
|
+
##
|
314
|
+
# Fetch a AuthRegistrationsCredentialListMappingInstance
|
315
|
+
# @return [AuthRegistrationsCredentialListMappingInstance] Fetched AuthRegistrationsCredentialListMappingInstance
|
316
|
+
def fetch
|
317
|
+
context.fetch
|
318
|
+
end
|
319
|
+
|
320
|
+
##
|
321
|
+
# Deletes the AuthRegistrationsCredentialListMappingInstance
|
322
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
323
|
+
def delete
|
324
|
+
context.delete
|
325
|
+
end
|
326
|
+
|
327
|
+
##
|
328
|
+
# Provide a user friendly representation
|
329
|
+
def to_s
|
330
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
331
|
+
"<Twilio.Api.V2010.AuthRegistrationsCredentialListMappingInstance #{values}>"
|
332
|
+
end
|
333
|
+
|
334
|
+
##
|
335
|
+
# Provide a detailed, user friendly representation
|
336
|
+
def inspect
|
337
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
338
|
+
"<Twilio.Api.V2010.AuthRegistrationsCredentialListMappingInstance #{values}>"
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|
347
|
+
end
|
348
|
+
end
|
349
|
+
end
|
@@ -134,6 +134,14 @@ module Twilio
|
|
134
134
|
self.hosted_numbers.hosted_number_orders(sid)
|
135
135
|
end
|
136
136
|
|
137
|
+
##
|
138
|
+
# @param [String] sid A 34 character string that uniquely identifies this Add-on.
|
139
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
140
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
141
|
+
def available_add_ons(sid=:unset)
|
142
|
+
self.marketplace.available_add_ons(sid)
|
143
|
+
end
|
144
|
+
|
137
145
|
##
|
138
146
|
# @param [String] sid 34 character string that uniquely identifies the Add-on.
|
139
147
|
# This Sid can also be found in the Console on that specific Add-ons page as the
|
@@ -144,14 +152,6 @@ module Twilio
|
|
144
152
|
self.marketplace.installed_add_ons(sid)
|
145
153
|
end
|
146
154
|
|
147
|
-
##
|
148
|
-
# @param [String] sid A 34 character string that uniquely identifies this Add-on.
|
149
|
-
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
150
|
-
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
151
|
-
def available_add_ons(sid=:unset)
|
152
|
-
self.marketplace.available_add_ons(sid)
|
153
|
-
end
|
154
|
-
|
155
155
|
##
|
156
156
|
# @param [String] sid The sid
|
157
157
|
# @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
|
-
@installed_add_ons = nil
|
19
18
|
@available_add_ons = nil
|
19
|
+
@installed_add_ons = nil
|
20
20
|
end
|
21
21
|
|
22
22
|
##
|
23
|
-
# @param [String] sid The
|
23
|
+
# @param [String] sid The Available Add-on Sid that uniquely identifies this
|
24
24
|
# resource
|
25
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
26
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
27
|
-
def
|
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)
|
28
28
|
if sid.nil?
|
29
29
|
raise ArgumentError, 'sid cannot be nil'
|
30
30
|
elsif sid == :unset
|
31
|
-
@
|
31
|
+
@available_add_ons ||= AvailableAddOnList.new self
|
32
32
|
else
|
33
|
-
|
33
|
+
AvailableAddOnContext.new(self, sid)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
##
|
38
|
-
# @param [String] sid The
|
38
|
+
# @param [String] sid The Installed Add-on Sid that uniquely identifies this
|
39
39
|
# resource
|
40
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
41
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
42
|
-
def
|
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)
|
43
43
|
if sid.nil?
|
44
44
|
raise ArgumentError, 'sid cannot be nil'
|
45
45
|
elsif sid == :unset
|
46
|
-
@
|
46
|
+
@installed_add_ons ||= InstalledAddOnList.new self
|
47
47
|
else
|
48
|
-
|
48
|
+
InstalledAddOnContext.new(self, sid)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -116,7 +116,6 @@ module Twilio
|
|
116
116
|
# logged for 30 days further training. If false, no queries will be stored, if
|
117
117
|
# true, queries will be stored for 30 days and deleted thereafter. Defaults to
|
118
118
|
# true if no value is provided.
|
119
|
-
# @param [String] ttl The ttl
|
120
119
|
# @param [String] unique_name A user-provided string that uniquely identifies this
|
121
120
|
# resource as an alternative to the sid. Unique up to 64 characters long.
|
122
121
|
# @param [String] response_url The webhook URL called to fetch the response to an
|
@@ -124,11 +123,10 @@ module Twilio
|
|
124
123
|
# @param [String] callback_url The callback_url
|
125
124
|
# @param [String] callback_events The callback_events
|
126
125
|
# @return [AssistantInstance] Newly created AssistantInstance
|
127
|
-
def create(friendly_name: :unset, log_queries: :unset,
|
126
|
+
def create(friendly_name: :unset, log_queries: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
|
128
127
|
data = Twilio::Values.of({
|
129
128
|
'FriendlyName' => friendly_name,
|
130
129
|
'LogQueries' => log_queries,
|
131
|
-
'Ttl' => ttl,
|
132
130
|
'UniqueName' => unique_name,
|
133
131
|
'ResponseUrl' => response_url,
|
134
132
|
'CallbackUrl' => callback_url,
|
@@ -227,7 +225,6 @@ module Twilio
|
|
227
225
|
# logged for 30 days further training. If false, no queries will be stored, if
|
228
226
|
# true, queries will be stored for 30 days and deleted thereafter. Defaults to
|
229
227
|
# true if no value is provided.
|
230
|
-
# @param [String] ttl The ttl
|
231
228
|
# @param [String] unique_name A user-provided string that uniquely identifies this
|
232
229
|
# resource as an alternative to the sid. Unique up to 64 characters long.
|
233
230
|
# @param [String] response_url The webhook URL called to fetch the response to an
|
@@ -235,11 +232,10 @@ module Twilio
|
|
235
232
|
# @param [String] callback_url The callback_url
|
236
233
|
# @param [String] callback_events The callback_events
|
237
234
|
# @return [AssistantInstance] Updated AssistantInstance
|
238
|
-
def update(friendly_name: :unset, log_queries: :unset,
|
235
|
+
def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
|
239
236
|
data = Twilio::Values.of({
|
240
237
|
'FriendlyName' => friendly_name,
|
241
238
|
'LogQueries' => log_queries,
|
242
|
-
'Ttl' => ttl,
|
243
239
|
'UniqueName' => unique_name,
|
244
240
|
'ResponseUrl' => response_url,
|
245
241
|
'CallbackUrl' => callback_url,
|
@@ -364,7 +360,6 @@ module Twilio
|
|
364
360
|
'links' => payload['links'],
|
365
361
|
'log_queries' => payload['log_queries'],
|
366
362
|
'sid' => payload['sid'],
|
367
|
-
'ttl' => payload['ttl'].to_i,
|
368
363
|
'unique_name' => payload['unique_name'],
|
369
364
|
'url' => payload['url'],
|
370
365
|
'response_url' => payload['response_url'],
|
@@ -436,12 +431,6 @@ module Twilio
|
|
436
431
|
@properties['sid']
|
437
432
|
end
|
438
433
|
|
439
|
-
##
|
440
|
-
# @return [String] The ttl
|
441
|
-
def ttl
|
442
|
-
@properties['ttl']
|
443
|
-
end
|
444
|
-
|
445
434
|
##
|
446
435
|
# @return [String] A user-provided string that uniquely identifies this resource as an alternative to the sid. You can use the unique name in the URL path. Unique up to 64 characters long.
|
447
436
|
def unique_name
|
@@ -487,7 +476,6 @@ module Twilio
|
|
487
476
|
# logged for 30 days further training. If false, no queries will be stored, if
|
488
477
|
# true, queries will be stored for 30 days and deleted thereafter. Defaults to
|
489
478
|
# true if no value is provided.
|
490
|
-
# @param [String] ttl The ttl
|
491
479
|
# @param [String] unique_name A user-provided string that uniquely identifies this
|
492
480
|
# resource as an alternative to the sid. Unique up to 64 characters long.
|
493
481
|
# @param [String] response_url The webhook URL called to fetch the response to an
|
@@ -495,11 +483,10 @@ module Twilio
|
|
495
483
|
# @param [String] callback_url The callback_url
|
496
484
|
# @param [String] callback_events The callback_events
|
497
485
|
# @return [AssistantInstance] Updated AssistantInstance
|
498
|
-
def update(friendly_name: :unset, log_queries: :unset,
|
486
|
+
def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
|
499
487
|
context.update(
|
500
488
|
friendly_name: friendly_name,
|
501
489
|
log_queries: log_queries,
|
502
|
-
ttl: ttl,
|
503
490
|
unique_name: unique_name,
|
504
491
|
response_url: response_url,
|
505
492
|
callback_url: callback_url,
|