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
|
@@ -8,7 +8,7 @@ module Twilio
|
|
|
8
8
|
module REST
|
|
9
9
|
class Preview < Domain
|
|
10
10
|
class Understand < Version
|
|
11
|
-
class
|
|
11
|
+
class AssistantContext < InstanceContext
|
|
12
12
|
class IntentContext < InstanceContext
|
|
13
13
|
##
|
|
14
14
|
# 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,15 +16,15 @@ module Twilio
|
|
|
16
16
|
##
|
|
17
17
|
# Initialize the FieldList
|
|
18
18
|
# @param [Version] version Version that contains the resource
|
|
19
|
-
# @param [String]
|
|
19
|
+
# @param [String] assistant_sid The assistant_sid
|
|
20
20
|
# @param [String] intent_sid The intent_sid
|
|
21
21
|
# @return [FieldList] FieldList
|
|
22
|
-
def initialize(version,
|
|
22
|
+
def initialize(version, assistant_sid: nil, intent_sid: nil)
|
|
23
23
|
super(version)
|
|
24
24
|
|
|
25
25
|
# Path Solution
|
|
26
|
-
@solution = {
|
|
27
|
-
@uri = "/
|
|
26
|
+
@solution = {assistant_sid: assistant_sid, intent_sid: intent_sid}
|
|
27
|
+
@uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Fields"
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
##
|
|
@@ -127,7 +127,7 @@ module Twilio
|
|
|
127
127
|
FieldInstance.new(
|
|
128
128
|
@version,
|
|
129
129
|
payload,
|
|
130
|
-
|
|
130
|
+
assistant_sid: @solution[:assistant_sid],
|
|
131
131
|
intent_sid: @solution[:intent_sid],
|
|
132
132
|
)
|
|
133
133
|
end
|
|
@@ -163,7 +163,7 @@ module Twilio
|
|
|
163
163
|
FieldInstance.new(
|
|
164
164
|
@version,
|
|
165
165
|
payload,
|
|
166
|
-
|
|
166
|
+
assistant_sid: @solution[:assistant_sid],
|
|
167
167
|
intent_sid: @solution[:intent_sid],
|
|
168
168
|
)
|
|
169
169
|
end
|
|
@@ -181,16 +181,16 @@ module Twilio
|
|
|
181
181
|
##
|
|
182
182
|
# Initialize the FieldContext
|
|
183
183
|
# @param [Version] version Version that contains the resource
|
|
184
|
-
# @param [String]
|
|
184
|
+
# @param [String] assistant_sid The assistant_sid
|
|
185
185
|
# @param [String] intent_sid The intent_sid
|
|
186
186
|
# @param [String] sid The sid
|
|
187
187
|
# @return [FieldContext] FieldContext
|
|
188
|
-
def initialize(version,
|
|
188
|
+
def initialize(version, assistant_sid, intent_sid, sid)
|
|
189
189
|
super(version)
|
|
190
190
|
|
|
191
191
|
# Path Solution
|
|
192
|
-
@solution = {
|
|
193
|
-
@uri = "/
|
|
192
|
+
@solution = {assistant_sid: assistant_sid, intent_sid: intent_sid, sid: sid, }
|
|
193
|
+
@uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Fields/#{@solution[:sid]}"
|
|
194
194
|
end
|
|
195
195
|
|
|
196
196
|
##
|
|
@@ -208,7 +208,7 @@ module Twilio
|
|
|
208
208
|
FieldInstance.new(
|
|
209
209
|
@version,
|
|
210
210
|
payload,
|
|
211
|
-
|
|
211
|
+
assistant_sid: @solution[:assistant_sid],
|
|
212
212
|
intent_sid: @solution[:intent_sid],
|
|
213
213
|
sid: @solution[:sid],
|
|
214
214
|
)
|
|
@@ -236,11 +236,11 @@ module Twilio
|
|
|
236
236
|
# Initialize the FieldInstance
|
|
237
237
|
# @param [Version] version Version that contains the resource
|
|
238
238
|
# @param [Hash] payload payload that contains response from Twilio
|
|
239
|
-
# @param [String]
|
|
239
|
+
# @param [String] assistant_sid The assistant_sid
|
|
240
240
|
# @param [String] intent_sid The intent_sid
|
|
241
241
|
# @param [String] sid The sid
|
|
242
242
|
# @return [FieldInstance] FieldInstance
|
|
243
|
-
def initialize(version, payload,
|
|
243
|
+
def initialize(version, payload, assistant_sid: nil, intent_sid: nil, sid: nil)
|
|
244
244
|
super(version)
|
|
245
245
|
|
|
246
246
|
# Marshaled Properties
|
|
@@ -250,7 +250,7 @@ module Twilio
|
|
|
250
250
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
251
251
|
'field_type' => payload['field_type'],
|
|
252
252
|
'intent_sid' => payload['intent_sid'],
|
|
253
|
-
'
|
|
253
|
+
'assistant_sid' => payload['assistant_sid'],
|
|
254
254
|
'sid' => payload['sid'],
|
|
255
255
|
'unique_name' => payload['unique_name'],
|
|
256
256
|
'url' => payload['url'],
|
|
@@ -259,7 +259,7 @@ module Twilio
|
|
|
259
259
|
# Context
|
|
260
260
|
@instance_context = nil
|
|
261
261
|
@params = {
|
|
262
|
-
'
|
|
262
|
+
'assistant_sid' => assistant_sid,
|
|
263
263
|
'intent_sid' => intent_sid,
|
|
264
264
|
'sid' => sid || @properties['sid'],
|
|
265
265
|
}
|
|
@@ -273,7 +273,7 @@ module Twilio
|
|
|
273
273
|
unless @instance_context
|
|
274
274
|
@instance_context = FieldContext.new(
|
|
275
275
|
@version,
|
|
276
|
-
@params['
|
|
276
|
+
@params['assistant_sid'],
|
|
277
277
|
@params['intent_sid'],
|
|
278
278
|
@params['sid'],
|
|
279
279
|
)
|
|
@@ -312,9 +312,9 @@ module Twilio
|
|
|
312
312
|
end
|
|
313
313
|
|
|
314
314
|
##
|
|
315
|
-
# @return [String] The
|
|
316
|
-
def
|
|
317
|
-
@properties['
|
|
315
|
+
# @return [String] The assistant_sid
|
|
316
|
+
def assistant_sid
|
|
317
|
+
@properties['assistant_sid']
|
|
318
318
|
end
|
|
319
319
|
|
|
320
320
|
##
|
|
@@ -8,7 +8,7 @@ module Twilio
|
|
|
8
8
|
module REST
|
|
9
9
|
class Preview < Domain
|
|
10
10
|
class Understand < Version
|
|
11
|
-
class
|
|
11
|
+
class AssistantContext < InstanceContext
|
|
12
12
|
class IntentContext < InstanceContext
|
|
13
13
|
##
|
|
14
14
|
# 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,15 +16,15 @@ module Twilio
|
|
|
16
16
|
##
|
|
17
17
|
# Initialize the SampleList
|
|
18
18
|
# @param [Version] version Version that contains the resource
|
|
19
|
-
# @param [String]
|
|
19
|
+
# @param [String] assistant_sid The assistant_sid
|
|
20
20
|
# @param [String] intent_sid The intent_sid
|
|
21
21
|
# @return [SampleList] SampleList
|
|
22
|
-
def initialize(version,
|
|
22
|
+
def initialize(version, assistant_sid: nil, intent_sid: nil)
|
|
23
23
|
super(version)
|
|
24
24
|
|
|
25
25
|
# Path Solution
|
|
26
|
-
@solution = {
|
|
27
|
-
@uri = "/
|
|
26
|
+
@solution = {assistant_sid: assistant_sid, intent_sid: intent_sid}
|
|
27
|
+
@uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Samples"
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
##
|
|
@@ -118,9 +118,14 @@ module Twilio
|
|
|
118
118
|
# Request is executed immediately.
|
|
119
119
|
# @param [String] language The language
|
|
120
120
|
# @param [String] tagged_text The tagged_text
|
|
121
|
+
# @param [String] source_channel The source_channel
|
|
121
122
|
# @return [SampleInstance] Newly created SampleInstance
|
|
122
|
-
def create(language: nil, tagged_text: nil)
|
|
123
|
-
data = Twilio::Values.of({
|
|
123
|
+
def create(language: nil, tagged_text: nil, source_channel: :unset)
|
|
124
|
+
data = Twilio::Values.of({
|
|
125
|
+
'Language' => language,
|
|
126
|
+
'TaggedText' => tagged_text,
|
|
127
|
+
'SourceChannel' => source_channel,
|
|
128
|
+
})
|
|
124
129
|
|
|
125
130
|
payload = @version.create(
|
|
126
131
|
'POST',
|
|
@@ -131,7 +136,7 @@ module Twilio
|
|
|
131
136
|
SampleInstance.new(
|
|
132
137
|
@version,
|
|
133
138
|
payload,
|
|
134
|
-
|
|
139
|
+
assistant_sid: @solution[:assistant_sid],
|
|
135
140
|
intent_sid: @solution[:intent_sid],
|
|
136
141
|
)
|
|
137
142
|
end
|
|
@@ -167,7 +172,7 @@ module Twilio
|
|
|
167
172
|
SampleInstance.new(
|
|
168
173
|
@version,
|
|
169
174
|
payload,
|
|
170
|
-
|
|
175
|
+
assistant_sid: @solution[:assistant_sid],
|
|
171
176
|
intent_sid: @solution[:intent_sid],
|
|
172
177
|
)
|
|
173
178
|
end
|
|
@@ -185,16 +190,16 @@ module Twilio
|
|
|
185
190
|
##
|
|
186
191
|
# Initialize the SampleContext
|
|
187
192
|
# @param [Version] version Version that contains the resource
|
|
188
|
-
# @param [String]
|
|
193
|
+
# @param [String] assistant_sid The assistant_sid
|
|
189
194
|
# @param [String] intent_sid The intent_sid
|
|
190
195
|
# @param [String] sid The sid
|
|
191
196
|
# @return [SampleContext] SampleContext
|
|
192
|
-
def initialize(version,
|
|
197
|
+
def initialize(version, assistant_sid, intent_sid, sid)
|
|
193
198
|
super(version)
|
|
194
199
|
|
|
195
200
|
# Path Solution
|
|
196
|
-
@solution = {
|
|
197
|
-
@uri = "/
|
|
201
|
+
@solution = {assistant_sid: assistant_sid, intent_sid: intent_sid, sid: sid, }
|
|
202
|
+
@uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Samples/#{@solution[:sid]}"
|
|
198
203
|
end
|
|
199
204
|
|
|
200
205
|
##
|
|
@@ -212,7 +217,7 @@ module Twilio
|
|
|
212
217
|
SampleInstance.new(
|
|
213
218
|
@version,
|
|
214
219
|
payload,
|
|
215
|
-
|
|
220
|
+
assistant_sid: @solution[:assistant_sid],
|
|
216
221
|
intent_sid: @solution[:intent_sid],
|
|
217
222
|
sid: @solution[:sid],
|
|
218
223
|
)
|
|
@@ -222,9 +227,14 @@ module Twilio
|
|
|
222
227
|
# Update the SampleInstance
|
|
223
228
|
# @param [String] language The language
|
|
224
229
|
# @param [String] tagged_text The tagged_text
|
|
230
|
+
# @param [String] source_channel The source_channel
|
|
225
231
|
# @return [SampleInstance] Updated SampleInstance
|
|
226
|
-
def update(language: :unset, tagged_text: :unset)
|
|
227
|
-
data = Twilio::Values.of({
|
|
232
|
+
def update(language: :unset, tagged_text: :unset, source_channel: :unset)
|
|
233
|
+
data = Twilio::Values.of({
|
|
234
|
+
'Language' => language,
|
|
235
|
+
'TaggedText' => tagged_text,
|
|
236
|
+
'SourceChannel' => source_channel,
|
|
237
|
+
})
|
|
228
238
|
|
|
229
239
|
payload = @version.update(
|
|
230
240
|
'POST',
|
|
@@ -235,7 +245,7 @@ module Twilio
|
|
|
235
245
|
SampleInstance.new(
|
|
236
246
|
@version,
|
|
237
247
|
payload,
|
|
238
|
-
|
|
248
|
+
assistant_sid: @solution[:assistant_sid],
|
|
239
249
|
intent_sid: @solution[:intent_sid],
|
|
240
250
|
sid: @solution[:sid],
|
|
241
251
|
)
|
|
@@ -263,11 +273,11 @@ module Twilio
|
|
|
263
273
|
# Initialize the SampleInstance
|
|
264
274
|
# @param [Version] version Version that contains the resource
|
|
265
275
|
# @param [Hash] payload payload that contains response from Twilio
|
|
266
|
-
# @param [String]
|
|
276
|
+
# @param [String] assistant_sid The assistant_sid
|
|
267
277
|
# @param [String] intent_sid The intent_sid
|
|
268
278
|
# @param [String] sid The sid
|
|
269
279
|
# @return [SampleInstance] SampleInstance
|
|
270
|
-
def initialize(version, payload,
|
|
280
|
+
def initialize(version, payload, assistant_sid: nil, intent_sid: nil, sid: nil)
|
|
271
281
|
super(version)
|
|
272
282
|
|
|
273
283
|
# Marshaled Properties
|
|
@@ -277,16 +287,17 @@ module Twilio
|
|
|
277
287
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
278
288
|
'intent_sid' => payload['intent_sid'],
|
|
279
289
|
'language' => payload['language'],
|
|
280
|
-
'
|
|
290
|
+
'assistant_sid' => payload['assistant_sid'],
|
|
281
291
|
'sid' => payload['sid'],
|
|
282
292
|
'tagged_text' => payload['tagged_text'],
|
|
283
293
|
'url' => payload['url'],
|
|
294
|
+
'source_channel' => payload['source_channel'],
|
|
284
295
|
}
|
|
285
296
|
|
|
286
297
|
# Context
|
|
287
298
|
@instance_context = nil
|
|
288
299
|
@params = {
|
|
289
|
-
'
|
|
300
|
+
'assistant_sid' => assistant_sid,
|
|
290
301
|
'intent_sid' => intent_sid,
|
|
291
302
|
'sid' => sid || @properties['sid'],
|
|
292
303
|
}
|
|
@@ -300,7 +311,7 @@ module Twilio
|
|
|
300
311
|
unless @instance_context
|
|
301
312
|
@instance_context = SampleContext.new(
|
|
302
313
|
@version,
|
|
303
|
-
@params['
|
|
314
|
+
@params['assistant_sid'],
|
|
304
315
|
@params['intent_sid'],
|
|
305
316
|
@params['sid'],
|
|
306
317
|
)
|
|
@@ -339,9 +350,9 @@ module Twilio
|
|
|
339
350
|
end
|
|
340
351
|
|
|
341
352
|
##
|
|
342
|
-
# @return [String] The
|
|
343
|
-
def
|
|
344
|
-
@properties['
|
|
353
|
+
# @return [String] The assistant_sid
|
|
354
|
+
def assistant_sid
|
|
355
|
+
@properties['assistant_sid']
|
|
345
356
|
end
|
|
346
357
|
|
|
347
358
|
##
|
|
@@ -362,6 +373,12 @@ module Twilio
|
|
|
362
373
|
@properties['url']
|
|
363
374
|
end
|
|
364
375
|
|
|
376
|
+
##
|
|
377
|
+
# @return [String] The source_channel
|
|
378
|
+
def source_channel
|
|
379
|
+
@properties['source_channel']
|
|
380
|
+
end
|
|
381
|
+
|
|
365
382
|
##
|
|
366
383
|
# Fetch a SampleInstance
|
|
367
384
|
# @return [SampleInstance] Fetched SampleInstance
|
|
@@ -373,9 +390,10 @@ module Twilio
|
|
|
373
390
|
# Update the SampleInstance
|
|
374
391
|
# @param [String] language The language
|
|
375
392
|
# @param [String] tagged_text The tagged_text
|
|
393
|
+
# @param [String] source_channel The source_channel
|
|
376
394
|
# @return [SampleInstance] Updated SampleInstance
|
|
377
|
-
def update(language: :unset, tagged_text: :unset)
|
|
378
|
-
context.update(language: language, tagged_text: tagged_text, )
|
|
395
|
+
def update(language: :unset, tagged_text: :unset, source_channel: :unset)
|
|
396
|
+
context.update(language: language, tagged_text: tagged_text, source_channel: source_channel, )
|
|
379
397
|
end
|
|
380
398
|
|
|
381
399
|
##
|
|
@@ -8,21 +8,21 @@ module Twilio
|
|
|
8
8
|
module REST
|
|
9
9
|
class Preview < Domain
|
|
10
10
|
class Understand < Version
|
|
11
|
-
class
|
|
11
|
+
class AssistantContext < InstanceContext
|
|
12
12
|
##
|
|
13
13
|
# 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.
|
|
14
14
|
class ModelBuildList < ListResource
|
|
15
15
|
##
|
|
16
16
|
# Initialize the ModelBuildList
|
|
17
17
|
# @param [Version] version Version that contains the resource
|
|
18
|
-
# @param [String]
|
|
18
|
+
# @param [String] assistant_sid The assistant_sid
|
|
19
19
|
# @return [ModelBuildList] ModelBuildList
|
|
20
|
-
def initialize(version,
|
|
20
|
+
def initialize(version, assistant_sid: nil)
|
|
21
21
|
super(version)
|
|
22
22
|
|
|
23
23
|
# Path Solution
|
|
24
|
-
@solution = {
|
|
25
|
-
@uri = "/
|
|
24
|
+
@solution = {assistant_sid: assistant_sid}
|
|
25
|
+
@uri = "/Assistants/#{@solution[:assistant_sid]}/ModelBuilds"
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
##
|
|
@@ -122,7 +122,7 @@ module Twilio
|
|
|
122
122
|
data: data
|
|
123
123
|
)
|
|
124
124
|
|
|
125
|
-
ModelBuildInstance.new(@version, payload,
|
|
125
|
+
ModelBuildInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], )
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
##
|
|
@@ -153,7 +153,7 @@ module Twilio
|
|
|
153
153
|
# @param [Hash] payload Payload response from the API
|
|
154
154
|
# @return [ModelBuildInstance] ModelBuildInstance
|
|
155
155
|
def get_instance(payload)
|
|
156
|
-
ModelBuildInstance.new(@version, payload,
|
|
156
|
+
ModelBuildInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], )
|
|
157
157
|
end
|
|
158
158
|
|
|
159
159
|
##
|
|
@@ -169,15 +169,15 @@ module Twilio
|
|
|
169
169
|
##
|
|
170
170
|
# Initialize the ModelBuildContext
|
|
171
171
|
# @param [Version] version Version that contains the resource
|
|
172
|
-
# @param [String]
|
|
172
|
+
# @param [String] assistant_sid The assistant_sid
|
|
173
173
|
# @param [String] sid The sid
|
|
174
174
|
# @return [ModelBuildContext] ModelBuildContext
|
|
175
|
-
def initialize(version,
|
|
175
|
+
def initialize(version, assistant_sid, sid)
|
|
176
176
|
super(version)
|
|
177
177
|
|
|
178
178
|
# Path Solution
|
|
179
|
-
@solution = {
|
|
180
|
-
@uri = "/
|
|
179
|
+
@solution = {assistant_sid: assistant_sid, sid: sid, }
|
|
180
|
+
@uri = "/Assistants/#{@solution[:assistant_sid]}/ModelBuilds/#{@solution[:sid]}"
|
|
181
181
|
end
|
|
182
182
|
|
|
183
183
|
##
|
|
@@ -195,7 +195,7 @@ module Twilio
|
|
|
195
195
|
ModelBuildInstance.new(
|
|
196
196
|
@version,
|
|
197
197
|
payload,
|
|
198
|
-
|
|
198
|
+
assistant_sid: @solution[:assistant_sid],
|
|
199
199
|
sid: @solution[:sid],
|
|
200
200
|
)
|
|
201
201
|
end
|
|
@@ -216,7 +216,7 @@ module Twilio
|
|
|
216
216
|
ModelBuildInstance.new(
|
|
217
217
|
@version,
|
|
218
218
|
payload,
|
|
219
|
-
|
|
219
|
+
assistant_sid: @solution[:assistant_sid],
|
|
220
220
|
sid: @solution[:sid],
|
|
221
221
|
)
|
|
222
222
|
end
|
|
@@ -243,10 +243,10 @@ module Twilio
|
|
|
243
243
|
# Initialize the ModelBuildInstance
|
|
244
244
|
# @param [Version] version Version that contains the resource
|
|
245
245
|
# @param [Hash] payload payload that contains response from Twilio
|
|
246
|
-
# @param [String]
|
|
246
|
+
# @param [String] assistant_sid The assistant_sid
|
|
247
247
|
# @param [String] sid The sid
|
|
248
248
|
# @return [ModelBuildInstance] ModelBuildInstance
|
|
249
|
-
def initialize(version, payload,
|
|
249
|
+
def initialize(version, payload, assistant_sid: nil, sid: nil)
|
|
250
250
|
super(version)
|
|
251
251
|
|
|
252
252
|
# Marshaled Properties
|
|
@@ -254,7 +254,7 @@ module Twilio
|
|
|
254
254
|
'account_sid' => payload['account_sid'],
|
|
255
255
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
256
256
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
257
|
-
'
|
|
257
|
+
'assistant_sid' => payload['assistant_sid'],
|
|
258
258
|
'sid' => payload['sid'],
|
|
259
259
|
'status' => payload['status'],
|
|
260
260
|
'unique_name' => payload['unique_name'],
|
|
@@ -265,7 +265,7 @@ module Twilio
|
|
|
265
265
|
|
|
266
266
|
# Context
|
|
267
267
|
@instance_context = nil
|
|
268
|
-
@params = {'
|
|
268
|
+
@params = {'assistant_sid' => assistant_sid, 'sid' => sid || @properties['sid'], }
|
|
269
269
|
end
|
|
270
270
|
|
|
271
271
|
##
|
|
@@ -274,7 +274,7 @@ module Twilio
|
|
|
274
274
|
# @return [ModelBuildContext] ModelBuildContext for this ModelBuildInstance
|
|
275
275
|
def context
|
|
276
276
|
unless @instance_context
|
|
277
|
-
@instance_context = ModelBuildContext.new(@version, @params['
|
|
277
|
+
@instance_context = ModelBuildContext.new(@version, @params['assistant_sid'], @params['sid'], )
|
|
278
278
|
end
|
|
279
279
|
@instance_context
|
|
280
280
|
end
|
|
@@ -298,9 +298,9 @@ module Twilio
|
|
|
298
298
|
end
|
|
299
299
|
|
|
300
300
|
##
|
|
301
|
-
# @return [String] The
|
|
302
|
-
def
|
|
303
|
-
@properties['
|
|
301
|
+
# @return [String] The assistant_sid
|
|
302
|
+
def assistant_sid
|
|
303
|
+
@properties['assistant_sid']
|
|
304
304
|
end
|
|
305
305
|
|
|
306
306
|
##
|