twilio-ruby 5.12.1 → 5.12.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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +12 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +2 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +2 -2
  6. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +2 -2
  7. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +2 -2
  8. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +2 -2
  9. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +2 -2
  10. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +2 -2
  11. data/lib/twilio-ruby/rest/chat/v2/service.rb +1 -1
  12. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +1 -1
  13. data/lib/twilio-ruby/rest/preview.rb +8 -8
  14. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  15. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +47 -19
  16. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +215 -0
  17. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +215 -0
  18. data/lib/twilio-ruby/rest/preview/understand/assistant/intent.rb +33 -6
  19. data/lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_actions.rb +246 -0
  20. data/lib/twilio-ruby/rest/pricing.rb +9 -2
  21. data/lib/twilio-ruby/rest/pricing/v2.rb +35 -0
  22. data/lib/twilio-ruby/rest/pricing/v2/voice.rb +126 -0
  23. data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +281 -0
  24. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -3
  25. data/lib/twilio-ruby/rest/video.rb +9 -9
  26. data/lib/twilio-ruby/rest/video/v1.rb +16 -16
  27. data/lib/twilio-ruby/version.rb +1 -1
  28. data/spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb +81 -0
  29. data/spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb +81 -0
  30. data/spec/integration/preview/understand/assistant/intent/intent_actions_spec.rb +87 -0
  31. data/spec/integration/preview/understand/assistant/intent_spec.rb +4 -0
  32. data/spec/integration/preview/understand/assistant_spec.rb +12 -8
  33. data/spec/integration/pricing/v2/voice/country_spec.rb +181 -0
  34. data/spec/integration/pricing/v2/voice_spec.rb +12 -0
  35. metadata +19 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2dd637e607cf8d303bb213be5ea8a1f1ce75441f
4
- data.tar.gz: 00405a6defe283ec52708f85925f1f319b339ca0
3
+ metadata.gz: d71f5a1b5c6bdff3b242a74b23825e02cea1dfd3
4
+ data.tar.gz: 2bf4dfc83fc497142bcfe19a17708c765c1740e3
5
5
  SHA512:
6
- metadata.gz: 9e0d6dc89387fd633c430dfbbed872cd83ea06f802509247f3ab734558ee3195d7bfc42c48fdbb8236cd6fe2a9bb620f0dbf4780243751b47ebc4046f4a701fc
7
- data.tar.gz: 6bf0db05b1eba98295fc75ff79de0a6d26c64c9c1eef51f3cb3449542e30f3e5e61bfbeef2940eb4472c10f8b6adfb3ec9a366f86a9cd8b419f1f24838f46c03
6
+ metadata.gz: 0e8c970ad67d49f742949451772a45e84e954bb0f92d4dcc45134ceb95aa1c24253430202f9ff3675407622c221a94c871bd34a57c136042dca1c04588c04458
7
+ data.tar.gz: 14c89a7e88500a2a214383e2b9e119ef191db4cd4a0dd9893931795ca5301cf57b24d7ad972b772f56d29f87fc98b86c11188058cb116a0db124b9961029b724
data/CHANGES.md CHANGED
@@ -1,6 +1,18 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2018-08-17] Version 5.12.2
5
+ ----------------------------
6
+ **Api**
7
+ - Add Proxy Active Sessions category to usage records
8
+
9
+ **Preview**
10
+ - Add `Actions` endpoints and remove `ResponseUrl` from assistants on the Understand api
11
+
12
+ **Pricing**
13
+ - add voice_country resource (v2)
14
+
15
+
4
16
  [2018-08-09] Version 5.12.1
5
17
  ----------------------------
6
18
  **Library**
data/README.md CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
27
27
  To install using [Bundler][bundler] grab the latest stable version:
28
28
 
29
29
  ```ruby
30
- gem 'twilio-ruby', '~> 5.12.1'
30
+ gem 'twilio-ruby', '~> 5.12.2'
31
31
  ```
32
32
 
33
33
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
34
34
 
35
35
  ```bash
36
- gem install twilio-ruby -v 5.12.1
36
+ gem install twilio-ruby -v 5.12.2
37
37
  ```
38
38
 
39
39
  To build and install the development branch yourself from the latest source:
@@ -391,13 +391,13 @@ module Twilio
391
391
  end
392
392
 
393
393
  ##
394
- # @return [String] The unique id of the account that sent the message
394
+ # @return [String] The unique id of the account that sent the call
395
395
  def account_sid
396
396
  @properties['account_sid']
397
397
  end
398
398
 
399
399
  ##
400
- # @return [String] The Twilio API version used to process the message
400
+ # @return [String] The Twilio API version used to process the call
401
401
  def api_version
402
402
  @properties['api_version']
403
403
  end
@@ -18,7 +18,7 @@ module Twilio
18
18
  # Initialize the AuthTypesList
19
19
  # @param [Version] version Version that contains the resource
20
20
  # @param [String] account_sid The unique id of the
21
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
21
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
22
22
  # @param [String] domain_sid A 34 character string that uniquely identifies the
23
23
  # SIP domain in Twilio.
24
24
  # @return [AuthTypesList] AuthTypesList
@@ -104,7 +104,7 @@ module Twilio
104
104
  # @param [Version] version Version that contains the resource
105
105
  # @param [Hash] payload payload that contains response from Twilio
106
106
  # @param [String] account_sid The unique id of the
107
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
107
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
108
108
  # @param [String] domain_sid A 34 character string that uniquely identifies the
109
109
  # SIP domain in Twilio.
110
110
  # @return [AuthTypesInstance] AuthTypesInstance
@@ -19,7 +19,7 @@ module Twilio
19
19
  # Initialize the AuthTypeCallsList
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] account_sid The unique id of the
22
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
22
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
23
23
  # @param [String] domain_sid A 34 character string that uniquely identifies the
24
24
  # SIP domain in Twilio.
25
25
  # @return [AuthTypeCallsList] AuthTypeCallsList
@@ -131,7 +131,7 @@ module Twilio
131
131
  # @param [Version] version Version that contains the resource
132
132
  # @param [Hash] payload payload that contains response from Twilio
133
133
  # @param [String] account_sid The unique id of the
134
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
134
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
135
135
  # @param [String] domain_sid A 34 character string that uniquely identifies the
136
136
  # SIP domain in Twilio.
137
137
  # @return [AuthTypeCallsInstance] AuthTypeCallsInstance
@@ -20,7 +20,7 @@ module Twilio
20
20
  # Initialize the AuthCallsCredentialListMappingList
21
21
  # @param [Version] version Version that contains the resource
22
22
  # @param [String] account_sid The unique id of the
23
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
23
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
24
24
  # @param [String] domain_sid A 34 character string that uniquely identifies the
25
25
  # SIP domain in Twilio.
26
26
  # @return [AuthCallsCredentialListMappingList] AuthCallsCredentialListMappingList
@@ -237,7 +237,7 @@ module Twilio
237
237
  # @param [Version] version Version that contains the resource
238
238
  # @param [Hash] payload payload that contains response from Twilio
239
239
  # @param [String] account_sid The unique id of the
240
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
240
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
241
241
  # @param [String] domain_sid A 34 character string that uniquely identifies the
242
242
  # SIP domain in Twilio.
243
243
  # @param [String] sid The credential list Sid that uniquely identifies this
@@ -20,7 +20,7 @@ module Twilio
20
20
  # Initialize the AuthCallsIpAccessControlListMappingList
21
21
  # @param [Version] version Version that contains the resource
22
22
  # @param [String] account_sid The unique id of the
23
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
23
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
24
24
  # @param [String] domain_sid A 34 character string that uniquely identifies the
25
25
  # SIP domain in Twilio.
26
26
  # @return [AuthCallsIpAccessControlListMappingList] AuthCallsIpAccessControlListMappingList
@@ -237,7 +237,7 @@ module Twilio
237
237
  # @param [Version] version Version that contains the resource
238
238
  # @param [Hash] payload payload that contains response from Twilio
239
239
  # @param [String] account_sid The unique id of the
240
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
240
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
241
241
  # @param [String] domain_sid A 34 character string that uniquely identifies the
242
242
  # SIP domain in Twilio.
243
243
  # @param [String] sid The IP Access Control List Sid that uniquely identifies this
@@ -19,7 +19,7 @@ module Twilio
19
19
  # Initialize the AuthTypeRegistrationsList
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] account_sid The unique id of the
22
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
22
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
23
23
  # @param [String] domain_sid A 34 character string that uniquely identifies the
24
24
  # SIP domain in Twilio.
25
25
  # @return [AuthTypeRegistrationsList] AuthTypeRegistrationsList
@@ -105,7 +105,7 @@ module Twilio
105
105
  # @param [Version] version Version that contains the resource
106
106
  # @param [Hash] payload payload that contains response from Twilio
107
107
  # @param [String] account_sid The unique id of the
108
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
108
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
109
109
  # @param [String] domain_sid A 34 character string that uniquely identifies the
110
110
  # SIP domain in Twilio.
111
111
  # @return [AuthTypeRegistrationsInstance] AuthTypeRegistrationsInstance
@@ -20,7 +20,7 @@ module Twilio
20
20
  # Initialize the AuthRegistrationsCredentialListMappingList
21
21
  # @param [Version] version Version that contains the resource
22
22
  # @param [String] account_sid The unique id of the
23
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
23
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
24
24
  # @param [String] domain_sid A 34 character string that uniquely identifies the
25
25
  # SIP domain in Twilio.
26
26
  # @return [AuthRegistrationsCredentialListMappingList] AuthRegistrationsCredentialListMappingList
@@ -237,7 +237,7 @@ module Twilio
237
237
  # @param [Version] version Version that contains the resource
238
238
  # @param [Hash] payload payload that contains response from Twilio
239
239
  # @param [String] account_sid The unique id of the
240
- # [Account](https://www.twilio.com/docs/api/rest/account) that sent this message.
240
+ # [Account](https://www.twilio.com/docs/api/rest/account) that sent this call.
241
241
  # @param [String] domain_sid A 34 character string that uniquely identifies the
242
242
  # SIP domain in Twilio.
243
243
  # @param [String] sid The credential list Sid that uniquely identifies this
@@ -494,7 +494,7 @@ module Twilio
494
494
  end
495
495
 
496
496
  ##
497
- # @return [Boolean] Enable the Message Constumption Horizon feature.
497
+ # @return [Boolean] Enable the Message Consumption Horizon feature.
498
498
  def read_status_enabled
499
499
  @properties['read_status_enabled']
500
500
  end
@@ -494,7 +494,7 @@ module Twilio
494
494
  end
495
495
 
496
496
  ##
497
- # @return [Boolean] Enable the Message Constumption Horizon feature.
497
+ # @return [Boolean] Enable the Message Consumption Horizon feature.
498
498
  def read_status_enabled
499
499
  @properties['read_status_enabled']
500
500
  end
@@ -120,6 +120,14 @@ 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
+
123
131
  ##
124
132
  # @param [String] sid 34 character string that uniquely identifies the Add-on.
125
133
  # This Sid can also be found in the Console on that specific Add-ons page as the
@@ -130,14 +138,6 @@ module Twilio
130
138
  self.marketplace.installed_add_ons(sid)
131
139
  end
132
140
 
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
- @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 Installed Add-on Sid that uniquely identifies this
23
+ # @param [String] sid The Available Add-on Sid that uniquely identifies this
24
24
  # resource
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)
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
- @installed_add_ons ||= InstalledAddOnList.new self
31
+ @available_add_ons ||= AvailableAddOnList.new self
32
32
  else
33
- InstalledAddOnContext.new(self, sid)
33
+ AvailableAddOnContext.new(self, sid)
34
34
  end
35
35
  end
36
36
 
37
37
  ##
38
- # @param [String] sid The Available Add-on Sid that uniquely identifies this
38
+ # @param [String] sid The Installed Add-on Sid that uniquely identifies this
39
39
  # resource
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)
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
- @available_add_ons ||= AvailableAddOnList.new self
46
+ @installed_add_ons ||= InstalledAddOnList.new self
47
47
  else
48
- AvailableAddOnContext.new(self, sid)
48
+ InstalledAddOnContext.new(self, sid)
49
49
  end
50
50
  end
51
51
 
@@ -118,19 +118,20 @@ module Twilio
118
118
  # true if no value is provided.
119
119
  # @param [String] unique_name A user-provided string that uniquely identifies this
120
120
  # resource as an alternative to the sid. Unique up to 64 characters long.
121
- # @param [String] response_url The webhook URL called to fetch the response to an
122
- # incoming communication expressed in Assistant TwiML.
123
121
  # @param [String] callback_url The callback_url
124
122
  # @param [String] callback_events The callback_events
123
+ # @param [Hash] fallback_actions The fallback_actions
124
+ # @param [Hash] initiation_actions The initiation_actions
125
125
  # @return [AssistantInstance] Newly created AssistantInstance
126
- def create(friendly_name: :unset, log_queries: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
126
+ def create(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset)
127
127
  data = Twilio::Values.of({
128
128
  'FriendlyName' => friendly_name,
129
129
  'LogQueries' => log_queries,
130
130
  'UniqueName' => unique_name,
131
- 'ResponseUrl' => response_url,
132
131
  'CallbackUrl' => callback_url,
133
132
  'CallbackEvents' => callback_events,
133
+ 'FallbackActions' => Twilio.serialize_object(fallback_actions),
134
+ 'InitiationActions' => Twilio.serialize_object(initiation_actions),
134
135
  })
135
136
 
136
137
  payload = @version.create(
@@ -200,6 +201,8 @@ module Twilio
200
201
  @intents = nil
201
202
  @model_builds = nil
202
203
  @queries = nil
204
+ @assistant_fallback_actions = nil
205
+ @assistant_initiation_actions = nil
203
206
  end
204
207
 
205
208
  ##
@@ -227,19 +230,20 @@ module Twilio
227
230
  # true if no value is provided.
228
231
  # @param [String] unique_name A user-provided string that uniquely identifies this
229
232
  # resource as an alternative to the sid. Unique up to 64 characters long.
230
- # @param [String] response_url The webhook URL called to fetch the response to an
231
- # incoming communication expressed in Assistant TwiML.
232
233
  # @param [String] callback_url The callback_url
233
234
  # @param [String] callback_events The callback_events
235
+ # @param [Hash] fallback_actions The fallback_actions
236
+ # @param [Hash] initiation_actions The initiation_actions
234
237
  # @return [AssistantInstance] Updated AssistantInstance
235
- def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
238
+ def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset)
236
239
  data = Twilio::Values.of({
237
240
  'FriendlyName' => friendly_name,
238
241
  'LogQueries' => log_queries,
239
242
  'UniqueName' => unique_name,
240
- 'ResponseUrl' => response_url,
241
243
  'CallbackUrl' => callback_url,
242
244
  'CallbackEvents' => callback_events,
245
+ 'FallbackActions' => Twilio.serialize_object(fallback_actions),
246
+ 'InitiationActions' => Twilio.serialize_object(initiation_actions),
243
247
  })
244
248
 
245
249
  payload = @version.update(
@@ -330,6 +334,22 @@ module Twilio
330
334
  @queries
331
335
  end
332
336
 
337
+ ##
338
+ # Access the assistant_fallback_actions
339
+ # @return [AssistantFallbackActionsList]
340
+ # @return [AssistantFallbackActionsContext]
341
+ def assistant_fallback_actions
342
+ AssistantFallbackActionsContext.new(@version, @solution[:sid], )
343
+ end
344
+
345
+ ##
346
+ # Access the assistant_initiation_actions
347
+ # @return [AssistantInitiationActionsList]
348
+ # @return [AssistantInitiationActionsContext]
349
+ def assistant_initiation_actions
350
+ AssistantInitiationActionsContext.new(@version, @solution[:sid], )
351
+ end
352
+
333
353
  ##
334
354
  # Provide a user friendly representation
335
355
  def to_s
@@ -362,7 +382,6 @@ module Twilio
362
382
  'sid' => payload['sid'],
363
383
  'unique_name' => payload['unique_name'],
364
384
  'url' => payload['url'],
365
- 'response_url' => payload['response_url'],
366
385
  'callback_url' => payload['callback_url'],
367
386
  'callback_events' => payload['callback_events'],
368
387
  }
@@ -443,12 +462,6 @@ module Twilio
443
462
  @properties['url']
444
463
  end
445
464
 
446
- ##
447
- # @return [String] The webhook URL called to fetch the response to an incoming communication expressed in Assistant TwiML.
448
- def response_url
449
- @properties['response_url']
450
- end
451
-
452
465
  ##
453
466
  # @return [String] The callback_url
454
467
  def callback_url
@@ -478,19 +491,20 @@ module Twilio
478
491
  # true if no value is provided.
479
492
  # @param [String] unique_name A user-provided string that uniquely identifies this
480
493
  # resource as an alternative to the sid. Unique up to 64 characters long.
481
- # @param [String] response_url The webhook URL called to fetch the response to an
482
- # incoming communication expressed in Assistant TwiML.
483
494
  # @param [String] callback_url The callback_url
484
495
  # @param [String] callback_events The callback_events
496
+ # @param [Hash] fallback_actions The fallback_actions
497
+ # @param [Hash] initiation_actions The initiation_actions
485
498
  # @return [AssistantInstance] Updated AssistantInstance
486
- def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
499
+ def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset)
487
500
  context.update(
488
501
  friendly_name: friendly_name,
489
502
  log_queries: log_queries,
490
503
  unique_name: unique_name,
491
- response_url: response_url,
492
504
  callback_url: callback_url,
493
505
  callback_events: callback_events,
506
+ fallback_actions: fallback_actions,
507
+ initiation_actions: initiation_actions,
494
508
  )
495
509
  end
496
510
 
@@ -529,6 +543,20 @@ module Twilio
529
543
  context.queries
530
544
  end
531
545
 
546
+ ##
547
+ # Access the assistant_fallback_actions
548
+ # @return [assistant_fallback_actions] assistant_fallback_actions
549
+ def assistant_fallback_actions
550
+ context.assistant_fallback_actions
551
+ end
552
+
553
+ ##
554
+ # Access the assistant_initiation_actions
555
+ # @return [assistant_initiation_actions] assistant_initiation_actions
556
+ def assistant_initiation_actions
557
+ context.assistant_initiation_actions
558
+ end
559
+
532
560
  ##
533
561
  # Provide a user friendly representation
534
562
  def to_s
@@ -0,0 +1,215 @@
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 < Domain
12
+ class Understand < Version
13
+ class AssistantContext < InstanceContext
14
+ ##
15
+ # 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.
16
+ class AssistantFallbackActionsList < ListResource
17
+ ##
18
+ # Initialize the AssistantFallbackActionsList
19
+ # @param [Version] version Version that contains the resource
20
+ # @param [String] assistant_sid The assistant_sid
21
+ # @return [AssistantFallbackActionsList] AssistantFallbackActionsList
22
+ def initialize(version, assistant_sid: nil)
23
+ super(version)
24
+
25
+ # Path Solution
26
+ @solution = {assistant_sid: assistant_sid}
27
+ end
28
+
29
+ ##
30
+ # Provide a user friendly representation
31
+ def to_s
32
+ '#<Twilio.Preview.Understand.AssistantFallbackActionsList>'
33
+ end
34
+ end
35
+
36
+ ##
37
+ # 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.
38
+ class AssistantFallbackActionsPage < Page
39
+ ##
40
+ # Initialize the AssistantFallbackActionsPage
41
+ # @param [Version] version Version that contains the resource
42
+ # @param [Response] response Response from the API
43
+ # @param [Hash] solution Path solution for the resource
44
+ # @return [AssistantFallbackActionsPage] AssistantFallbackActionsPage
45
+ def initialize(version, response, solution)
46
+ super(version, response)
47
+
48
+ # Path Solution
49
+ @solution = solution
50
+ end
51
+
52
+ ##
53
+ # Build an instance of AssistantFallbackActionsInstance
54
+ # @param [Hash] payload Payload response from the API
55
+ # @return [AssistantFallbackActionsInstance] AssistantFallbackActionsInstance
56
+ def get_instance(payload)
57
+ AssistantFallbackActionsInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], )
58
+ end
59
+
60
+ ##
61
+ # Provide a user friendly representation
62
+ def to_s
63
+ '<Twilio.Preview.Understand.AssistantFallbackActionsPage>'
64
+ end
65
+ end
66
+
67
+ ##
68
+ # 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.
69
+ class AssistantFallbackActionsContext < InstanceContext
70
+ ##
71
+ # Initialize the AssistantFallbackActionsContext
72
+ # @param [Version] version Version that contains the resource
73
+ # @param [String] assistant_sid The assistant_sid
74
+ # @return [AssistantFallbackActionsContext] AssistantFallbackActionsContext
75
+ def initialize(version, assistant_sid)
76
+ super(version)
77
+
78
+ # Path Solution
79
+ @solution = {assistant_sid: assistant_sid, }
80
+ @uri = "/Assistants/#{@solution[:assistant_sid]}/FallbackActions"
81
+ end
82
+
83
+ ##
84
+ # Fetch a AssistantFallbackActionsInstance
85
+ # @return [AssistantFallbackActionsInstance] Fetched AssistantFallbackActionsInstance
86
+ def fetch
87
+ params = Twilio::Values.of({})
88
+
89
+ payload = @version.fetch(
90
+ 'GET',
91
+ @uri,
92
+ params,
93
+ )
94
+
95
+ AssistantFallbackActionsInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], )
96
+ end
97
+
98
+ ##
99
+ # Update the AssistantFallbackActionsInstance
100
+ # @param [Hash] fallback_actions The fallback_actions
101
+ # @return [AssistantFallbackActionsInstance] Updated AssistantFallbackActionsInstance
102
+ def update(fallback_actions: :unset)
103
+ data = Twilio::Values.of({'FallbackActions' => Twilio.serialize_object(fallback_actions), })
104
+
105
+ payload = @version.update(
106
+ 'POST',
107
+ @uri,
108
+ data: data,
109
+ )
110
+
111
+ AssistantFallbackActionsInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], )
112
+ end
113
+
114
+ ##
115
+ # Provide a user friendly representation
116
+ def to_s
117
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
118
+ "#<Twilio.Preview.Understand.AssistantFallbackActionsContext #{context}>"
119
+ end
120
+ end
121
+
122
+ ##
123
+ # 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.
124
+ class AssistantFallbackActionsInstance < InstanceResource
125
+ ##
126
+ # Initialize the AssistantFallbackActionsInstance
127
+ # @param [Version] version Version that contains the resource
128
+ # @param [Hash] payload payload that contains response from Twilio
129
+ # @param [String] assistant_sid The assistant_sid
130
+ # @return [AssistantFallbackActionsInstance] AssistantFallbackActionsInstance
131
+ def initialize(version, payload, assistant_sid: nil)
132
+ super(version)
133
+
134
+ # Marshaled Properties
135
+ @properties = {
136
+ 'account_sid' => payload['account_sid'],
137
+ 'assistant_sid' => payload['assistant_sid'],
138
+ 'url' => payload['url'],
139
+ 'data' => payload['data'],
140
+ }
141
+
142
+ # Context
143
+ @instance_context = nil
144
+ @params = {'assistant_sid' => assistant_sid, }
145
+ end
146
+
147
+ ##
148
+ # Generate an instance context for the instance, the context is capable of
149
+ # performing various actions. All instance actions are proxied to the context
150
+ # @return [AssistantFallbackActionsContext] AssistantFallbackActionsContext for this AssistantFallbackActionsInstance
151
+ def context
152
+ unless @instance_context
153
+ @instance_context = AssistantFallbackActionsContext.new(@version, @params['assistant_sid'], )
154
+ end
155
+ @instance_context
156
+ end
157
+
158
+ ##
159
+ # @return [String] The account_sid
160
+ def account_sid
161
+ @properties['account_sid']
162
+ end
163
+
164
+ ##
165
+ # @return [String] The assistant_sid
166
+ def assistant_sid
167
+ @properties['assistant_sid']
168
+ end
169
+
170
+ ##
171
+ # @return [String] The url
172
+ def url
173
+ @properties['url']
174
+ end
175
+
176
+ ##
177
+ # @return [Hash] The data
178
+ def data
179
+ @properties['data']
180
+ end
181
+
182
+ ##
183
+ # Fetch a AssistantFallbackActionsInstance
184
+ # @return [AssistantFallbackActionsInstance] Fetched AssistantFallbackActionsInstance
185
+ def fetch
186
+ context.fetch
187
+ end
188
+
189
+ ##
190
+ # Update the AssistantFallbackActionsInstance
191
+ # @param [Hash] fallback_actions The fallback_actions
192
+ # @return [AssistantFallbackActionsInstance] Updated AssistantFallbackActionsInstance
193
+ def update(fallback_actions: :unset)
194
+ context.update(fallback_actions: fallback_actions, )
195
+ end
196
+
197
+ ##
198
+ # Provide a user friendly representation
199
+ def to_s
200
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
201
+ "<Twilio.Preview.Understand.AssistantFallbackActionsInstance #{values}>"
202
+ end
203
+
204
+ ##
205
+ # Provide a detailed, user friendly representation
206
+ def inspect
207
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
208
+ "<Twilio.Preview.Understand.AssistantFallbackActionsInstance #{values}>"
209
+ end
210
+ end
211
+ end
212
+ end
213
+ end
214
+ end
215
+ end