twilio-ruby 5.7.2 → 5.8.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/.travis.yml +4 -0
- data/CHANGES.md +19 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/framework/error.rb +20 -6
- data/lib/twilio-ruby/framework/version.rb +1 -10
- data/lib/twilio-ruby/jwt/access_token.rb +3 -1
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +0 -7
- data/lib/twilio-ruby/rest/preview.rb +11 -3
- data/lib/twilio-ruby/rest/preview/understand.rb +6 -6
- data/lib/twilio-ruby/rest/preview/understand/{service.rb → assistant.rb} +94 -55
- data/lib/twilio-ruby/rest/preview/understand/{service → assistant}/field_type.rb +33 -23
- data/lib/twilio-ruby/rest/preview/understand/{service → assistant}/field_type/field_value.rb +30 -22
- data/lib/twilio-ruby/rest/preview/understand/{service → assistant}/intent.rb +39 -25
- data/lib/twilio-ruby/rest/preview/understand/{service → assistant}/intent/field.rb +20 -20
- data/lib/twilio-ruby/rest/preview/understand/{service → assistant}/intent/sample.rb +45 -27
- data/lib/twilio-ruby/rest/preview/understand/{service → assistant}/model_build.rb +21 -21
- data/lib/twilio-ruby/rest/preview/understand/{service → assistant}/query.rb +31 -26
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +6 -2
- data/lib/twilio-ruby/rest/video/v1/recording.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/accounts/v1/credential/aws_spec.rb +9 -9
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +9 -9
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +7 -7
- data/spec/integration/api/v2010/account/address_spec.rb +22 -22
- data/spec/integration/api/v2010/account/application_spec.rb +22 -22
- data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +9 -9
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +4 -4
- data/spec/integration/api/v2010/account/available_phone_number/machine_to_machine_spec.rb +4 -4
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +4 -4
- data/spec/integration/api/v2010/account/available_phone_number/national_spec.rb +4 -4
- data/spec/integration/api/v2010/account/available_phone_number/shared_cost_spec.rb +4 -4
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +4 -4
- data/spec/integration/api/v2010/account/available_phone_number/voip_spec.rb +4 -4
- data/spec/integration/api/v2010/account/available_phone_number_spec.rb +7 -7
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +15 -15
- data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +13 -13
- data/spec/integration/api/v2010/account/call/notification_spec.rb +21 -21
- data/spec/integration/api/v2010/account/call/recording_spec.rb +21 -21
- data/spec/integration/api/v2010/account/call_spec.rb +22 -22
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +35 -35
- data/spec/integration/api/v2010/account/conference_spec.rb +14 -14
- data/spec/integration/api/v2010/account/connect_app_spec.rb +14 -14
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +19 -19
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +29 -29
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +7 -7
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +7 -7
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +7 -7
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +22 -22
- data/spec/integration/api/v2010/account/key_spec.rb +19 -19
- data/spec/integration/api/v2010/account/message/feedback_spec.rb +5 -5
- data/spec/integration/api/v2010/account/message/media_spec.rb +21 -21
- data/spec/integration/api/v2010/account/message_spec.rb +22 -22
- data/spec/integration/api/v2010/account/new_key_spec.rb +3 -3
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +3 -3
- data/spec/integration/api/v2010/account/notification_spec.rb +14 -14
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +19 -19
- data/spec/integration/api/v2010/account/queue/member_spec.rb +21 -21
- data/spec/integration/api/v2010/account/queue_spec.rb +22 -22
- data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +28 -28
- data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +21 -21
- data/spec/integration/api/v2010/account/recording/transcription_spec.rb +21 -21
- data/spec/integration/api/v2010/account/recording_spec.rb +14 -14
- data/spec/integration/api/v2010/account/short_code_spec.rb +14 -14
- data/spec/integration/api/v2010/account/signing_key_spec.rb +19 -19
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +33 -33
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +22 -22
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +29 -29
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +29 -29
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +22 -22
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +33 -33
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +22 -22
- data/spec/integration/api/v2010/account/token_spec.rb +3 -3
- data/spec/integration/api/v2010/account/transcription_spec.rb +14 -14
- data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/record/today_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/record_spec.rb +4 -4
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +22 -22
- data/spec/integration/api/v2010/account/validation_request_spec.rb +3 -3
- data/spec/integration/api/v2010/account_spec.rb +84 -68
- data/spec/integration/chat/v1/credential_spec.rb +9 -9
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +26 -26
- data/spec/integration/chat/v1/service/channel/member_spec.rb +36 -36
- data/spec/integration/chat/v1/service/channel/message_spec.rb +35 -35
- data/spec/integration/chat/v1/service/channel_spec.rb +22 -22
- data/spec/integration/chat/v1/service/role_spec.rb +22 -22
- data/spec/integration/chat/v1/service/user/user_channel_spec.rb +7 -7
- data/spec/integration/chat/v1/service/user_spec.rb +22 -22
- data/spec/integration/chat/v1/service_spec.rb +9 -9
- data/spec/integration/chat/v2/credential_spec.rb +9 -9
- data/spec/integration/chat/v2/service/binding_spec.rb +14 -14
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +26 -26
- data/spec/integration/chat/v2/service/channel/member_spec.rb +33 -33
- data/spec/integration/chat/v2/service/channel/message_spec.rb +40 -40
- data/spec/integration/chat/v2/service/channel_spec.rb +22 -22
- data/spec/integration/chat/v2/service/role_spec.rb +22 -22
- data/spec/integration/chat/v2/service/user/user_binding_spec.rb +21 -21
- data/spec/integration/chat/v2/service/user/user_channel_spec.rb +7 -7
- data/spec/integration/chat/v2/service/user_spec.rb +22 -22
- data/spec/integration/chat/v2/service_spec.rb +9 -9
- data/spec/integration/fax/v1/fax/fax_media_spec.rb +13 -13
- data/spec/integration/fax/v1/fax_spec.rb +9 -9
- data/spec/integration/ip_messaging/v1/credential_spec.rb +9 -9
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +26 -26
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +36 -36
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +35 -35
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +22 -22
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +22 -22
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +22 -22
- data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/credential_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +14 -14
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +26 -26
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +33 -33
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +40 -40
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +22 -22
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +22 -22
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +21 -21
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +7 -7
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +22 -22
- data/spec/integration/ip_messaging/v2/service_spec.rb +9 -9
- data/spec/integration/lookups/v1/phone_number_spec.rb +0 -10
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +16 -16
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +21 -21
- data/spec/integration/messaging/v1/service/short_code_spec.rb +19 -19
- data/spec/integration/messaging/v1/service_spec.rb +9 -9
- data/spec/integration/monitor/v1/alert_spec.rb +6 -6
- data/spec/integration/monitor/v1/event_spec.rb +3 -3
- data/spec/integration/notify/v1/credential_spec.rb +9 -9
- data/spec/integration/notify/v1/service/binding_spec.rb +17 -17
- data/spec/integration/notify/v1/service/notification_spec.rb +4 -4
- data/spec/integration/notify/v1/service/segment_spec.rb +4 -4
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +15 -15
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +28 -28
- data/spec/integration/notify/v1/service/user_spec.rb +17 -17
- data/spec/integration/notify/v1/service_spec.rb +9 -9
- data/spec/integration/preview/acc_security/service/verification_check_spec.rb +3 -3
- data/spec/integration/preview/acc_security/service/verification_spec.rb +3 -3
- data/spec/integration/preview/acc_security/service_spec.rb +6 -6
- data/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb +22 -22
- data/spec/integration/preview/deployed_devices/fleet/deployment_spec.rb +22 -22
- data/spec/integration/preview/deployed_devices/fleet/device_spec.rb +22 -22
- data/spec/integration/preview/deployed_devices/fleet/key_spec.rb +22 -22
- data/spec/integration/preview/deployed_devices/fleet_spec.rb +9 -9
- data/spec/integration/preview/hosted_numbers/authorization_document/dependent_hosted_number_order_spec.rb +4 -4
- data/spec/integration/preview/hosted_numbers/authorization_document_spec.rb +9 -9
- data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +9 -9
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +9 -9
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +3 -3
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +14 -14
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +12 -12
- data/spec/integration/preview/proxy/service/phone_number_spec.rb +19 -19
- data/spec/integration/preview/proxy/service/session/interaction_spec.rb +12 -12
- data/spec/integration/preview/proxy/service/session/participant/message_interaction_spec.rb +23 -23
- data/spec/integration/preview/proxy/service/session/participant_spec.rb +31 -31
- data/spec/integration/preview/proxy/service/session_spec.rb +21 -21
- data/spec/integration/preview/proxy/service/short_code_spec.rb +19 -19
- data/spec/integration/preview/proxy/service_spec.rb +9 -9
- data/spec/integration/preview/studio/flow/engagement/step_spec.rb +12 -12
- data/spec/integration/preview/studio/flow/engagement_spec.rb +11 -11
- data/spec/integration/preview/studio/flow_spec.rb +6 -6
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +22 -22
- data/spec/integration/preview/sync/service/document_spec.rb +23 -23
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +33 -33
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +22 -22
- data/spec/integration/preview/sync/service/sync_list_spec.rb +17 -17
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +33 -33
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +22 -22
- data/spec/integration/preview/sync/service/sync_map_spec.rb +17 -17
- data/spec/integration/preview/sync/service_spec.rb +9 -9
- data/spec/integration/preview/understand/assistant/field_type/field_value_spec.rb +208 -0
- data/spec/integration/preview/understand/{service → assistant}/field_type_spec.rb +38 -38
- data/spec/integration/preview/understand/{service → assistant}/intent/field_spec.rb +36 -36
- data/spec/integration/preview/understand/assistant/intent/sample_spec.rb +251 -0
- data/spec/integration/preview/understand/{service → assistant}/intent_spec.rb +42 -46
- data/spec/integration/preview/understand/{service → assistant}/model_build_spec.rb +34 -34
- data/spec/integration/preview/understand/{service → assistant}/query_spec.rb +42 -38
- data/spec/integration/preview/understand/{service_spec.rb → assistant_spec.rb} +57 -49
- data/spec/integration/preview/wireless/command_spec.rb +3 -3
- data/spec/integration/preview/wireless/rate_plan_spec.rb +9 -9
- data/spec/integration/preview/wireless/sim/usage_spec.rb +3 -3
- data/spec/integration/preview/wireless/sim_spec.rb +6 -6
- data/spec/integration/proxy/v1/service/phone_number_spec.rb +16 -16
- data/spec/integration/proxy/v1/service/session/interaction_spec.rb +19 -19
- data/spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb +23 -23
- data/spec/integration/proxy/v1/service/session/participant_spec.rb +31 -31
- data/spec/integration/proxy/v1/service/session_spec.rb +21 -21
- data/spec/integration/proxy/v1/service/short_code_spec.rb +19 -19
- data/spec/integration/proxy/v1/service_spec.rb +9 -9
- data/spec/integration/studio/v1/flow/engagement/engagement_context_spec.rb +5 -5
- data/spec/integration/studio/v1/flow/engagement/step/step_context_spec.rb +7 -7
- data/spec/integration/studio/v1/flow/engagement/step_spec.rb +12 -12
- data/spec/integration/studio/v1/flow/engagement_spec.rb +11 -11
- data/spec/integration/studio/v1/flow_spec.rb +6 -6
- data/spec/integration/sync/v1/service/document/document_permission_spec.rb +22 -22
- data/spec/integration/sync/v1/service/document_spec.rb +22 -22
- data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +30 -30
- data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +22 -22
- data/spec/integration/sync/v1/service/sync_list_spec.rb +22 -22
- data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +30 -30
- data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +22 -22
- data/spec/integration/sync/v1/service/sync_map_spec.rb +22 -22
- data/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb +8 -8
- data/spec/integration/sync/v1/service/sync_stream_spec.rb +22 -22
- data/spec/integration/sync/v1/service_spec.rb +9 -9
- data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +22 -22
- data/spec/integration/taskrouter/v1/workspace/event_spec.rb +9 -9
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +21 -21
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +9 -9
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +4 -4
- data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +26 -26
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +23 -23
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +21 -21
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +21 -21
- data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/worker/workers_cumulative_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/worker/workers_real_time_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +22 -22
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_real_time_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +5 -5
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +22 -22
- data/spec/integration/taskrouter/v1/workspace/workspace_cumulative_statistics_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/workspace_real_time_statistics_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +3 -3
- data/spec/integration/taskrouter/v1/workspace_spec.rb +9 -9
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +20 -20
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +20 -20
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +22 -22
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +20 -20
- data/spec/integration/trunking/v1/trunk_spec.rb +9 -9
- data/spec/integration/video/v1/composition_spec.rb +6 -6
- data/spec/integration/video/v1/recording_spec.rb +10 -6
- data/spec/integration/video/v1/room/recording_spec.rb +9 -9
- data/spec/integration/video/v1/room/room_participant/room_participant_published_track_spec.rb +12 -12
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +12 -12
- data/spec/integration/video/v1/room/room_participant_spec.rb +14 -14
- data/spec/integration/video/v1/room_spec.rb +6 -6
- data/spec/integration/wireless/v1/command_spec.rb +3 -3
- data/spec/integration/wireless/v1/rate_plan_spec.rb +9 -9
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +3 -3
- data/spec/integration/wireless/v1/sim/usage_record_spec.rb +3 -3
- data/spec/integration/wireless/v1/sim_spec.rb +6 -6
- data/spec/jwt/access_token_spec.rb +2 -0
- metadata +26 -26
- data/spec/integration/preview/understand/service/field_type/field_value_spec.rb +0 -205
- data/spec/integration/preview/understand/service/intent/sample_spec.rb +0 -247
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f31420e85a848a70feecfe16755e650d9239765b
|
|
4
|
+
data.tar.gz: a8f8a197dd19c793eadc79f81457b1be96570756
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e2fa856f8d8c4596efa8c274d8606d1666d61971647ffdc29e8dc7d307fb038ad723b644f3ed6ec3b5f1a49fe3f681db873ded28b70cb4d9cd6ba1c0bd22bf3
|
|
7
|
+
data.tar.gz: 24a1cb1af4daad69c49406c47a0cb98c645f7201809bc5d3da8046cec350f91f7c04f35d9aee156ab19f3041daf9cca35fa9197657654c6b3adb73004b59c6e1
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
twilio-ruby changelog
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
|
+
[2018-04-13] Version 5.8.0
|
|
5
|
+
---------------------------
|
|
6
|
+
**Library**
|
|
7
|
+
- PR #389: Add incoming.allow to AccessToken VoiceGrant. Thanks to @ryan-rowland!
|
|
8
|
+
- PR #391: Improves error message for Twilio::REST::RestError. Thanks to @philnash!
|
|
9
|
+
|
|
10
|
+
**Lookups**
|
|
11
|
+
- Disable support for `fraud` lookups **(breaking change)**
|
|
12
|
+
|
|
13
|
+
**Preview**
|
|
14
|
+
- Support for Understand V2 APIs - renames various resources and adds new fields
|
|
15
|
+
|
|
16
|
+
**Studio**
|
|
17
|
+
- Change parameters type from string to object in engagement resource
|
|
18
|
+
|
|
19
|
+
**Video**
|
|
20
|
+
- [Recordings] Change `size` type to `long`. **(breaking change)**
|
|
21
|
+
|
|
22
|
+
|
|
4
23
|
[2018-03-22] Version 5.7.2
|
|
5
24
|
---------------------------
|
|
6
25
|
**Preview**
|
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.
|
|
30
|
+
gem 'twilio-ruby', '~> 5.8.0'
|
|
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.
|
|
36
|
+
gem install twilio-ruby -v 5.8.0
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
|
@@ -14,16 +14,30 @@ module Twilio
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
class RestError < TwilioError
|
|
17
|
-
attr_reader :message, :code, :status_code
|
|
17
|
+
attr_reader :message, :response, :code, :status_code, :detail, :more_info, :error_message
|
|
18
18
|
|
|
19
|
-
def initialize(message,
|
|
20
|
-
@
|
|
21
|
-
@code = code
|
|
22
|
-
@
|
|
19
|
+
def initialize(message, response)
|
|
20
|
+
@status_code = response.status_code
|
|
21
|
+
@code = response.body.fetch('code', @status_code)
|
|
22
|
+
@detail = response.body.fetch('detail', nil)
|
|
23
|
+
@error_message = response.body.fetch('message', nil)
|
|
24
|
+
@more_info = response.body.fetch('more_info', nil)
|
|
25
|
+
@message = format_message(message)
|
|
26
|
+
@response = response
|
|
23
27
|
end
|
|
24
28
|
|
|
25
29
|
def to_s
|
|
26
|
-
|
|
30
|
+
message
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
private
|
|
34
|
+
|
|
35
|
+
def format_message(initial_message)
|
|
36
|
+
message = "[HTTP #{status_code}] #{code} : #{initial_message}"
|
|
37
|
+
message += "\n#{error_message}" if error_message
|
|
38
|
+
message += "\n#{detail}" if detail
|
|
39
|
+
message += "\n#{more_info}" if more_info
|
|
40
|
+
message + "\n\n"
|
|
27
41
|
end
|
|
28
42
|
end
|
|
29
43
|
|
|
@@ -52,16 +52,7 @@ module Twilio
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def exception(response, header)
|
|
55
|
-
|
|
56
|
-
code = response.status_code
|
|
57
|
-
|
|
58
|
-
if response.body.key?('message')
|
|
59
|
-
message += ": #{response.body['message']}"
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
code = response.body['code'] if response.body.key?('code')
|
|
63
|
-
|
|
64
|
-
Twilio::REST::RestError.new(message, code, response.status_code)
|
|
55
|
+
Twilio::REST::RestError.new(header, response)
|
|
65
56
|
end
|
|
66
57
|
|
|
67
58
|
def fetch(method, uri, params = {}, data = {}, headers = {}, auth = nil, timeout = nil)
|
|
@@ -144,7 +144,8 @@ module Twilio
|
|
|
144
144
|
|
|
145
145
|
class VoiceGrant
|
|
146
146
|
include AccessTokenGrant
|
|
147
|
-
attr_accessor :
|
|
147
|
+
attr_accessor :incoming_allow,
|
|
148
|
+
:outgoing_application_sid,
|
|
148
149
|
:outgoing_application_params,
|
|
149
150
|
:push_credential_sid,
|
|
150
151
|
:endpoint_id
|
|
@@ -155,6 +156,7 @@ module Twilio
|
|
|
155
156
|
|
|
156
157
|
def _generate_payload
|
|
157
158
|
payload = {}
|
|
159
|
+
payload[:incoming] = { allow: true } if incoming_allow == true
|
|
158
160
|
|
|
159
161
|
if outgoing_application_sid
|
|
160
162
|
outgoing = {}
|
|
@@ -119,7 +119,6 @@ module Twilio
|
|
|
119
119
|
'phone_number' => payload['phone_number'],
|
|
120
120
|
'national_format' => payload['national_format'],
|
|
121
121
|
'carrier' => payload['carrier'],
|
|
122
|
-
'fraud' => payload['fraud'],
|
|
123
122
|
'add_ons' => payload['add_ons'],
|
|
124
123
|
'url' => payload['url'],
|
|
125
124
|
}
|
|
@@ -170,12 +169,6 @@ module Twilio
|
|
|
170
169
|
@properties['carrier']
|
|
171
170
|
end
|
|
172
171
|
|
|
173
|
-
##
|
|
174
|
-
# @return [String] The fraud
|
|
175
|
-
def fraud
|
|
176
|
-
@properties['fraud']
|
|
177
|
-
end
|
|
178
|
-
|
|
179
172
|
##
|
|
180
173
|
# @return [Hash] The add_ons
|
|
181
174
|
def add_ons
|
|
@@ -151,10 +151,10 @@ module Twilio
|
|
|
151
151
|
|
|
152
152
|
##
|
|
153
153
|
# @param [String] sid The sid
|
|
154
|
-
# @return [Twilio::REST::Preview::
|
|
155
|
-
# @return [Twilio::REST::Preview::
|
|
154
|
+
# @return [Twilio::REST::Preview::Sync::ServiceInstance] if sid was passed.
|
|
155
|
+
# @return [Twilio::REST::Preview::Sync::ServiceList]
|
|
156
156
|
def services(sid=:unset)
|
|
157
|
-
self.
|
|
157
|
+
self.sync.services(sid)
|
|
158
158
|
end
|
|
159
159
|
|
|
160
160
|
##
|
|
@@ -165,6 +165,14 @@ module Twilio
|
|
|
165
165
|
self.studio.flows(sid)
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
+
##
|
|
169
|
+
# @param [String] sid The sid
|
|
170
|
+
# @return [Twilio::REST::Preview::Understand::AssistantInstance] if sid was passed.
|
|
171
|
+
# @return [Twilio::REST::Preview::Understand::AssistantList]
|
|
172
|
+
def assistants(sid=:unset)
|
|
173
|
+
self.understand.assistants(sid)
|
|
174
|
+
end
|
|
175
|
+
|
|
168
176
|
##
|
|
169
177
|
# @param [String] sid The sid
|
|
170
178
|
# @return [Twilio::REST::Preview::Wireless::CommandInstance] if sid was passed.
|
|
@@ -13,20 +13,20 @@ module Twilio
|
|
|
13
13
|
def initialize(domain)
|
|
14
14
|
super
|
|
15
15
|
@version = 'understand'
|
|
16
|
-
@
|
|
16
|
+
@assistants = nil
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
##
|
|
20
20
|
# @param [String] sid The sid
|
|
21
|
-
# @return [Twilio::REST::Preview::Understand::
|
|
22
|
-
# @return [Twilio::REST::Preview::Understand::
|
|
23
|
-
def
|
|
21
|
+
# @return [Twilio::REST::Preview::Understand::AssistantContext] if sid was passed.
|
|
22
|
+
# @return [Twilio::REST::Preview::Understand::AssistantList]
|
|
23
|
+
def assistants(sid=:unset)
|
|
24
24
|
if sid.nil?
|
|
25
25
|
raise ArgumentError, 'sid cannot be nil'
|
|
26
26
|
elsif sid == :unset
|
|
27
|
-
@
|
|
27
|
+
@assistants ||= AssistantList.new self
|
|
28
28
|
else
|
|
29
|
-
|
|
29
|
+
AssistantContext.new(self, sid)
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -10,21 +10,21 @@ module Twilio
|
|
|
10
10
|
class Understand < Version
|
|
11
11
|
##
|
|
12
12
|
# 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.
|
|
13
|
-
class
|
|
13
|
+
class AssistantList < ListResource
|
|
14
14
|
##
|
|
15
|
-
# Initialize the
|
|
15
|
+
# Initialize the AssistantList
|
|
16
16
|
# @param [Version] version Version that contains the resource
|
|
17
|
-
# @return [
|
|
17
|
+
# @return [AssistantList] AssistantList
|
|
18
18
|
def initialize(version)
|
|
19
19
|
super(version)
|
|
20
20
|
|
|
21
21
|
# Path Solution
|
|
22
22
|
@solution = {}
|
|
23
|
-
@uri = "/
|
|
23
|
+
@uri = "/Assistants"
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
##
|
|
27
|
-
# Lists
|
|
27
|
+
# Lists AssistantInstance records from the API as a list.
|
|
28
28
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
29
29
|
# memory before returning.
|
|
30
30
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
@@ -39,7 +39,7 @@ module Twilio
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
##
|
|
42
|
-
# Streams
|
|
42
|
+
# Streams AssistantInstance records from the API as an Enumerable.
|
|
43
43
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
44
44
|
# is reached.
|
|
45
45
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
@@ -58,7 +58,7 @@ module Twilio
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
##
|
|
61
|
-
# When passed a block, yields
|
|
61
|
+
# When passed a block, yields AssistantInstance records from the API.
|
|
62
62
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
63
63
|
# is reached.
|
|
64
64
|
def each
|
|
@@ -72,12 +72,12 @@ module Twilio
|
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
##
|
|
75
|
-
# Retrieve a single page of
|
|
75
|
+
# Retrieve a single page of AssistantInstance records from the API.
|
|
76
76
|
# Request is executed immediately.
|
|
77
77
|
# @param [String] page_token PageToken provided by the API
|
|
78
78
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
79
79
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
80
|
-
# @return [Page] Page of
|
|
80
|
+
# @return [Page] Page of AssistantInstance
|
|
81
81
|
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
|
82
82
|
params = Twilio::Values.of({
|
|
83
83
|
'PageToken' => page_token,
|
|
@@ -89,36 +89,42 @@ module Twilio
|
|
|
89
89
|
@uri,
|
|
90
90
|
params
|
|
91
91
|
)
|
|
92
|
-
|
|
92
|
+
AssistantPage.new(@version, response, @solution)
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
##
|
|
96
|
-
# Retrieve a single page of
|
|
96
|
+
# Retrieve a single page of AssistantInstance records from the API.
|
|
97
97
|
# Request is executed immediately.
|
|
98
98
|
# @param [String] target_url API-generated URL for the requested results page
|
|
99
|
-
# @return [Page] Page of
|
|
99
|
+
# @return [Page] Page of AssistantInstance
|
|
100
100
|
def get_page(target_url)
|
|
101
101
|
response = @version.domain.request(
|
|
102
102
|
'GET',
|
|
103
103
|
target_url
|
|
104
104
|
)
|
|
105
|
-
|
|
105
|
+
AssistantPage.new(@version, response, @solution)
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
##
|
|
109
|
-
# Retrieve a single page of
|
|
109
|
+
# Retrieve a single page of AssistantInstance records from the API.
|
|
110
110
|
# Request is executed immediately.
|
|
111
111
|
# @param [String] friendly_name The friendly_name
|
|
112
112
|
# @param [Boolean] log_queries The log_queries
|
|
113
113
|
# @param [String] ttl The ttl
|
|
114
114
|
# @param [String] unique_name The unique_name
|
|
115
|
-
# @
|
|
116
|
-
|
|
115
|
+
# @param [String] response_url The response_url
|
|
116
|
+
# @param [String] callback_url The callback_url
|
|
117
|
+
# @param [String] callback_events The callback_events
|
|
118
|
+
# @return [AssistantInstance] Newly created AssistantInstance
|
|
119
|
+
def create(friendly_name: :unset, log_queries: :unset, ttl: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
|
|
117
120
|
data = Twilio::Values.of({
|
|
118
121
|
'FriendlyName' => friendly_name,
|
|
119
122
|
'LogQueries' => log_queries,
|
|
120
123
|
'Ttl' => ttl,
|
|
121
124
|
'UniqueName' => unique_name,
|
|
125
|
+
'ResponseUrl' => response_url,
|
|
126
|
+
'CallbackUrl' => callback_url,
|
|
127
|
+
'CallbackEvents' => callback_events,
|
|
122
128
|
})
|
|
123
129
|
|
|
124
130
|
payload = @version.create(
|
|
@@ -127,25 +133,25 @@ module Twilio
|
|
|
127
133
|
data: data
|
|
128
134
|
)
|
|
129
135
|
|
|
130
|
-
|
|
136
|
+
AssistantInstance.new(@version, payload, )
|
|
131
137
|
end
|
|
132
138
|
|
|
133
139
|
##
|
|
134
140
|
# Provide a user friendly representation
|
|
135
141
|
def to_s
|
|
136
|
-
'#<Twilio.Preview.Understand.
|
|
142
|
+
'#<Twilio.Preview.Understand.AssistantList>'
|
|
137
143
|
end
|
|
138
144
|
end
|
|
139
145
|
|
|
140
146
|
##
|
|
141
147
|
# 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.
|
|
142
|
-
class
|
|
148
|
+
class AssistantPage < Page
|
|
143
149
|
##
|
|
144
|
-
# Initialize the
|
|
150
|
+
# Initialize the AssistantPage
|
|
145
151
|
# @param [Version] version Version that contains the resource
|
|
146
152
|
# @param [Response] response Response from the API
|
|
147
153
|
# @param [Hash] solution Path solution for the resource
|
|
148
|
-
# @return [
|
|
154
|
+
# @return [AssistantPage] AssistantPage
|
|
149
155
|
def initialize(version, response, solution)
|
|
150
156
|
super(version, response)
|
|
151
157
|
|
|
@@ -154,34 +160,34 @@ module Twilio
|
|
|
154
160
|
end
|
|
155
161
|
|
|
156
162
|
##
|
|
157
|
-
# Build an instance of
|
|
163
|
+
# Build an instance of AssistantInstance
|
|
158
164
|
# @param [Hash] payload Payload response from the API
|
|
159
|
-
# @return [
|
|
165
|
+
# @return [AssistantInstance] AssistantInstance
|
|
160
166
|
def get_instance(payload)
|
|
161
|
-
|
|
167
|
+
AssistantInstance.new(@version, payload, )
|
|
162
168
|
end
|
|
163
169
|
|
|
164
170
|
##
|
|
165
171
|
# Provide a user friendly representation
|
|
166
172
|
def to_s
|
|
167
|
-
'<Twilio.Preview.Understand.
|
|
173
|
+
'<Twilio.Preview.Understand.AssistantPage>'
|
|
168
174
|
end
|
|
169
175
|
end
|
|
170
176
|
|
|
171
177
|
##
|
|
172
178
|
# 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.
|
|
173
|
-
class
|
|
179
|
+
class AssistantContext < InstanceContext
|
|
174
180
|
##
|
|
175
|
-
# Initialize the
|
|
181
|
+
# Initialize the AssistantContext
|
|
176
182
|
# @param [Version] version Version that contains the resource
|
|
177
183
|
# @param [String] sid The sid
|
|
178
|
-
# @return [
|
|
184
|
+
# @return [AssistantContext] AssistantContext
|
|
179
185
|
def initialize(version, sid)
|
|
180
186
|
super(version)
|
|
181
187
|
|
|
182
188
|
# Path Solution
|
|
183
189
|
@solution = {sid: sid, }
|
|
184
|
-
@uri = "/
|
|
190
|
+
@uri = "/Assistants/#{@solution[:sid]}"
|
|
185
191
|
|
|
186
192
|
# Dependents
|
|
187
193
|
@field_types = nil
|
|
@@ -191,8 +197,8 @@ module Twilio
|
|
|
191
197
|
end
|
|
192
198
|
|
|
193
199
|
##
|
|
194
|
-
# Fetch a
|
|
195
|
-
# @return [
|
|
200
|
+
# Fetch a AssistantInstance
|
|
201
|
+
# @return [AssistantInstance] Fetched AssistantInstance
|
|
196
202
|
def fetch
|
|
197
203
|
params = Twilio::Values.of({})
|
|
198
204
|
|
|
@@ -202,22 +208,28 @@ module Twilio
|
|
|
202
208
|
params,
|
|
203
209
|
)
|
|
204
210
|
|
|
205
|
-
|
|
211
|
+
AssistantInstance.new(@version, payload, sid: @solution[:sid], )
|
|
206
212
|
end
|
|
207
213
|
|
|
208
214
|
##
|
|
209
|
-
# Update the
|
|
215
|
+
# Update the AssistantInstance
|
|
210
216
|
# @param [String] friendly_name The friendly_name
|
|
211
217
|
# @param [Boolean] log_queries The log_queries
|
|
212
218
|
# @param [String] ttl The ttl
|
|
213
219
|
# @param [String] unique_name The unique_name
|
|
214
|
-
# @
|
|
215
|
-
|
|
220
|
+
# @param [String] response_url The response_url
|
|
221
|
+
# @param [String] callback_url The callback_url
|
|
222
|
+
# @param [String] callback_events The callback_events
|
|
223
|
+
# @return [AssistantInstance] Updated AssistantInstance
|
|
224
|
+
def update(friendly_name: :unset, log_queries: :unset, ttl: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
|
|
216
225
|
data = Twilio::Values.of({
|
|
217
226
|
'FriendlyName' => friendly_name,
|
|
218
227
|
'LogQueries' => log_queries,
|
|
219
228
|
'Ttl' => ttl,
|
|
220
229
|
'UniqueName' => unique_name,
|
|
230
|
+
'ResponseUrl' => response_url,
|
|
231
|
+
'CallbackUrl' => callback_url,
|
|
232
|
+
'CallbackEvents' => callback_events,
|
|
221
233
|
})
|
|
222
234
|
|
|
223
235
|
payload = @version.update(
|
|
@@ -226,11 +238,11 @@ module Twilio
|
|
|
226
238
|
data: data,
|
|
227
239
|
)
|
|
228
240
|
|
|
229
|
-
|
|
241
|
+
AssistantInstance.new(@version, payload, sid: @solution[:sid], )
|
|
230
242
|
end
|
|
231
243
|
|
|
232
244
|
##
|
|
233
|
-
# Deletes the
|
|
245
|
+
# Deletes the AssistantInstance
|
|
234
246
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
235
247
|
def delete
|
|
236
248
|
@version.delete('delete', @uri)
|
|
@@ -248,7 +260,7 @@ module Twilio
|
|
|
248
260
|
end
|
|
249
261
|
|
|
250
262
|
unless @field_types
|
|
251
|
-
@field_types = FieldTypeList.new(@version,
|
|
263
|
+
@field_types = FieldTypeList.new(@version, assistant_sid: @solution[:sid], )
|
|
252
264
|
end
|
|
253
265
|
|
|
254
266
|
@field_types
|
|
@@ -266,7 +278,7 @@ module Twilio
|
|
|
266
278
|
end
|
|
267
279
|
|
|
268
280
|
unless @intents
|
|
269
|
-
@intents = IntentList.new(@version,
|
|
281
|
+
@intents = IntentList.new(@version, assistant_sid: @solution[:sid], )
|
|
270
282
|
end
|
|
271
283
|
|
|
272
284
|
@intents
|
|
@@ -284,7 +296,7 @@ module Twilio
|
|
|
284
296
|
end
|
|
285
297
|
|
|
286
298
|
unless @model_builds
|
|
287
|
-
@model_builds = ModelBuildList.new(@version,
|
|
299
|
+
@model_builds = ModelBuildList.new(@version, assistant_sid: @solution[:sid], )
|
|
288
300
|
end
|
|
289
301
|
|
|
290
302
|
@model_builds
|
|
@@ -302,7 +314,7 @@ module Twilio
|
|
|
302
314
|
end
|
|
303
315
|
|
|
304
316
|
unless @queries
|
|
305
|
-
@queries = QueryList.new(@version,
|
|
317
|
+
@queries = QueryList.new(@version, assistant_sid: @solution[:sid], )
|
|
306
318
|
end
|
|
307
319
|
|
|
308
320
|
@queries
|
|
@@ -312,19 +324,19 @@ module Twilio
|
|
|
312
324
|
# Provide a user friendly representation
|
|
313
325
|
def to_s
|
|
314
326
|
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
315
|
-
"#<Twilio.Preview.Understand.
|
|
327
|
+
"#<Twilio.Preview.Understand.AssistantContext #{context}>"
|
|
316
328
|
end
|
|
317
329
|
end
|
|
318
330
|
|
|
319
331
|
##
|
|
320
332
|
# 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.
|
|
321
|
-
class
|
|
333
|
+
class AssistantInstance < InstanceResource
|
|
322
334
|
##
|
|
323
|
-
# Initialize the
|
|
335
|
+
# Initialize the AssistantInstance
|
|
324
336
|
# @param [Version] version Version that contains the resource
|
|
325
337
|
# @param [Hash] payload payload that contains response from Twilio
|
|
326
338
|
# @param [String] sid The sid
|
|
327
|
-
# @return [
|
|
339
|
+
# @return [AssistantInstance] AssistantInstance
|
|
328
340
|
def initialize(version, payload, sid: nil)
|
|
329
341
|
super(version)
|
|
330
342
|
|
|
@@ -341,6 +353,9 @@ module Twilio
|
|
|
341
353
|
'ttl' => payload['ttl'].to_i,
|
|
342
354
|
'unique_name' => payload['unique_name'],
|
|
343
355
|
'url' => payload['url'],
|
|
356
|
+
'response_url' => payload['response_url'],
|
|
357
|
+
'callback_url' => payload['callback_url'],
|
|
358
|
+
'callback_events' => payload['callback_events'],
|
|
344
359
|
}
|
|
345
360
|
|
|
346
361
|
# Context
|
|
@@ -351,10 +366,10 @@ module Twilio
|
|
|
351
366
|
##
|
|
352
367
|
# Generate an instance context for the instance, the context is capable of
|
|
353
368
|
# performing various actions. All instance actions are proxied to the context
|
|
354
|
-
# @return [
|
|
369
|
+
# @return [AssistantContext] AssistantContext for this AssistantInstance
|
|
355
370
|
def context
|
|
356
371
|
unless @instance_context
|
|
357
|
-
@instance_context =
|
|
372
|
+
@instance_context = AssistantContext.new(@version, @params['sid'], )
|
|
358
373
|
end
|
|
359
374
|
@instance_context
|
|
360
375
|
end
|
|
@@ -426,30 +441,54 @@ module Twilio
|
|
|
426
441
|
end
|
|
427
442
|
|
|
428
443
|
##
|
|
429
|
-
#
|
|
430
|
-
|
|
444
|
+
# @return [String] The response_url
|
|
445
|
+
def response_url
|
|
446
|
+
@properties['response_url']
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
##
|
|
450
|
+
# @return [String] The callback_url
|
|
451
|
+
def callback_url
|
|
452
|
+
@properties['callback_url']
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
##
|
|
456
|
+
# @return [String] The callback_events
|
|
457
|
+
def callback_events
|
|
458
|
+
@properties['callback_events']
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
##
|
|
462
|
+
# Fetch a AssistantInstance
|
|
463
|
+
# @return [AssistantInstance] Fetched AssistantInstance
|
|
431
464
|
def fetch
|
|
432
465
|
context.fetch
|
|
433
466
|
end
|
|
434
467
|
|
|
435
468
|
##
|
|
436
|
-
# Update the
|
|
469
|
+
# Update the AssistantInstance
|
|
437
470
|
# @param [String] friendly_name The friendly_name
|
|
438
471
|
# @param [Boolean] log_queries The log_queries
|
|
439
472
|
# @param [String] ttl The ttl
|
|
440
473
|
# @param [String] unique_name The unique_name
|
|
441
|
-
# @
|
|
442
|
-
|
|
474
|
+
# @param [String] response_url The response_url
|
|
475
|
+
# @param [String] callback_url The callback_url
|
|
476
|
+
# @param [String] callback_events The callback_events
|
|
477
|
+
# @return [AssistantInstance] Updated AssistantInstance
|
|
478
|
+
def update(friendly_name: :unset, log_queries: :unset, ttl: :unset, unique_name: :unset, response_url: :unset, callback_url: :unset, callback_events: :unset)
|
|
443
479
|
context.update(
|
|
444
480
|
friendly_name: friendly_name,
|
|
445
481
|
log_queries: log_queries,
|
|
446
482
|
ttl: ttl,
|
|
447
483
|
unique_name: unique_name,
|
|
484
|
+
response_url: response_url,
|
|
485
|
+
callback_url: callback_url,
|
|
486
|
+
callback_events: callback_events,
|
|
448
487
|
)
|
|
449
488
|
end
|
|
450
489
|
|
|
451
490
|
##
|
|
452
|
-
# Deletes the
|
|
491
|
+
# Deletes the AssistantInstance
|
|
453
492
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
454
493
|
def delete
|
|
455
494
|
context.delete
|
|
@@ -487,14 +526,14 @@ module Twilio
|
|
|
487
526
|
# Provide a user friendly representation
|
|
488
527
|
def to_s
|
|
489
528
|
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
490
|
-
"<Twilio.Preview.Understand.
|
|
529
|
+
"<Twilio.Preview.Understand.AssistantInstance #{values}>"
|
|
491
530
|
end
|
|
492
531
|
|
|
493
532
|
##
|
|
494
533
|
# Provide a detailed, user friendly representation
|
|
495
534
|
def inspect
|
|
496
535
|
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
497
|
-
"<Twilio.Preview.Understand.
|
|
536
|
+
"<Twilio.Preview.Understand.AssistantInstance #{values}>"
|
|
498
537
|
end
|
|
499
538
|
end
|
|
500
539
|
end
|