twilio-ruby 5.67.3 → 5.74.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +288 -0
- data/LICENSE +1 -1
- data/Makefile +6 -2
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +28 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
- data/lib/twilio-ruby/rest/content/v1.rb +52 -0
- data/lib/twilio-ruby/rest/content.rb +53 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +22 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +115 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
- data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
- data/lib/twilio-ruby/rest/flex_api.rb +83 -0
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +14 -0
- data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
- data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
- data/lib/twilio-ruby/rest/insights.rb +0 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +94 -12
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -9
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +5 -5
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +709 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +50 -0
- data/lib/twilio-ruby/rest/messaging.rb +26 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +330 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
- data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → microvisor/v1/device/device_secret.rb} +125 -84
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +393 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +92 -0
- data/lib/twilio-ruby/rest/microvisor.rb +70 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
- data/lib/twilio-ruby/rest/oauth.rb +68 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +0 -58
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
- data/lib/twilio-ruby/rest/routes.rb +62 -0
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +17 -7
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +6 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -10
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +8 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
- data/lib/twilio-ruby/rest/verify.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/security/request_validator.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +135 -35
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +52 -17
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -1,277 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Preview < Domain
|
12
|
-
class TrustedComms < Version
|
13
|
-
##
|
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.
|
15
|
-
class CurrentCallList < ListResource
|
16
|
-
##
|
17
|
-
# Initialize the CurrentCallList
|
18
|
-
# @param [Version] version Version that contains the resource
|
19
|
-
# @return [CurrentCallList] CurrentCallList
|
20
|
-
def initialize(version)
|
21
|
-
super(version)
|
22
|
-
|
23
|
-
# Path Solution
|
24
|
-
@solution = {}
|
25
|
-
end
|
26
|
-
|
27
|
-
##
|
28
|
-
# Provide a user friendly representation
|
29
|
-
def to_s
|
30
|
-
'#<Twilio.Preview.TrustedComms.CurrentCallList>'
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
##
|
35
|
-
# 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.
|
36
|
-
class CurrentCallPage < Page
|
37
|
-
##
|
38
|
-
# Initialize the CurrentCallPage
|
39
|
-
# @param [Version] version Version that contains the resource
|
40
|
-
# @param [Response] response Response from the API
|
41
|
-
# @param [Hash] solution Path solution for the resource
|
42
|
-
# @return [CurrentCallPage] CurrentCallPage
|
43
|
-
def initialize(version, response, solution)
|
44
|
-
super(version, response)
|
45
|
-
|
46
|
-
# Path Solution
|
47
|
-
@solution = solution
|
48
|
-
end
|
49
|
-
|
50
|
-
##
|
51
|
-
# Build an instance of CurrentCallInstance
|
52
|
-
# @param [Hash] payload Payload response from the API
|
53
|
-
# @return [CurrentCallInstance] CurrentCallInstance
|
54
|
-
def get_instance(payload)
|
55
|
-
CurrentCallInstance.new(@version, payload, )
|
56
|
-
end
|
57
|
-
|
58
|
-
##
|
59
|
-
# Provide a user friendly representation
|
60
|
-
def to_s
|
61
|
-
'<Twilio.Preview.TrustedComms.CurrentCallPage>'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
##
|
66
|
-
# 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.
|
67
|
-
class CurrentCallContext < InstanceContext
|
68
|
-
##
|
69
|
-
# Initialize the CurrentCallContext
|
70
|
-
# @param [Version] version Version that contains the resource
|
71
|
-
# @return [CurrentCallContext] CurrentCallContext
|
72
|
-
def initialize(version)
|
73
|
-
super(version)
|
74
|
-
|
75
|
-
# Path Solution
|
76
|
-
@solution = {}
|
77
|
-
@uri = "/CurrentCall"
|
78
|
-
end
|
79
|
-
|
80
|
-
##
|
81
|
-
# Fetch the CurrentCallInstance
|
82
|
-
# @param [String] x_xcnam_sensitive_phone_number_from The originating Phone
|
83
|
-
# Number, given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
|
84
|
-
# This phone number should be a Twilio number, otherwise it will return an error
|
85
|
-
# with HTTP Status Code 400.
|
86
|
-
# @param [String] x_xcnam_sensitive_phone_number_to The terminating Phone Number,
|
87
|
-
# given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
|
88
|
-
# @return [CurrentCallInstance] Fetched CurrentCallInstance
|
89
|
-
def fetch(x_xcnam_sensitive_phone_number_from: :unset, x_xcnam_sensitive_phone_number_to: :unset)
|
90
|
-
headers = Twilio::Values.of({
|
91
|
-
'X-Xcnam-Sensitive-Phone-Number-From' => x_xcnam_sensitive_phone_number_from,
|
92
|
-
'X-Xcnam-Sensitive-Phone-Number-To' => x_xcnam_sensitive_phone_number_to,
|
93
|
-
})
|
94
|
-
|
95
|
-
payload = @version.fetch('GET', @uri, headers: headers)
|
96
|
-
|
97
|
-
CurrentCallInstance.new(@version, payload, )
|
98
|
-
end
|
99
|
-
|
100
|
-
##
|
101
|
-
# Provide a user friendly representation
|
102
|
-
def to_s
|
103
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
104
|
-
"#<Twilio.Preview.TrustedComms.CurrentCallContext #{context}>"
|
105
|
-
end
|
106
|
-
|
107
|
-
##
|
108
|
-
# Provide a detailed, user friendly representation
|
109
|
-
def inspect
|
110
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
111
|
-
"#<Twilio.Preview.TrustedComms.CurrentCallContext #{context}>"
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
##
|
116
|
-
# 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.
|
117
|
-
class CurrentCallInstance < InstanceResource
|
118
|
-
##
|
119
|
-
# Initialize the CurrentCallInstance
|
120
|
-
# @param [Version] version Version that contains the resource
|
121
|
-
# @param [Hash] payload payload that contains response from Twilio
|
122
|
-
# @return [CurrentCallInstance] CurrentCallInstance
|
123
|
-
def initialize(version, payload)
|
124
|
-
super(version)
|
125
|
-
|
126
|
-
# Marshaled Properties
|
127
|
-
@properties = {
|
128
|
-
'bg_color' => payload['bg_color'],
|
129
|
-
'caller' => payload['caller'],
|
130
|
-
'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
|
131
|
-
'font_color' => payload['font_color'],
|
132
|
-
'from' => payload['from'],
|
133
|
-
'logo' => payload['logo'],
|
134
|
-
'manager' => payload['manager'],
|
135
|
-
'reason' => payload['reason'],
|
136
|
-
'shield_img' => payload['shield_img'],
|
137
|
-
'sid' => payload['sid'],
|
138
|
-
'status' => payload['status'],
|
139
|
-
'to' => payload['to'],
|
140
|
-
'url' => payload['url'],
|
141
|
-
'use_case' => payload['use_case'],
|
142
|
-
}
|
143
|
-
|
144
|
-
# Context
|
145
|
-
@instance_context = nil
|
146
|
-
@params = {}
|
147
|
-
end
|
148
|
-
|
149
|
-
##
|
150
|
-
# Generate an instance context for the instance, the context is capable of
|
151
|
-
# performing various actions. All instance actions are proxied to the context
|
152
|
-
# @return [CurrentCallContext] CurrentCallContext for this CurrentCallInstance
|
153
|
-
def context
|
154
|
-
unless @instance_context
|
155
|
-
@instance_context = CurrentCallContext.new(@version, )
|
156
|
-
end
|
157
|
-
@instance_context
|
158
|
-
end
|
159
|
-
|
160
|
-
##
|
161
|
-
# @return [String] Background color of the current phone call
|
162
|
-
def bg_color
|
163
|
-
@properties['bg_color']
|
164
|
-
end
|
165
|
-
|
166
|
-
##
|
167
|
-
# @return [String] Caller name of the current phone call
|
168
|
-
def caller
|
169
|
-
@properties['caller']
|
170
|
-
end
|
171
|
-
|
172
|
-
##
|
173
|
-
# @return [Time] The date this current phone call was created
|
174
|
-
def created_at
|
175
|
-
@properties['created_at']
|
176
|
-
end
|
177
|
-
|
178
|
-
##
|
179
|
-
# @return [String] Font color of the current phone call
|
180
|
-
def font_color
|
181
|
-
@properties['font_color']
|
182
|
-
end
|
183
|
-
|
184
|
-
##
|
185
|
-
# @return [String] The originating phone number
|
186
|
-
def from
|
187
|
-
@properties['from']
|
188
|
-
end
|
189
|
-
|
190
|
-
##
|
191
|
-
# @return [String] Logo URL of the caller
|
192
|
-
def logo
|
193
|
-
@properties['logo']
|
194
|
-
end
|
195
|
-
|
196
|
-
##
|
197
|
-
# @return [String] The name of the CPS organization
|
198
|
-
def manager
|
199
|
-
@properties['manager']
|
200
|
-
end
|
201
|
-
|
202
|
-
##
|
203
|
-
# @return [String] The business reason for this current phone call
|
204
|
-
def reason
|
205
|
-
@properties['reason']
|
206
|
-
end
|
207
|
-
|
208
|
-
##
|
209
|
-
# @return [String] Shield image URL that serves as authenticity proof of the current phone call
|
210
|
-
def shield_img
|
211
|
-
@properties['shield_img']
|
212
|
-
end
|
213
|
-
|
214
|
-
##
|
215
|
-
# @return [String] A string that uniquely identifies this current branded phone call.
|
216
|
-
def sid
|
217
|
-
@properties['sid']
|
218
|
-
end
|
219
|
-
|
220
|
-
##
|
221
|
-
# @return [String] The status of the current phone call
|
222
|
-
def status
|
223
|
-
@properties['status']
|
224
|
-
end
|
225
|
-
|
226
|
-
##
|
227
|
-
# @return [String] The terminating phone number
|
228
|
-
def to
|
229
|
-
@properties['to']
|
230
|
-
end
|
231
|
-
|
232
|
-
##
|
233
|
-
# @return [String] The URL of this resource.
|
234
|
-
def url
|
235
|
-
@properties['url']
|
236
|
-
end
|
237
|
-
|
238
|
-
##
|
239
|
-
# @return [String] The use case for the current phone call
|
240
|
-
def use_case
|
241
|
-
@properties['use_case']
|
242
|
-
end
|
243
|
-
|
244
|
-
##
|
245
|
-
# Fetch the CurrentCallInstance
|
246
|
-
# @param [String] x_xcnam_sensitive_phone_number_from The originating Phone
|
247
|
-
# Number, given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
|
248
|
-
# This phone number should be a Twilio number, otherwise it will return an error
|
249
|
-
# with HTTP Status Code 400.
|
250
|
-
# @param [String] x_xcnam_sensitive_phone_number_to The terminating Phone Number,
|
251
|
-
# given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
|
252
|
-
# @return [CurrentCallInstance] Fetched CurrentCallInstance
|
253
|
-
def fetch(x_xcnam_sensitive_phone_number_from: :unset, x_xcnam_sensitive_phone_number_to: :unset)
|
254
|
-
context.fetch(
|
255
|
-
x_xcnam_sensitive_phone_number_from: x_xcnam_sensitive_phone_number_from,
|
256
|
-
x_xcnam_sensitive_phone_number_to: x_xcnam_sensitive_phone_number_to,
|
257
|
-
)
|
258
|
-
end
|
259
|
-
|
260
|
-
##
|
261
|
-
# Provide a user friendly representation
|
262
|
-
def to_s
|
263
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
264
|
-
"<Twilio.Preview.TrustedComms.CurrentCallInstance #{values}>"
|
265
|
-
end
|
266
|
-
|
267
|
-
##
|
268
|
-
# Provide a detailed, user friendly representation
|
269
|
-
def inspect
|
270
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
271
|
-
"<Twilio.Preview.TrustedComms.CurrentCallInstance #{values}>"
|
272
|
-
end
|
273
|
-
end
|
274
|
-
end
|
275
|
-
end
|
276
|
-
end
|
277
|
-
end
|
@@ -1,65 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Preview
|
12
|
-
class TrustedComms < Version
|
13
|
-
##
|
14
|
-
# Initialize the TrustedComms version of Preview
|
15
|
-
def initialize(domain)
|
16
|
-
super
|
17
|
-
@version = 'TrustedComms'
|
18
|
-
@branded_channels = nil
|
19
|
-
@brands_information = nil
|
20
|
-
@cps = nil
|
21
|
-
@current_calls = nil
|
22
|
-
end
|
23
|
-
|
24
|
-
##
|
25
|
-
# @param [String] sid The unique SID identifier of the Branded Channel.
|
26
|
-
# @return [Twilio::REST::Preview::TrustedComms::BrandedChannelContext] if sid was passed.
|
27
|
-
# @return [Twilio::REST::Preview::TrustedComms::BrandedChannelList]
|
28
|
-
def branded_channels(sid=:unset)
|
29
|
-
if sid.nil?
|
30
|
-
raise ArgumentError, 'sid cannot be nil'
|
31
|
-
end
|
32
|
-
if sid == :unset
|
33
|
-
@branded_channels ||= BrandedChannelList.new self
|
34
|
-
else
|
35
|
-
BrandedChannelContext.new(self, sid)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
##
|
40
|
-
# @return [Twilio::REST::Preview::TrustedComms::BrandsInformationContext]
|
41
|
-
def brands_information
|
42
|
-
@brands_information ||= BrandsInformationContext.new self
|
43
|
-
end
|
44
|
-
|
45
|
-
##
|
46
|
-
# @return [Twilio::REST::Preview::TrustedComms::CpsContext]
|
47
|
-
def cps
|
48
|
-
@cps ||= CpsContext.new self
|
49
|
-
end
|
50
|
-
|
51
|
-
##
|
52
|
-
# @return [Twilio::REST::Preview::TrustedComms::CurrentCallContext]
|
53
|
-
def current_calls
|
54
|
-
@current_calls ||= CurrentCallContext.new self
|
55
|
-
end
|
56
|
-
|
57
|
-
##
|
58
|
-
# Provide a user friendly representation
|
59
|
-
def to_s
|
60
|
-
'<Twilio::REST::Preview::TrustedComms>'
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|