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,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 QueryList < ListResource
|
|
15
15
|
##
|
|
16
16
|
# Initialize the QueryList
|
|
17
17
|
# @param [Version] version Version that contains the resource
|
|
18
|
-
# @param [String]
|
|
18
|
+
# @param [String] assistant_sid The assistant_sid
|
|
19
19
|
# @return [QueryList] QueryList
|
|
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]}/Queries"
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
##
|
|
@@ -135,19 +135,17 @@ module Twilio
|
|
|
135
135
|
# Request is executed immediately.
|
|
136
136
|
# @param [String] language The language
|
|
137
137
|
# @param [String] query The query
|
|
138
|
-
# @param [String]
|
|
138
|
+
# @param [String] intents The intents
|
|
139
139
|
# @param [String] model_build The model_build
|
|
140
140
|
# @param [String] field The field
|
|
141
|
-
# @param [String] named_entity The named_entity
|
|
142
141
|
# @return [QueryInstance] Newly created QueryInstance
|
|
143
|
-
def create(language: nil, query: nil,
|
|
142
|
+
def create(language: nil, query: nil, intents: :unset, model_build: :unset, field: :unset)
|
|
144
143
|
data = Twilio::Values.of({
|
|
145
144
|
'Language' => language,
|
|
146
145
|
'Query' => query,
|
|
147
|
-
'
|
|
146
|
+
'Intents' => intents,
|
|
148
147
|
'ModelBuild' => model_build,
|
|
149
148
|
'Field' => field,
|
|
150
|
-
'NamedEntity' => named_entity,
|
|
151
149
|
})
|
|
152
150
|
|
|
153
151
|
payload = @version.create(
|
|
@@ -156,7 +154,7 @@ module Twilio
|
|
|
156
154
|
data: data
|
|
157
155
|
)
|
|
158
156
|
|
|
159
|
-
QueryInstance.new(@version, payload,
|
|
157
|
+
QueryInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], )
|
|
160
158
|
end
|
|
161
159
|
|
|
162
160
|
##
|
|
@@ -187,7 +185,7 @@ module Twilio
|
|
|
187
185
|
# @param [Hash] payload Payload response from the API
|
|
188
186
|
# @return [QueryInstance] QueryInstance
|
|
189
187
|
def get_instance(payload)
|
|
190
|
-
QueryInstance.new(@version, payload,
|
|
188
|
+
QueryInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], )
|
|
191
189
|
end
|
|
192
190
|
|
|
193
191
|
##
|
|
@@ -203,15 +201,15 @@ module Twilio
|
|
|
203
201
|
##
|
|
204
202
|
# Initialize the QueryContext
|
|
205
203
|
# @param [Version] version Version that contains the resource
|
|
206
|
-
# @param [String]
|
|
204
|
+
# @param [String] assistant_sid The assistant_sid
|
|
207
205
|
# @param [String] sid The sid
|
|
208
206
|
# @return [QueryContext] QueryContext
|
|
209
|
-
def initialize(version,
|
|
207
|
+
def initialize(version, assistant_sid, sid)
|
|
210
208
|
super(version)
|
|
211
209
|
|
|
212
210
|
# Path Solution
|
|
213
|
-
@solution = {
|
|
214
|
-
@uri = "/
|
|
211
|
+
@solution = {assistant_sid: assistant_sid, sid: sid, }
|
|
212
|
+
@uri = "/Assistants/#{@solution[:assistant_sid]}/Queries/#{@solution[:sid]}"
|
|
215
213
|
end
|
|
216
214
|
|
|
217
215
|
##
|
|
@@ -226,7 +224,7 @@ module Twilio
|
|
|
226
224
|
params,
|
|
227
225
|
)
|
|
228
226
|
|
|
229
|
-
QueryInstance.new(@version, payload,
|
|
227
|
+
QueryInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], sid: @solution[:sid], )
|
|
230
228
|
end
|
|
231
229
|
|
|
232
230
|
##
|
|
@@ -243,7 +241,7 @@ module Twilio
|
|
|
243
241
|
data: data,
|
|
244
242
|
)
|
|
245
243
|
|
|
246
|
-
QueryInstance.new(@version, payload,
|
|
244
|
+
QueryInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], sid: @solution[:sid], )
|
|
247
245
|
end
|
|
248
246
|
|
|
249
247
|
##
|
|
@@ -268,10 +266,10 @@ module Twilio
|
|
|
268
266
|
# Initialize the QueryInstance
|
|
269
267
|
# @param [Version] version Version that contains the resource
|
|
270
268
|
# @param [Hash] payload payload that contains response from Twilio
|
|
271
|
-
# @param [String]
|
|
269
|
+
# @param [String] assistant_sid The assistant_sid
|
|
272
270
|
# @param [String] sid The sid
|
|
273
271
|
# @return [QueryInstance] QueryInstance
|
|
274
|
-
def initialize(version, payload,
|
|
272
|
+
def initialize(version, payload, assistant_sid: nil, sid: nil)
|
|
275
273
|
super(version)
|
|
276
274
|
|
|
277
275
|
# Marshaled Properties
|
|
@@ -284,15 +282,16 @@ module Twilio
|
|
|
284
282
|
'model_build_sid' => payload['model_build_sid'],
|
|
285
283
|
'query' => payload['query'],
|
|
286
284
|
'sample_sid' => payload['sample_sid'],
|
|
287
|
-
'
|
|
285
|
+
'assistant_sid' => payload['assistant_sid'],
|
|
288
286
|
'sid' => payload['sid'],
|
|
289
287
|
'status' => payload['status'],
|
|
290
288
|
'url' => payload['url'],
|
|
289
|
+
'source_channel' => payload['source_channel'],
|
|
291
290
|
}
|
|
292
291
|
|
|
293
292
|
# Context
|
|
294
293
|
@instance_context = nil
|
|
295
|
-
@params = {'
|
|
294
|
+
@params = {'assistant_sid' => assistant_sid, 'sid' => sid || @properties['sid'], }
|
|
296
295
|
end
|
|
297
296
|
|
|
298
297
|
##
|
|
@@ -301,7 +300,7 @@ module Twilio
|
|
|
301
300
|
# @return [QueryContext] QueryContext for this QueryInstance
|
|
302
301
|
def context
|
|
303
302
|
unless @instance_context
|
|
304
|
-
@instance_context = QueryContext.new(@version, @params['
|
|
303
|
+
@instance_context = QueryContext.new(@version, @params['assistant_sid'], @params['sid'], )
|
|
305
304
|
end
|
|
306
305
|
@instance_context
|
|
307
306
|
end
|
|
@@ -355,9 +354,9 @@ module Twilio
|
|
|
355
354
|
end
|
|
356
355
|
|
|
357
356
|
##
|
|
358
|
-
# @return [String] The
|
|
359
|
-
def
|
|
360
|
-
@properties['
|
|
357
|
+
# @return [String] The assistant_sid
|
|
358
|
+
def assistant_sid
|
|
359
|
+
@properties['assistant_sid']
|
|
361
360
|
end
|
|
362
361
|
|
|
363
362
|
##
|
|
@@ -378,6 +377,12 @@ module Twilio
|
|
|
378
377
|
@properties['url']
|
|
379
378
|
end
|
|
380
379
|
|
|
380
|
+
##
|
|
381
|
+
# @return [String] The source_channel
|
|
382
|
+
def source_channel
|
|
383
|
+
@properties['source_channel']
|
|
384
|
+
end
|
|
385
|
+
|
|
381
386
|
##
|
|
382
387
|
# Fetch a QueryInstance
|
|
383
388
|
# @return [QueryInstance] Fetched QueryInstance
|
|
@@ -112,10 +112,14 @@ module Twilio
|
|
|
112
112
|
# Request is executed immediately.
|
|
113
113
|
# @param [String] to The to
|
|
114
114
|
# @param [String] from The from
|
|
115
|
-
# @param [
|
|
115
|
+
# @param [Hash] parameters The parameters
|
|
116
116
|
# @return [EngagementInstance] Newly created EngagementInstance
|
|
117
117
|
def create(to: nil, from: nil, parameters: :unset)
|
|
118
|
-
data = Twilio::Values.of({
|
|
118
|
+
data = Twilio::Values.of({
|
|
119
|
+
'To' => to,
|
|
120
|
+
'From' => from,
|
|
121
|
+
'Parameters' => Twilio.serialize_object(parameters),
|
|
122
|
+
})
|
|
119
123
|
|
|
120
124
|
payload = @version.create(
|
|
121
125
|
'POST',
|
|
@@ -235,7 +235,7 @@ module Twilio
|
|
|
235
235
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
236
236
|
'sid' => payload['sid'],
|
|
237
237
|
'source_sid' => payload['source_sid'],
|
|
238
|
-
'size' => payload['size']
|
|
238
|
+
'size' => payload['size'],
|
|
239
239
|
'url' => payload['url'],
|
|
240
240
|
'type' => payload['type'],
|
|
241
241
|
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
data/lib/twilio-ruby/version.rb
CHANGED
|
@@ -125,14 +125,14 @@ describe 'Aws' do
|
|
|
125
125
|
|
|
126
126
|
expect {
|
|
127
127
|
@client.accounts.v1.credentials \
|
|
128
|
-
.aws('
|
|
128
|
+
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
|
129
129
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
130
130
|
|
|
131
131
|
values = {}
|
|
132
132
|
expect(
|
|
133
133
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
134
134
|
method: 'get',
|
|
135
|
-
url: 'https://accounts.twilio.com/v1/Credentials/AWS/
|
|
135
|
+
url: 'https://accounts.twilio.com/v1/Credentials/AWS/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
|
136
136
|
))).to eq(true)
|
|
137
137
|
end
|
|
138
138
|
|
|
@@ -152,7 +152,7 @@ describe 'Aws' do
|
|
|
152
152
|
))
|
|
153
153
|
|
|
154
154
|
actual = @client.accounts.v1.credentials \
|
|
155
|
-
.aws('
|
|
155
|
+
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
|
156
156
|
|
|
157
157
|
expect(actual).to_not eq(nil)
|
|
158
158
|
end
|
|
@@ -162,14 +162,14 @@ describe 'Aws' do
|
|
|
162
162
|
|
|
163
163
|
expect {
|
|
164
164
|
@client.accounts.v1.credentials \
|
|
165
|
-
.aws('
|
|
165
|
+
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
|
166
166
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
167
167
|
|
|
168
168
|
values = {}
|
|
169
169
|
expect(
|
|
170
170
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
171
171
|
method: 'post',
|
|
172
|
-
url: 'https://accounts.twilio.com/v1/Credentials/AWS/
|
|
172
|
+
url: 'https://accounts.twilio.com/v1/Credentials/AWS/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
|
173
173
|
))).to eq(true)
|
|
174
174
|
end
|
|
175
175
|
|
|
@@ -189,7 +189,7 @@ describe 'Aws' do
|
|
|
189
189
|
))
|
|
190
190
|
|
|
191
191
|
actual = @client.accounts.v1.credentials \
|
|
192
|
-
.aws('
|
|
192
|
+
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
|
193
193
|
|
|
194
194
|
expect(actual).to_not eq(nil)
|
|
195
195
|
end
|
|
@@ -199,14 +199,14 @@ describe 'Aws' do
|
|
|
199
199
|
|
|
200
200
|
expect {
|
|
201
201
|
@client.accounts.v1.credentials \
|
|
202
|
-
.aws('
|
|
202
|
+
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
|
203
203
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
204
204
|
|
|
205
205
|
values = {}
|
|
206
206
|
expect(
|
|
207
207
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
208
208
|
method: 'delete',
|
|
209
|
-
url: 'https://accounts.twilio.com/v1/Credentials/AWS/
|
|
209
|
+
url: 'https://accounts.twilio.com/v1/Credentials/AWS/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
|
210
210
|
))).to eq(true)
|
|
211
211
|
end
|
|
212
212
|
|
|
@@ -217,7 +217,7 @@ describe 'Aws' do
|
|
|
217
217
|
))
|
|
218
218
|
|
|
219
219
|
actual = @client.accounts.v1.credentials \
|
|
220
|
-
.aws('
|
|
220
|
+
.aws('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
|
221
221
|
|
|
222
222
|
expect(actual).to eq(true)
|
|
223
223
|
end
|
|
@@ -125,14 +125,14 @@ describe 'PublicKey' do
|
|
|
125
125
|
|
|
126
126
|
expect {
|
|
127
127
|
@client.accounts.v1.credentials \
|
|
128
|
-
.public_key('
|
|
128
|
+
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
|
129
129
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
130
130
|
|
|
131
131
|
values = {}
|
|
132
132
|
expect(
|
|
133
133
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
134
134
|
method: 'get',
|
|
135
|
-
url: 'https://accounts.twilio.com/v1/Credentials/PublicKeys/
|
|
135
|
+
url: 'https://accounts.twilio.com/v1/Credentials/PublicKeys/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
|
136
136
|
))).to eq(true)
|
|
137
137
|
end
|
|
138
138
|
|
|
@@ -152,7 +152,7 @@ describe 'PublicKey' do
|
|
|
152
152
|
))
|
|
153
153
|
|
|
154
154
|
actual = @client.accounts.v1.credentials \
|
|
155
|
-
.public_key('
|
|
155
|
+
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
|
156
156
|
|
|
157
157
|
expect(actual).to_not eq(nil)
|
|
158
158
|
end
|
|
@@ -162,14 +162,14 @@ describe 'PublicKey' do
|
|
|
162
162
|
|
|
163
163
|
expect {
|
|
164
164
|
@client.accounts.v1.credentials \
|
|
165
|
-
.public_key('
|
|
165
|
+
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
|
166
166
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
167
167
|
|
|
168
168
|
values = {}
|
|
169
169
|
expect(
|
|
170
170
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
171
171
|
method: 'post',
|
|
172
|
-
url: 'https://accounts.twilio.com/v1/Credentials/PublicKeys/
|
|
172
|
+
url: 'https://accounts.twilio.com/v1/Credentials/PublicKeys/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
|
173
173
|
))).to eq(true)
|
|
174
174
|
end
|
|
175
175
|
|
|
@@ -189,7 +189,7 @@ describe 'PublicKey' do
|
|
|
189
189
|
))
|
|
190
190
|
|
|
191
191
|
actual = @client.accounts.v1.credentials \
|
|
192
|
-
.public_key('
|
|
192
|
+
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
|
193
193
|
|
|
194
194
|
expect(actual).to_not eq(nil)
|
|
195
195
|
end
|
|
@@ -199,14 +199,14 @@ describe 'PublicKey' do
|
|
|
199
199
|
|
|
200
200
|
expect {
|
|
201
201
|
@client.accounts.v1.credentials \
|
|
202
|
-
.public_key('
|
|
202
|
+
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
|
203
203
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
204
204
|
|
|
205
205
|
values = {}
|
|
206
206
|
expect(
|
|
207
207
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
208
208
|
method: 'delete',
|
|
209
|
-
url: 'https://accounts.twilio.com/v1/Credentials/PublicKeys/
|
|
209
|
+
url: 'https://accounts.twilio.com/v1/Credentials/PublicKeys/CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
|
210
210
|
))).to eq(true)
|
|
211
211
|
end
|
|
212
212
|
|
|
@@ -217,7 +217,7 @@ describe 'PublicKey' do
|
|
|
217
217
|
))
|
|
218
218
|
|
|
219
219
|
actual = @client.accounts.v1.credentials \
|
|
220
|
-
.public_key('
|
|
220
|
+
.public_key('CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
|
221
221
|
|
|
222
222
|
expect(actual).to eq(true)
|
|
223
223
|
end
|
|
@@ -11,8 +11,8 @@ describe 'DependentPhoneNumber' do
|
|
|
11
11
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
12
12
|
|
|
13
13
|
expect {
|
|
14
|
-
@client.api.v2010.accounts('
|
|
15
|
-
.addresses('
|
|
14
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
15
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
16
16
|
.dependent_phone_numbers.list()
|
|
17
17
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ describe 'DependentPhoneNumber' do
|
|
|
20
20
|
expect(
|
|
21
21
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
22
22
|
method: 'get',
|
|
23
|
-
url: 'https://api.twilio.com/2010-04-01/Accounts/
|
|
23
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/DependentPhoneNumbers.json',
|
|
24
24
|
))).to eq(true)
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -73,8 +73,8 @@ describe 'DependentPhoneNumber' do
|
|
|
73
73
|
]
|
|
74
74
|
))
|
|
75
75
|
|
|
76
|
-
actual = @client.api.v2010.accounts('
|
|
77
|
-
.addresses('
|
|
76
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
77
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
78
78
|
.dependent_phone_numbers.list()
|
|
79
79
|
|
|
80
80
|
expect(actual).to_not eq(nil)
|
|
@@ -96,8 +96,8 @@ describe 'DependentPhoneNumber' do
|
|
|
96
96
|
]
|
|
97
97
|
))
|
|
98
98
|
|
|
99
|
-
actual = @client.api.v2010.accounts('
|
|
100
|
-
.addresses('
|
|
99
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
100
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
101
101
|
.dependent_phone_numbers.list()
|
|
102
102
|
|
|
103
103
|
expect(actual).to_not eq(nil)
|
|
@@ -11,7 +11,7 @@ describe 'Address' do
|
|
|
11
11
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
12
12
|
|
|
13
13
|
expect {
|
|
14
|
-
@client.api.v2010.accounts('
|
|
14
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
15
15
|
.addresses.create(customer_name: 'customer_name', street: 'street', city: 'city', region: 'region', postal_code: 'postal_code', iso_country: 'US')
|
|
16
16
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
17
17
|
|
|
@@ -26,7 +26,7 @@ describe 'Address' do
|
|
|
26
26
|
expect(
|
|
27
27
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
28
28
|
method: 'post',
|
|
29
|
-
url: 'https://api.twilio.com/2010-04-01/Accounts/
|
|
29
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json',
|
|
30
30
|
data: values,
|
|
31
31
|
))).to eq(true)
|
|
32
32
|
end
|
|
@@ -54,7 +54,7 @@ describe 'Address' do
|
|
|
54
54
|
]
|
|
55
55
|
))
|
|
56
56
|
|
|
57
|
-
actual = @client.api.v2010.accounts('
|
|
57
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
58
58
|
.addresses.create(customer_name: 'customer_name', street: 'street', city: 'city', region: 'region', postal_code: 'postal_code', iso_country: 'US')
|
|
59
59
|
|
|
60
60
|
expect(actual).to_not eq(nil)
|
|
@@ -64,15 +64,15 @@ describe 'Address' do
|
|
|
64
64
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
65
65
|
|
|
66
66
|
expect {
|
|
67
|
-
@client.api.v2010.accounts('
|
|
68
|
-
.addresses('
|
|
67
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
68
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
|
69
69
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
70
70
|
|
|
71
71
|
values = {}
|
|
72
72
|
expect(
|
|
73
73
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
74
74
|
method: 'delete',
|
|
75
|
-
url: 'https://api.twilio.com/2010-04-01/Accounts/
|
|
75
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
|
|
76
76
|
))).to eq(true)
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -82,8 +82,8 @@ describe 'Address' do
|
|
|
82
82
|
nil,
|
|
83
83
|
))
|
|
84
84
|
|
|
85
|
-
actual = @client.api.v2010.accounts('
|
|
86
|
-
.addresses('
|
|
85
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
86
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
|
87
87
|
|
|
88
88
|
expect(actual).to eq(true)
|
|
89
89
|
end
|
|
@@ -92,15 +92,15 @@ describe 'Address' do
|
|
|
92
92
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
93
93
|
|
|
94
94
|
expect {
|
|
95
|
-
@client.api.v2010.accounts('
|
|
96
|
-
.addresses('
|
|
95
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
96
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
|
97
97
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
98
98
|
|
|
99
99
|
values = {}
|
|
100
100
|
expect(
|
|
101
101
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
102
102
|
method: 'get',
|
|
103
|
-
url: 'https://api.twilio.com/2010-04-01/Accounts/
|
|
103
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
|
|
104
104
|
))).to eq(true)
|
|
105
105
|
end
|
|
106
106
|
|
|
@@ -127,8 +127,8 @@ describe 'Address' do
|
|
|
127
127
|
]
|
|
128
128
|
))
|
|
129
129
|
|
|
130
|
-
actual = @client.api.v2010.accounts('
|
|
131
|
-
.addresses('
|
|
130
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
131
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
|
132
132
|
|
|
133
133
|
expect(actual).to_not eq(nil)
|
|
134
134
|
end
|
|
@@ -137,15 +137,15 @@ describe 'Address' do
|
|
|
137
137
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
138
138
|
|
|
139
139
|
expect {
|
|
140
|
-
@client.api.v2010.accounts('
|
|
141
|
-
.addresses('
|
|
140
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
141
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
|
142
142
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
143
143
|
|
|
144
144
|
values = {}
|
|
145
145
|
expect(
|
|
146
146
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
147
147
|
method: 'post',
|
|
148
|
-
url: 'https://api.twilio.com/2010-04-01/Accounts/
|
|
148
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses/ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
|
|
149
149
|
))).to eq(true)
|
|
150
150
|
end
|
|
151
151
|
|
|
@@ -172,8 +172,8 @@ describe 'Address' do
|
|
|
172
172
|
]
|
|
173
173
|
))
|
|
174
174
|
|
|
175
|
-
actual = @client.api.v2010.accounts('
|
|
176
|
-
.addresses('
|
|
175
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
176
|
+
.addresses('ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
|
177
177
|
|
|
178
178
|
expect(actual).to_not eq(nil)
|
|
179
179
|
end
|
|
@@ -182,7 +182,7 @@ describe 'Address' do
|
|
|
182
182
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
|
183
183
|
|
|
184
184
|
expect {
|
|
185
|
-
@client.api.v2010.accounts('
|
|
185
|
+
@client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
186
186
|
.addresses.list()
|
|
187
187
|
}.to raise_exception(Twilio::REST::TwilioError)
|
|
188
188
|
|
|
@@ -190,7 +190,7 @@ describe 'Address' do
|
|
|
190
190
|
expect(
|
|
191
191
|
@holodeck.has_request?(Holodeck::Request.new(
|
|
192
192
|
method: 'get',
|
|
193
|
-
url: 'https://api.twilio.com/2010-04-01/Accounts/
|
|
193
|
+
url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Addresses.json',
|
|
194
194
|
))).to eq(true)
|
|
195
195
|
end
|
|
196
196
|
|
|
@@ -232,7 +232,7 @@ describe 'Address' do
|
|
|
232
232
|
]
|
|
233
233
|
))
|
|
234
234
|
|
|
235
|
-
actual = @client.api.v2010.accounts('
|
|
235
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
236
236
|
.addresses.list()
|
|
237
237
|
|
|
238
238
|
expect(actual).to_not eq(nil)
|
|
@@ -259,7 +259,7 @@ describe 'Address' do
|
|
|
259
259
|
]
|
|
260
260
|
))
|
|
261
261
|
|
|
262
|
-
actual = @client.api.v2010.accounts('
|
|
262
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
|
263
263
|
.addresses.list()
|
|
264
264
|
|
|
265
265
|
expect(actual).to_not eq(nil)
|