twilio-ruby 6.9.0 → 6.9.1
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 +12 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/http/http_client.rb +3 -2
- data/lib/twilio-ruby/rest/client.rb +0 -5
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +27 -27
- data/lib/twilio-ruby/rest/preview/sync/service.rb +27 -27
- data/lib/twilio-ruby/rest/preview.rb +1 -11
- data/lib/twilio-ruby/rest/preview_base.rb +0 -5
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +2 -35
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +0 -241
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +0 -217
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -389
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +0 -435
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -409
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -473
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +0 -241
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -373
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -436
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +0 -253
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +0 -226
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +0 -525
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -433
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -683
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +0 -207
- data/lib/twilio-ruby/rest/autopilot/v1.rb +0 -55
- data/lib/twilio-ruby/rest/autopilot.rb +0 -22
- data/lib/twilio-ruby/rest/autopilot_base.rb +0 -38
- data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +0 -241
- data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +0 -241
- data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +0 -217
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -389
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -435
- data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -409
- data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -463
- data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +0 -241
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -373
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -436
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +0 -253
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +0 -226
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +0 -525
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -663
- data/lib/twilio-ruby/rest/preview/understand.rb +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 189f2883e1338dfb6eda7276713feefd805de2c9
|
4
|
+
data.tar.gz: d87e341871954c5268a512c6c97e88d5cabd3c86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84e5ba92e3a32069f993d5fcdb9f6cb5ba1b9417c1e759be606d7e7235abb40c07bdb756707e603cd75c6e0c4181d2300b23447753bbf9b5d436f99138fc3387
|
7
|
+
data.tar.gz: a517ad5c5082c86918b845a6d6ab7de7d3de0d4cb5a302bd8d700e15291a33fa3fb32464677a60624d8a8e1ac159cb29f9baabc2b69886f80263f2e5b731d8f1
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2024-01-14] Version 6.9.1
|
5
|
+
--------------------------
|
6
|
+
**Library - Chore**
|
7
|
+
- [PR #691](https://github.com/twilio/twilio-ruby/pull/691): Removing tests related to Autopilot and Understand Endpoints - product EoL. Thanks to [@miriamela](https://github.com/miriamela)!
|
8
|
+
|
9
|
+
**Library - Fix**
|
10
|
+
- [PR #693](https://github.com/twilio/twilio-ruby/pull/693): fixed query param not going for delete. Thanks to [@manisha1997](https://github.com/manisha1997)!
|
11
|
+
|
12
|
+
**Push**
|
13
|
+
- Migrated to new Push API V4 with Resilient Notification Delivery.
|
14
|
+
|
15
|
+
|
4
16
|
[2023-12-14] Version 6.9.0
|
5
17
|
--------------------------
|
6
18
|
**Api**
|
data/README.md
CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
|
|
39
39
|
To install using [Bundler][bundler] grab the latest stable version:
|
40
40
|
|
41
41
|
```ruby
|
42
|
-
gem 'twilio-ruby', '~> 6.9.
|
42
|
+
gem 'twilio-ruby', '~> 6.9.1'
|
43
43
|
```
|
44
44
|
|
45
45
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
46
46
|
|
47
47
|
```bash
|
48
|
-
gem install twilio-ruby -v 6.9.
|
48
|
+
gem install twilio-ruby -v 6.9.1
|
49
49
|
```
|
50
50
|
|
51
51
|
To build and install the development branch yourself from the latest source:
|
@@ -6,7 +6,7 @@ module Twilio
|
|
6
6
|
module HTTP
|
7
7
|
class Client
|
8
8
|
attr_accessor :adapter
|
9
|
-
attr_reader :timeout, :last_response, :last_request
|
9
|
+
attr_reader :timeout, :last_response, :last_request, :connection
|
10
10
|
|
11
11
|
def initialize(proxy_prot = nil, proxy_addr = nil, proxy_port = nil, proxy_user = nil, proxy_pass = nil,
|
12
12
|
ssl_ca_file = nil, timeout: nil)
|
@@ -39,6 +39,7 @@ module Twilio
|
|
39
39
|
f.proxy = "#{@proxy_prot}://#{@proxy_auth}#{@proxy_path}" if @proxy_prot && @proxy_path
|
40
40
|
f.options.open_timeout = request.timeout || @timeout
|
41
41
|
f.options.timeout = request.timeout || @timeout
|
42
|
+
f.params = request.params.nil? ? {} : request.params
|
42
43
|
|
43
44
|
@configure_connection_blocks.each { |block| block.call(f) }
|
44
45
|
f.adapter @adapter
|
@@ -65,7 +66,7 @@ module Twilio
|
|
65
66
|
def send(request)
|
66
67
|
@connection.send(request.method.downcase.to_sym,
|
67
68
|
request.url,
|
68
|
-
request.
|
69
|
+
request.data)
|
69
70
|
rescue Faraday::Error => e
|
70
71
|
raise Twilio::REST::TwilioError, e
|
71
72
|
end
|
@@ -27,11 +27,6 @@ module Twilio
|
|
27
27
|
@api ||= Api.new self
|
28
28
|
end
|
29
29
|
##
|
30
|
-
# Access the Autopilot Twilio Domain
|
31
|
-
def autopilot
|
32
|
-
@autopilot ||= Autopilot.new self
|
33
|
-
end
|
34
|
-
##
|
35
30
|
# Access the Bulkexports Twilio Domain
|
36
31
|
def bulkexports
|
37
32
|
@bulkexports ||= Bulkexports.new self
|
@@ -158,10 +158,10 @@ module Twilio
|
|
158
158
|
@uri = "/Fleets/#{@solution[:sid]}"
|
159
159
|
|
160
160
|
# Dependents
|
161
|
+
@certificates = nil
|
161
162
|
@devices = nil
|
162
163
|
@keys = nil
|
163
164
|
@deployments = nil
|
164
|
-
@certificates = nil
|
165
165
|
end
|
166
166
|
##
|
167
167
|
# Delete the FleetInstance
|
@@ -207,6 +207,25 @@ module Twilio
|
|
207
207
|
)
|
208
208
|
end
|
209
209
|
|
210
|
+
##
|
211
|
+
# Access the certificates
|
212
|
+
# @return [CertificateList]
|
213
|
+
# @return [CertificateContext] if sid was passed.
|
214
|
+
def certificates(sid=:unset)
|
215
|
+
|
216
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
217
|
+
|
218
|
+
if sid != :unset
|
219
|
+
return CertificateContext.new(@version, @solution[:sid],sid )
|
220
|
+
end
|
221
|
+
|
222
|
+
unless @certificates
|
223
|
+
@certificates = CertificateList.new(
|
224
|
+
@version, fleet_sid: @solution[:sid], )
|
225
|
+
end
|
226
|
+
|
227
|
+
@certificates
|
228
|
+
end
|
210
229
|
##
|
211
230
|
# Access the devices
|
212
231
|
# @return [DeviceList]
|
@@ -264,25 +283,6 @@ module Twilio
|
|
264
283
|
|
265
284
|
@deployments
|
266
285
|
end
|
267
|
-
##
|
268
|
-
# Access the certificates
|
269
|
-
# @return [CertificateList]
|
270
|
-
# @return [CertificateContext] if sid was passed.
|
271
|
-
def certificates(sid=:unset)
|
272
|
-
|
273
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
274
|
-
|
275
|
-
if sid != :unset
|
276
|
-
return CertificateContext.new(@version, @solution[:sid],sid )
|
277
|
-
end
|
278
|
-
|
279
|
-
unless @certificates
|
280
|
-
@certificates = CertificateList.new(
|
281
|
-
@version, fleet_sid: @solution[:sid], )
|
282
|
-
end
|
283
|
-
|
284
|
-
@certificates
|
285
|
-
end
|
286
286
|
|
287
287
|
##
|
288
288
|
# Provide a user friendly representation
|
@@ -455,6 +455,13 @@ module Twilio
|
|
455
455
|
)
|
456
456
|
end
|
457
457
|
|
458
|
+
##
|
459
|
+
# Access the certificates
|
460
|
+
# @return [certificates] certificates
|
461
|
+
def certificates
|
462
|
+
context.certificates
|
463
|
+
end
|
464
|
+
|
458
465
|
##
|
459
466
|
# Access the devices
|
460
467
|
# @return [devices] devices
|
@@ -476,13 +483,6 @@ module Twilio
|
|
476
483
|
context.deployments
|
477
484
|
end
|
478
485
|
|
479
|
-
##
|
480
|
-
# Access the certificates
|
481
|
-
# @return [certificates] certificates
|
482
|
-
def certificates
|
483
|
-
context.certificates
|
484
|
-
end
|
485
|
-
|
486
486
|
##
|
487
487
|
# Provide a user friendly representation
|
488
488
|
def to_s
|
@@ -167,9 +167,9 @@ module Twilio
|
|
167
167
|
@uri = "/Services/#{@solution[:sid]}"
|
168
168
|
|
169
169
|
# Dependents
|
170
|
-
@sync_lists = nil
|
171
170
|
@sync_maps = nil
|
172
171
|
@documents = nil
|
172
|
+
@sync_lists = nil
|
173
173
|
end
|
174
174
|
##
|
175
175
|
# Delete the ServiceInstance
|
@@ -221,25 +221,6 @@ module Twilio
|
|
221
221
|
)
|
222
222
|
end
|
223
223
|
|
224
|
-
##
|
225
|
-
# Access the sync_lists
|
226
|
-
# @return [SyncListList]
|
227
|
-
# @return [SyncListContext] if sid was passed.
|
228
|
-
def sync_lists(sid=:unset)
|
229
|
-
|
230
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
231
|
-
|
232
|
-
if sid != :unset
|
233
|
-
return SyncListContext.new(@version, @solution[:sid],sid )
|
234
|
-
end
|
235
|
-
|
236
|
-
unless @sync_lists
|
237
|
-
@sync_lists = SyncListList.new(
|
238
|
-
@version, service_sid: @solution[:sid], )
|
239
|
-
end
|
240
|
-
|
241
|
-
@sync_lists
|
242
|
-
end
|
243
224
|
##
|
244
225
|
# Access the sync_maps
|
245
226
|
# @return [SyncMapList]
|
@@ -278,6 +259,25 @@ module Twilio
|
|
278
259
|
|
279
260
|
@documents
|
280
261
|
end
|
262
|
+
##
|
263
|
+
# Access the sync_lists
|
264
|
+
# @return [SyncListList]
|
265
|
+
# @return [SyncListContext] if sid was passed.
|
266
|
+
def sync_lists(sid=:unset)
|
267
|
+
|
268
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
269
|
+
|
270
|
+
if sid != :unset
|
271
|
+
return SyncListContext.new(@version, @solution[:sid],sid )
|
272
|
+
end
|
273
|
+
|
274
|
+
unless @sync_lists
|
275
|
+
@sync_lists = SyncListList.new(
|
276
|
+
@version, service_sid: @solution[:sid], )
|
277
|
+
end
|
278
|
+
|
279
|
+
@sync_lists
|
280
|
+
end
|
281
281
|
|
282
282
|
##
|
283
283
|
# Provide a user friendly representation
|
@@ -463,13 +463,6 @@ module Twilio
|
|
463
463
|
)
|
464
464
|
end
|
465
465
|
|
466
|
-
##
|
467
|
-
# Access the sync_lists
|
468
|
-
# @return [sync_lists] sync_lists
|
469
|
-
def sync_lists
|
470
|
-
context.sync_lists
|
471
|
-
end
|
472
|
-
|
473
466
|
##
|
474
467
|
# Access the sync_maps
|
475
468
|
# @return [sync_maps] sync_maps
|
@@ -484,6 +477,13 @@ module Twilio
|
|
484
477
|
context.documents
|
485
478
|
end
|
486
479
|
|
480
|
+
##
|
481
|
+
# Access the sync_lists
|
482
|
+
# @return [sync_lists] sync_lists
|
483
|
+
def sync_lists
|
484
|
+
context.sync_lists
|
485
|
+
end
|
486
|
+
|
487
487
|
##
|
488
488
|
# Provide a user friendly representation
|
489
489
|
def to_s
|
@@ -61,16 +61,6 @@ module Twilio
|
|
61
61
|
self.sync.services(sid)
|
62
62
|
end
|
63
63
|
|
64
|
-
##
|
65
|
-
# @param [String] sid A 34 character string that uniquely identifies this
|
66
|
-
# resource.
|
67
|
-
# @return [Twilio::REST::Preview::Understand::AssistantInstance] if sid was passed.
|
68
|
-
# @return [Twilio::REST::Preview::Understand::AssistantList]
|
69
|
-
def assistants(sid=:unset)
|
70
|
-
warn "assistants is deprecated. Use understand.assistants instead."
|
71
|
-
self.understand.assistants(sid)
|
72
|
-
end
|
73
|
-
|
74
64
|
##
|
75
65
|
# @param [String] sid The sid
|
76
66
|
# @return [Twilio::REST::Preview::Wireless::CommandInstance] if sid was passed.
|
@@ -99,4 +89,4 @@ module Twilio
|
|
99
89
|
end
|
100
90
|
end
|
101
91
|
end
|
102
|
-
end
|
92
|
+
end
|
@@ -25,7 +25,6 @@ module Twilio
|
|
25
25
|
@hosted_numbers = nil
|
26
26
|
@sync = nil
|
27
27
|
@marketplace = nil
|
28
|
-
@understand = nil
|
29
28
|
@wireless = nil
|
30
29
|
end
|
31
30
|
|
@@ -45,10 +44,6 @@ module Twilio
|
|
45
44
|
@marketplace ||= Preview::Marketplace.new self
|
46
45
|
end
|
47
46
|
|
48
|
-
def understand
|
49
|
-
@understand ||= Preview::Understand.new self
|
50
|
-
end
|
51
|
-
|
52
47
|
def wireless
|
53
48
|
@wireless ||= Preview::Wireless.new self
|
54
49
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.9.
|
4
|
+
version: 6.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -334,24 +334,6 @@ files:
|
|
334
334
|
- lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb
|
335
335
|
- lib/twilio-ruby/rest/api/v2010/account/validation_request.rb
|
336
336
|
- lib/twilio-ruby/rest/api_base.rb
|
337
|
-
- lib/twilio-ruby/rest/autopilot.rb
|
338
|
-
- lib/twilio-ruby/rest/autopilot/v1.rb
|
339
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant.rb
|
340
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb
|
341
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb
|
342
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb
|
343
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb
|
344
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb
|
345
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb
|
346
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb
|
347
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb
|
348
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb
|
349
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb
|
350
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb
|
351
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb
|
352
|
-
- lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb
|
353
|
-
- lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb
|
354
|
-
- lib/twilio-ruby/rest/autopilot_base.rb
|
355
337
|
- lib/twilio-ruby/rest/bulkexports.rb
|
356
338
|
- lib/twilio-ruby/rest/bulkexports/v1.rb
|
357
339
|
- lib/twilio-ruby/rest/bulkexports/v1/export.rb
|
@@ -618,21 +600,6 @@ files:
|
|
618
600
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map.rb
|
619
601
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb
|
620
602
|
- lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb
|
621
|
-
- lib/twilio-ruby/rest/preview/understand.rb
|
622
|
-
- lib/twilio-ruby/rest/preview/understand/assistant.rb
|
623
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb
|
624
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb
|
625
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb
|
626
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb
|
627
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb
|
628
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb
|
629
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/query.rb
|
630
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb
|
631
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/task.rb
|
632
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb
|
633
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb
|
634
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb
|
635
|
-
- lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb
|
636
603
|
- lib/twilio-ruby/rest/preview/wireless.rb
|
637
604
|
- lib/twilio-ruby/rest/preview/wireless/command.rb
|
638
605
|
- lib/twilio-ruby/rest/preview/wireless/rate_plan.rb
|
@@ -1,241 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
-
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
-
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
-
#
|
7
|
-
# Twilio - Autopilot
|
8
|
-
# This is the public Twilio REST API.
|
9
|
-
#
|
10
|
-
# NOTE: This class is auto generated by OpenAPI Generator.
|
11
|
-
# https://openapi-generator.tech
|
12
|
-
# Do not edit the class manually.
|
13
|
-
#
|
14
|
-
|
15
|
-
|
16
|
-
module Twilio
|
17
|
-
module REST
|
18
|
-
class Autopilot < AutopilotBase
|
19
|
-
class V1 < Version
|
20
|
-
class AssistantContext < InstanceContext
|
21
|
-
|
22
|
-
class DefaultsList < ListResource
|
23
|
-
##
|
24
|
-
# Initialize the DefaultsList
|
25
|
-
# @param [Version] version Version that contains the resource
|
26
|
-
# @return [DefaultsList] DefaultsList
|
27
|
-
def initialize(version, assistant_sid: nil)
|
28
|
-
super(version)
|
29
|
-
# Path Solution
|
30
|
-
@solution = { assistant_sid: assistant_sid }
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
# Provide a user friendly representation
|
38
|
-
def to_s
|
39
|
-
'#<Twilio.Autopilot.V1.DefaultsList>'
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
|
44
|
-
##
|
45
|
-
#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.
|
46
|
-
class DefaultsContext < InstanceContext
|
47
|
-
##
|
48
|
-
# Initialize the DefaultsContext
|
49
|
-
# @param [Version] version Version that contains the resource
|
50
|
-
# @param [String] assistant_sid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
|
51
|
-
# @return [DefaultsContext] DefaultsContext
|
52
|
-
def initialize(version, assistant_sid)
|
53
|
-
super(version)
|
54
|
-
|
55
|
-
# Path Solution
|
56
|
-
@solution = { assistant_sid: assistant_sid, }
|
57
|
-
@uri = "/Assistants/#{@solution[:assistant_sid]}/Defaults"
|
58
|
-
|
59
|
-
|
60
|
-
end
|
61
|
-
##
|
62
|
-
# Fetch the DefaultsInstance
|
63
|
-
# @return [DefaultsInstance] Fetched DefaultsInstance
|
64
|
-
def fetch
|
65
|
-
|
66
|
-
payload = @version.fetch('GET', @uri)
|
67
|
-
DefaultsInstance.new(
|
68
|
-
@version,
|
69
|
-
payload,
|
70
|
-
assistant_sid: @solution[:assistant_sid],
|
71
|
-
)
|
72
|
-
end
|
73
|
-
|
74
|
-
##
|
75
|
-
# Update the DefaultsInstance
|
76
|
-
# @param [Object] defaults A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
|
77
|
-
# @return [DefaultsInstance] Updated DefaultsInstance
|
78
|
-
def update(
|
79
|
-
defaults: :unset
|
80
|
-
)
|
81
|
-
|
82
|
-
data = Twilio::Values.of({
|
83
|
-
'Defaults' => Twilio.serialize_object(defaults),
|
84
|
-
})
|
85
|
-
|
86
|
-
payload = @version.update('POST', @uri, data: data)
|
87
|
-
DefaultsInstance.new(
|
88
|
-
@version,
|
89
|
-
payload,
|
90
|
-
assistant_sid: @solution[:assistant_sid],
|
91
|
-
)
|
92
|
-
end
|
93
|
-
|
94
|
-
|
95
|
-
##
|
96
|
-
# Provide a user friendly representation
|
97
|
-
def to_s
|
98
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
99
|
-
"#<Twilio.Autopilot.V1.DefaultsContext #{context}>"
|
100
|
-
end
|
101
|
-
|
102
|
-
##
|
103
|
-
# Provide a detailed, user friendly representation
|
104
|
-
def inspect
|
105
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
106
|
-
"#<Twilio.Autopilot.V1.DefaultsContext #{context}>"
|
107
|
-
end
|
108
|
-
end
|
109
|
-
|
110
|
-
class DefaultsPage < Page
|
111
|
-
##
|
112
|
-
# Initialize the DefaultsPage
|
113
|
-
# @param [Version] version Version that contains the resource
|
114
|
-
# @param [Response] response Response from the API
|
115
|
-
# @param [Hash] solution Path solution for the resource
|
116
|
-
# @return [DefaultsPage] DefaultsPage
|
117
|
-
def initialize(version, response, solution)
|
118
|
-
super(version, response)
|
119
|
-
|
120
|
-
# Path Solution
|
121
|
-
@solution = solution
|
122
|
-
end
|
123
|
-
|
124
|
-
##
|
125
|
-
# Build an instance of DefaultsInstance
|
126
|
-
# @param [Hash] payload Payload response from the API
|
127
|
-
# @return [DefaultsInstance] DefaultsInstance
|
128
|
-
def get_instance(payload)
|
129
|
-
DefaultsInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid])
|
130
|
-
end
|
131
|
-
|
132
|
-
##
|
133
|
-
# Provide a user friendly representation
|
134
|
-
def to_s
|
135
|
-
'<Twilio.Autopilot.V1.DefaultsPage>'
|
136
|
-
end
|
137
|
-
end
|
138
|
-
class DefaultsInstance < InstanceResource
|
139
|
-
##
|
140
|
-
# Initialize the DefaultsInstance
|
141
|
-
# @param [Version] version Version that contains the resource
|
142
|
-
# @param [Hash] payload payload that contains response from Twilio
|
143
|
-
# @param [String] account_sid The SID of the
|
144
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Defaults
|
145
|
-
# resource.
|
146
|
-
# @param [String] sid The SID of the Call resource to fetch.
|
147
|
-
# @return [DefaultsInstance] DefaultsInstance
|
148
|
-
def initialize(version, payload , assistant_sid: nil)
|
149
|
-
super(version)
|
150
|
-
|
151
|
-
# Marshaled Properties
|
152
|
-
@properties = {
|
153
|
-
'account_sid' => payload['account_sid'],
|
154
|
-
'assistant_sid' => payload['assistant_sid'],
|
155
|
-
'url' => payload['url'],
|
156
|
-
'data' => payload['data'],
|
157
|
-
}
|
158
|
-
|
159
|
-
# Context
|
160
|
-
@instance_context = nil
|
161
|
-
@params = { 'assistant_sid' => assistant_sid || @properties['assistant_sid'] , }
|
162
|
-
end
|
163
|
-
|
164
|
-
##
|
165
|
-
# Generate an instance context for the instance, the context is capable of
|
166
|
-
# performing various actions. All instance actions are proxied to the context
|
167
|
-
# @return [DefaultsContext] CallContext for this CallInstance
|
168
|
-
def context
|
169
|
-
unless @instance_context
|
170
|
-
@instance_context = DefaultsContext.new(@version , @params['assistant_sid'])
|
171
|
-
end
|
172
|
-
@instance_context
|
173
|
-
end
|
174
|
-
|
175
|
-
##
|
176
|
-
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Defaults resource.
|
177
|
-
def account_sid
|
178
|
-
@properties['account_sid']
|
179
|
-
end
|
180
|
-
|
181
|
-
##
|
182
|
-
# @return [String] The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
|
183
|
-
def assistant_sid
|
184
|
-
@properties['assistant_sid']
|
185
|
-
end
|
186
|
-
|
187
|
-
##
|
188
|
-
# @return [String] The absolute URL of the Defaults resource.
|
189
|
-
def url
|
190
|
-
@properties['url']
|
191
|
-
end
|
192
|
-
|
193
|
-
##
|
194
|
-
# @return [Hash] The JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
|
195
|
-
def data
|
196
|
-
@properties['data']
|
197
|
-
end
|
198
|
-
|
199
|
-
##
|
200
|
-
# Fetch the DefaultsInstance
|
201
|
-
# @return [DefaultsInstance] Fetched DefaultsInstance
|
202
|
-
def fetch
|
203
|
-
|
204
|
-
context.fetch
|
205
|
-
end
|
206
|
-
|
207
|
-
##
|
208
|
-
# Update the DefaultsInstance
|
209
|
-
# @param [Object] defaults A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
|
210
|
-
# @return [DefaultsInstance] Updated DefaultsInstance
|
211
|
-
def update(
|
212
|
-
defaults: :unset
|
213
|
-
)
|
214
|
-
|
215
|
-
context.update(
|
216
|
-
defaults: defaults,
|
217
|
-
)
|
218
|
-
end
|
219
|
-
|
220
|
-
##
|
221
|
-
# Provide a user friendly representation
|
222
|
-
def to_s
|
223
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
224
|
-
"<Twilio.Autopilot.V1.DefaultsInstance #{values}>"
|
225
|
-
end
|
226
|
-
|
227
|
-
##
|
228
|
-
# Provide a detailed, user friendly representation
|
229
|
-
def inspect
|
230
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
231
|
-
"<Twilio.Autopilot.V1.DefaultsInstance #{values}>"
|
232
|
-
end
|
233
|
-
end
|
234
|
-
|
235
|
-
end
|
236
|
-
end
|
237
|
-
end
|
238
|
-
end
|
239
|
-
end
|
240
|
-
|
241
|
-
|