twilio-ruby 5.72.0 → 5.77.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/.github/workflows/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +234 -0
- data/CONTRIBUTING.md +1 -7
- data/LICENSE +1 -1
- data/README.md +132 -45
- data/advanced-examples/custom-http-client.md +170 -0
- 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 +6 -6
- 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 +1 -1
- 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 +14 -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/content_and_approvals.rb +240 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
- data/lib/twilio-ruby/rest/content/v1.rb +59 -0
- data/lib/twilio-ruby/rest/content.rb +59 -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/conversation.rb +43 -5
- 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/conversations/v1/service/conversation.rb +43 -5
- 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/insights_assessments_comment.rb +314 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +216 -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.rb +122 -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 +89 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +16 -3
- 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/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 +88 -6
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -2
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +134 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +26 -3
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +242 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +226 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +218 -0
- 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 +165 -1
- data/lib/twilio-ruby/rest/messaging/v1.rb +75 -0
- data/lib/twilio-ruby/rest/messaging.rb +36 -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 +25 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +335 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +61 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +32 -0
- data/lib/twilio-ruby/rest/microvisor.rb +16 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +111 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +35 -0
- data/lib/twilio-ruby/rest/numbers.rb +13 -0
- 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 -33
- 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/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 +1 -1
- 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/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/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 +12 -6
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2/template.rb +10 -3
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- 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.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/twiml/voice_response.rb +132 -33
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +48 -12
- 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
|
@@ -0,0 +1,133 @@
|
|
|
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 FlexApi < Domain
|
|
12
|
+
class V2 < Version
|
|
13
|
+
class WebChannelsList < ListResource
|
|
14
|
+
##
|
|
15
|
+
# Initialize the WebChannelsList
|
|
16
|
+
# @param [Version] version Version that contains the resource
|
|
17
|
+
# @return [WebChannelsList] WebChannelsList
|
|
18
|
+
def initialize(version)
|
|
19
|
+
super(version)
|
|
20
|
+
|
|
21
|
+
# Path Solution
|
|
22
|
+
@solution = {}
|
|
23
|
+
@uri = "/WebChats"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
##
|
|
27
|
+
# Create the WebChannelsInstance
|
|
28
|
+
# @param [String] address_sid The SID of the Conversations Address. See {Address
|
|
29
|
+
# Configuration
|
|
30
|
+
# Resource}[https://www.twilio.com/docs/conversations/api/address-configuration-resource]
|
|
31
|
+
# for configuration details. When a conversation is created on the Flex backend,
|
|
32
|
+
# the callback URL will be set to the corresponding Studio Flow SID or webhook URL
|
|
33
|
+
# in your address configuration.
|
|
34
|
+
# @param [String] chat_friendly_name The Conversation's friendly name. See the
|
|
35
|
+
# {Conversation
|
|
36
|
+
# resource}[https://www.twilio.com/docs/conversations/api/conversation-resource]
|
|
37
|
+
# for an example.
|
|
38
|
+
# @param [String] customer_friendly_name The Conversation participant's friendly
|
|
39
|
+
# name. See the {Conversation Participant
|
|
40
|
+
# Resource}[https://www.twilio.com/docs/conversations/api/conversation-participant-resource]
|
|
41
|
+
# for an example.
|
|
42
|
+
# @param [String] pre_engagement_data The pre-engagement data.
|
|
43
|
+
# @return [WebChannelsInstance] Created WebChannelsInstance
|
|
44
|
+
def create(address_sid: nil, chat_friendly_name: :unset, customer_friendly_name: :unset, pre_engagement_data: :unset)
|
|
45
|
+
data = Twilio::Values.of({
|
|
46
|
+
'AddressSid' => address_sid,
|
|
47
|
+
'ChatFriendlyName' => chat_friendly_name,
|
|
48
|
+
'CustomerFriendlyName' => customer_friendly_name,
|
|
49
|
+
'PreEngagementData' => pre_engagement_data,
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
payload = @version.create('POST', @uri, data: data)
|
|
53
|
+
|
|
54
|
+
WebChannelsInstance.new(@version, payload, )
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
##
|
|
58
|
+
# Provide a user friendly representation
|
|
59
|
+
def to_s
|
|
60
|
+
'#<Twilio.FlexApi.V2.WebChannelsList>'
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
class WebChannelsPage < Page
|
|
65
|
+
##
|
|
66
|
+
# Initialize the WebChannelsPage
|
|
67
|
+
# @param [Version] version Version that contains the resource
|
|
68
|
+
# @param [Response] response Response from the API
|
|
69
|
+
# @param [Hash] solution Path solution for the resource
|
|
70
|
+
# @return [WebChannelsPage] WebChannelsPage
|
|
71
|
+
def initialize(version, response, solution)
|
|
72
|
+
super(version, response)
|
|
73
|
+
|
|
74
|
+
# Path Solution
|
|
75
|
+
@solution = solution
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
##
|
|
79
|
+
# Build an instance of WebChannelsInstance
|
|
80
|
+
# @param [Hash] payload Payload response from the API
|
|
81
|
+
# @return [WebChannelsInstance] WebChannelsInstance
|
|
82
|
+
def get_instance(payload)
|
|
83
|
+
WebChannelsInstance.new(@version, payload, )
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
##
|
|
87
|
+
# Provide a user friendly representation
|
|
88
|
+
def to_s
|
|
89
|
+
'<Twilio.FlexApi.V2.WebChannelsPage>'
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
class WebChannelsInstance < InstanceResource
|
|
94
|
+
##
|
|
95
|
+
# Initialize the WebChannelsInstance
|
|
96
|
+
# @param [Version] version Version that contains the resource
|
|
97
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
98
|
+
# @return [WebChannelsInstance] WebChannelsInstance
|
|
99
|
+
def initialize(version, payload)
|
|
100
|
+
super(version)
|
|
101
|
+
|
|
102
|
+
# Marshaled Properties
|
|
103
|
+
@properties = {'conversation_sid' => payload['conversation_sid'], 'identity' => payload['identity'], }
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
##
|
|
107
|
+
# @return [String] The unique string representing the Conversation resource created
|
|
108
|
+
def conversation_sid
|
|
109
|
+
@properties['conversation_sid']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
##
|
|
113
|
+
# @return [String] The unique string representing the User created
|
|
114
|
+
def identity
|
|
115
|
+
@properties['identity']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
##
|
|
119
|
+
# Provide a user friendly representation
|
|
120
|
+
def to_s
|
|
121
|
+
"<Twilio.FlexApi.V2.WebChannelsInstance>"
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
##
|
|
125
|
+
# Provide a detailed, user friendly representation
|
|
126
|
+
def inspect
|
|
127
|
+
"<Twilio.FlexApi.V2.WebChannelsInstance>"
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
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 FlexApi
|
|
12
|
+
class V2 < Version
|
|
13
|
+
##
|
|
14
|
+
# Initialize the V2 version of FlexApi
|
|
15
|
+
def initialize(domain)
|
|
16
|
+
super
|
|
17
|
+
@version = 'v2'
|
|
18
|
+
@web_channels = nil
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
##
|
|
22
|
+
# @return [Twilio::REST::Flex_api::V2::WebChannelsContext]
|
|
23
|
+
def web_channels
|
|
24
|
+
@web_channels ||= WebChannelsList.new self
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
##
|
|
28
|
+
# Provide a user friendly representation
|
|
29
|
+
def to_s
|
|
30
|
+
'<Twilio::REST::FlexApi::V2>'
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -20,6 +20,7 @@ module Twilio
|
|
|
20
20
|
|
|
21
21
|
# Versions
|
|
22
22
|
@v1 = nil
|
|
23
|
+
@v2 = nil
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
##
|
|
@@ -28,6 +29,12 @@ module Twilio
|
|
|
28
29
|
@v1 ||= V1.new self
|
|
29
30
|
end
|
|
30
31
|
|
|
32
|
+
##
|
|
33
|
+
# Version v2 of flex_api
|
|
34
|
+
def v2
|
|
35
|
+
@v2 ||= V2.new self
|
|
36
|
+
end
|
|
37
|
+
|
|
31
38
|
##
|
|
32
39
|
# @param [String] sid The unique string that we created to identify the Channel
|
|
33
40
|
# resource.
|
|
@@ -52,6 +59,82 @@ module Twilio
|
|
|
52
59
|
self.v1.flex_flow(sid)
|
|
53
60
|
end
|
|
54
61
|
|
|
62
|
+
##
|
|
63
|
+
# @param [String] assessment_id The unique id of the assessment
|
|
64
|
+
# @return [Twilio::REST::Flex_api::V1::AssessmentsInstance] if assessment_id was passed.
|
|
65
|
+
# @return [Twilio::REST::Flex_api::V1::AssessmentsList]
|
|
66
|
+
def assessments(assessment_id=:unset)
|
|
67
|
+
self.v1.assessments(assessment_id)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
##
|
|
71
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsAssessmentsCommentInstance]
|
|
72
|
+
def insights_assessments_comment
|
|
73
|
+
self.v1.insights_assessments_comment()
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
##
|
|
77
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsConversationsInstance]
|
|
78
|
+
def insights_conversations
|
|
79
|
+
self.v1.insights_conversations()
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# @param [String] id The unique id of this questionnaire
|
|
84
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesInstance] if id was passed.
|
|
85
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesList]
|
|
86
|
+
def insights_questionnaires(id=:unset)
|
|
87
|
+
self.v1.insights_questionnaires(id)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
##
|
|
91
|
+
# @param [String] category_id The unique ID for the category
|
|
92
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryInstance] if category_id was passed.
|
|
93
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesCategoryList]
|
|
94
|
+
def insights_questionnaires_category(category_id=:unset)
|
|
95
|
+
self.v1.insights_questionnaires_category(category_id)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
##
|
|
99
|
+
# @param [String] question_id The unique ID of the question
|
|
100
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionInstance] if question_id was passed.
|
|
101
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsQuestionnairesQuestionList]
|
|
102
|
+
def insights_questionnaires_question(question_id=:unset)
|
|
103
|
+
self.v1.insights_questionnaires_question(question_id)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
##
|
|
107
|
+
# @param [String] segment_id To unique id of the segment
|
|
108
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSegmentsInstance] if segment_id was passed.
|
|
109
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSegmentsList]
|
|
110
|
+
def insights_segments(segment_id=:unset)
|
|
111
|
+
self.v1.insights_segments(segment_id)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
##
|
|
115
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSessionInstance]
|
|
116
|
+
def insights_session
|
|
117
|
+
self.v1.insights_session()
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
##
|
|
121
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSettingsAnswerSetsInstance]
|
|
122
|
+
def insights_settings_answer_sets
|
|
123
|
+
self.v1.insights_settings_answer_sets()
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
##
|
|
127
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsSettingsCommentInstance]
|
|
128
|
+
def insights_settings_comment
|
|
129
|
+
self.v1.insights_settings_comment()
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
##
|
|
133
|
+
# @return [Twilio::REST::Flex_api::V1::InsightsUserRolesInstance]
|
|
134
|
+
def insights_user_roles
|
|
135
|
+
self.v1.insights_user_roles()
|
|
136
|
+
end
|
|
137
|
+
|
|
55
138
|
##
|
|
56
139
|
# @param [String] sid The unique string created by Twilio to identify an
|
|
57
140
|
# Interaction resource, prefixed with KD.
|
|
@@ -70,6 +153,12 @@ module Twilio
|
|
|
70
153
|
self.v1.web_channel(sid)
|
|
71
154
|
end
|
|
72
155
|
|
|
156
|
+
##
|
|
157
|
+
# @return [Twilio::REST::Flex_api::V2::WebChannelsInstance]
|
|
158
|
+
def web_channels
|
|
159
|
+
self.v2.web_channels()
|
|
160
|
+
end
|
|
161
|
+
|
|
73
162
|
##
|
|
74
163
|
# Provide a user friendly representation
|
|
75
164
|
def to_s
|
|
@@ -117,6 +117,7 @@ module Twilio
|
|
|
117
117
|
'call_sid' => payload['call_sid'],
|
|
118
118
|
'call_type' => payload['call_type'],
|
|
119
119
|
'call_state' => payload['call_state'],
|
|
120
|
+
'answered_by' => payload['answered_by'],
|
|
120
121
|
'processing_state' => payload['processing_state'],
|
|
121
122
|
'created_time' => Twilio.deserialize_iso8601_datetime(payload['created_time']),
|
|
122
123
|
'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
|
|
@@ -177,6 +178,12 @@ module Twilio
|
|
|
177
178
|
@properties['call_state']
|
|
178
179
|
end
|
|
179
180
|
|
|
181
|
+
##
|
|
182
|
+
# @return [call_summary.AnsweredBy] The answered_by
|
|
183
|
+
def answered_by
|
|
184
|
+
@properties['answered_by']
|
|
185
|
+
end
|
|
186
|
+
|
|
180
187
|
##
|
|
181
188
|
# @return [call_summary.ProcessingState] The processing_state
|
|
182
189
|
def processing_state
|
|
@@ -46,6 +46,7 @@ module Twilio
|
|
|
46
46
|
# @param [call_summaries.SortBy] sort_by The sort_by
|
|
47
47
|
# @param [String] subaccount The subaccount
|
|
48
48
|
# @param [Boolean] abnormal_session The abnormal_session
|
|
49
|
+
# @param [call_summaries.AnsweredBy] answered_by The answered_by
|
|
49
50
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
50
51
|
# guarantees to never return more than limit. Default is no limit
|
|
51
52
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -53,7 +54,7 @@ module Twilio
|
|
|
53
54
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
54
55
|
# efficient page size, i.e. min(limit, 1000)
|
|
55
56
|
# @return [Array] Array of up to limit results
|
|
56
|
-
def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, limit: nil, page_size: nil)
|
|
57
|
+
def list(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, limit: nil, page_size: nil)
|
|
57
58
|
self.stream(
|
|
58
59
|
from: from,
|
|
59
60
|
to: to,
|
|
@@ -73,6 +74,7 @@ module Twilio
|
|
|
73
74
|
sort_by: sort_by,
|
|
74
75
|
subaccount: subaccount,
|
|
75
76
|
abnormal_session: abnormal_session,
|
|
77
|
+
answered_by: answered_by,
|
|
76
78
|
limit: limit,
|
|
77
79
|
page_size: page_size
|
|
78
80
|
).entries
|
|
@@ -101,6 +103,7 @@ module Twilio
|
|
|
101
103
|
# @param [call_summaries.SortBy] sort_by The sort_by
|
|
102
104
|
# @param [String] subaccount The subaccount
|
|
103
105
|
# @param [Boolean] abnormal_session The abnormal_session
|
|
106
|
+
# @param [call_summaries.AnsweredBy] answered_by The answered_by
|
|
104
107
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
105
108
|
# guarantees to never return more than limit. Default is no limit.
|
|
106
109
|
# @param [Integer] page_size Number of records to fetch per request, when
|
|
@@ -108,7 +111,7 @@ module Twilio
|
|
|
108
111
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
109
112
|
# efficient page size, i.e. min(limit, 1000)
|
|
110
113
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
111
|
-
def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, limit: nil, page_size: nil)
|
|
114
|
+
def stream(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, limit: nil, page_size: nil)
|
|
112
115
|
limits = @version.read_limits(limit, page_size)
|
|
113
116
|
|
|
114
117
|
page = self.page(
|
|
@@ -130,6 +133,7 @@ module Twilio
|
|
|
130
133
|
sort_by: sort_by,
|
|
131
134
|
subaccount: subaccount,
|
|
132
135
|
abnormal_session: abnormal_session,
|
|
136
|
+
answered_by: answered_by,
|
|
133
137
|
page_size: limits[:page_size],
|
|
134
138
|
)
|
|
135
139
|
|
|
@@ -172,11 +176,12 @@ module Twilio
|
|
|
172
176
|
# @param [call_summaries.SortBy] sort_by The sort_by
|
|
173
177
|
# @param [String] subaccount The subaccount
|
|
174
178
|
# @param [Boolean] abnormal_session The abnormal_session
|
|
179
|
+
# @param [call_summaries.AnsweredBy] answered_by The answered_by
|
|
175
180
|
# @param [String] page_token PageToken provided by the API
|
|
176
181
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
177
182
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
178
183
|
# @return [Page] Page of CallSummariesInstance
|
|
179
|
-
def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
|
184
|
+
def page(from: :unset, to: :unset, from_carrier: :unset, to_carrier: :unset, from_country_code: :unset, to_country_code: :unset, branded: :unset, verified_caller: :unset, has_tag: :unset, start_time: :unset, end_time: :unset, call_type: :unset, call_state: :unset, direction: :unset, processing_state: :unset, sort_by: :unset, subaccount: :unset, abnormal_session: :unset, answered_by: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
|
180
185
|
params = Twilio::Values.of({
|
|
181
186
|
'From' => from,
|
|
182
187
|
'To' => to,
|
|
@@ -196,6 +201,7 @@ module Twilio
|
|
|
196
201
|
'SortBy' => sort_by,
|
|
197
202
|
'Subaccount' => subaccount,
|
|
198
203
|
'AbnormalSession' => abnormal_session,
|
|
204
|
+
'AnsweredBy' => answered_by,
|
|
199
205
|
'PageToken' => page_token,
|
|
200
206
|
'Page' => page_number,
|
|
201
207
|
'PageSize' => page_size,
|
|
@@ -268,6 +274,7 @@ module Twilio
|
|
|
268
274
|
@properties = {
|
|
269
275
|
'account_sid' => payload['account_sid'],
|
|
270
276
|
'call_sid' => payload['call_sid'],
|
|
277
|
+
'answered_by' => payload['answered_by'],
|
|
271
278
|
'call_type' => payload['call_type'],
|
|
272
279
|
'call_state' => payload['call_state'],
|
|
273
280
|
'processing_state' => payload['processing_state'],
|
|
@@ -302,6 +309,12 @@ module Twilio
|
|
|
302
309
|
@properties['call_sid']
|
|
303
310
|
end
|
|
304
311
|
|
|
312
|
+
##
|
|
313
|
+
# @return [call_summaries.AnsweredBy] The answered_by
|
|
314
|
+
def answered_by
|
|
315
|
+
@properties['answered_by']
|
|
316
|
+
end
|
|
317
|
+
|
|
305
318
|
##
|
|
306
319
|
# @return [call_summaries.CallType] The call_type
|
|
307
320
|
def call_type
|
|
@@ -210,7 +210,7 @@ module Twilio
|
|
|
210
210
|
'participant_identity' => payload['participant_identity'],
|
|
211
211
|
'join_time' => Twilio.deserialize_iso8601_datetime(payload['join_time']),
|
|
212
212
|
'leave_time' => Twilio.deserialize_iso8601_datetime(payload['leave_time']),
|
|
213
|
-
'duration_sec' => payload['duration_sec'].to_i,
|
|
213
|
+
'duration_sec' => payload['duration_sec'] == nil ? payload['duration_sec'] : payload['duration_sec'].to_i,
|
|
214
214
|
'account_sid' => payload['account_sid'],
|
|
215
215
|
'room_sid' => payload['room_sid'],
|
|
216
216
|
'status' => payload['status'],
|
|
@@ -283,9 +283,9 @@ module Twilio
|
|
|
283
283
|
'max_concurrent_participants' => payload['max_concurrent_participants'] == nil ? payload['max_concurrent_participants'] : payload['max_concurrent_participants'].to_i,
|
|
284
284
|
'codecs' => payload['codecs'],
|
|
285
285
|
'media_region' => payload['media_region'],
|
|
286
|
-
'duration_sec' => payload['duration_sec'].to_i,
|
|
287
|
-
'total_participant_duration_sec' => payload['total_participant_duration_sec'].to_i,
|
|
288
|
-
'total_recording_duration_sec' => payload['total_recording_duration_sec'].to_i,
|
|
286
|
+
'duration_sec' => payload['duration_sec'] == nil ? payload['duration_sec'] : payload['duration_sec'].to_i,
|
|
287
|
+
'total_participant_duration_sec' => payload['total_participant_duration_sec'] == nil ? payload['total_participant_duration_sec'] : payload['total_participant_duration_sec'].to_i,
|
|
288
|
+
'total_recording_duration_sec' => payload['total_recording_duration_sec'] == nil ? payload['total_recording_duration_sec'] : payload['total_recording_duration_sec'].to_i,
|
|
289
289
|
'processing_state' => payload['processing_state'],
|
|
290
290
|
'recording_enabled' => payload['recording_enabled'],
|
|
291
291
|
'edge_location' => payload['edge_location'],
|
|
@@ -268,7 +268,7 @@ module Twilio
|
|
|
268
268
|
'was_edited' => payload['was_edited'],
|
|
269
269
|
'from' => payload['from'],
|
|
270
270
|
'body' => payload['body'],
|
|
271
|
-
'index' => payload['index'].to_i,
|
|
271
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
|
272
272
|
'url' => payload['url'],
|
|
273
273
|
}
|
|
274
274
|
|
|
@@ -323,8 +323,8 @@ module Twilio
|
|
|
323
323
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
324
324
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
325
325
|
'created_by' => payload['created_by'],
|
|
326
|
-
'members_count' => payload['members_count'].to_i,
|
|
327
|
-
'messages_count' => payload['messages_count'].to_i,
|
|
326
|
+
'members_count' => payload['members_count'] == nil ? payload['members_count'] : payload['members_count'].to_i,
|
|
327
|
+
'messages_count' => payload['messages_count'] == nil ? payload['messages_count'] : payload['messages_count'].to_i,
|
|
328
328
|
'url' => payload['url'],
|
|
329
329
|
'links' => payload['links'],
|
|
330
330
|
}
|
|
@@ -268,7 +268,7 @@ module Twilio
|
|
|
268
268
|
'is_notifiable' => payload['is_notifiable'],
|
|
269
269
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
270
270
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
271
|
-
'joined_channels_count' => payload['joined_channels_count'].to_i,
|
|
271
|
+
'joined_channels_count' => payload['joined_channels_count'] == nil ? payload['joined_channels_count'] : payload['joined_channels_count'].to_i,
|
|
272
272
|
'links' => payload['links'],
|
|
273
273
|
'url' => payload['url'],
|
|
274
274
|
}
|
|
@@ -430,8 +430,8 @@ module Twilio
|
|
|
430
430
|
'default_channel_creator_role_sid' => payload['default_channel_creator_role_sid'],
|
|
431
431
|
'read_status_enabled' => payload['read_status_enabled'],
|
|
432
432
|
'reachability_enabled' => payload['reachability_enabled'],
|
|
433
|
-
'typing_indicator_timeout' => payload['typing_indicator_timeout'].to_i,
|
|
434
|
-
'consumption_report_interval' => payload['consumption_report_interval'].to_i,
|
|
433
|
+
'typing_indicator_timeout' => payload['typing_indicator_timeout'] == nil ? payload['typing_indicator_timeout'] : payload['typing_indicator_timeout'].to_i,
|
|
434
|
+
'consumption_report_interval' => payload['consumption_report_interval'] == nil ? payload['consumption_report_interval'] : payload['consumption_report_interval'].to_i,
|
|
435
435
|
'limits' => payload['limits'],
|
|
436
436
|
'webhooks' => payload['webhooks'],
|
|
437
437
|
'pre_webhook_url' => payload['pre_webhook_url'],
|
|
@@ -302,7 +302,7 @@ module Twilio
|
|
|
302
302
|
'was_edited' => payload['was_edited'],
|
|
303
303
|
'from' => payload['from'],
|
|
304
304
|
'body' => payload['body'],
|
|
305
|
-
'index' => payload['index'].to_i,
|
|
305
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
|
306
306
|
'type' => payload['type'],
|
|
307
307
|
'media' => payload['media'],
|
|
308
308
|
'url' => payload['url'],
|
|
@@ -368,8 +368,8 @@ module Twilio
|
|
|
368
368
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
369
369
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
370
370
|
'created_by' => payload['created_by'],
|
|
371
|
-
'members_count' => payload['members_count'].to_i,
|
|
372
|
-
'messages_count' => payload['messages_count'].to_i,
|
|
371
|
+
'members_count' => payload['members_count'] == nil ? payload['members_count'] : payload['members_count'].to_i,
|
|
372
|
+
'messages_count' => payload['messages_count'] == nil ? payload['messages_count'] : payload['messages_count'].to_i,
|
|
373
373
|
'url' => payload['url'],
|
|
374
374
|
'links' => payload['links'],
|
|
375
375
|
}
|
|
@@ -303,7 +303,7 @@ module Twilio
|
|
|
303
303
|
'is_notifiable' => payload['is_notifiable'],
|
|
304
304
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
305
305
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
306
|
-
'joined_channels_count' => payload['joined_channels_count'].to_i,
|
|
306
|
+
'joined_channels_count' => payload['joined_channels_count'] == nil ? payload['joined_channels_count'] : payload['joined_channels_count'].to_i,
|
|
307
307
|
'links' => payload['links'],
|
|
308
308
|
'url' => payload['url'],
|
|
309
309
|
}
|
|
@@ -384,15 +384,15 @@ module Twilio
|
|
|
384
384
|
'default_channel_creator_role_sid' => payload['default_channel_creator_role_sid'],
|
|
385
385
|
'read_status_enabled' => payload['read_status_enabled'],
|
|
386
386
|
'reachability_enabled' => payload['reachability_enabled'],
|
|
387
|
-
'typing_indicator_timeout' => payload['typing_indicator_timeout'].to_i,
|
|
388
|
-
'consumption_report_interval' => payload['consumption_report_interval'].to_i,
|
|
387
|
+
'typing_indicator_timeout' => payload['typing_indicator_timeout'] == nil ? payload['typing_indicator_timeout'] : payload['typing_indicator_timeout'].to_i,
|
|
388
|
+
'consumption_report_interval' => payload['consumption_report_interval'] == nil ? payload['consumption_report_interval'] : payload['consumption_report_interval'].to_i,
|
|
389
389
|
'limits' => payload['limits'],
|
|
390
390
|
'pre_webhook_url' => payload['pre_webhook_url'],
|
|
391
391
|
'post_webhook_url' => payload['post_webhook_url'],
|
|
392
392
|
'webhook_method' => payload['webhook_method'],
|
|
393
393
|
'webhook_filters' => payload['webhook_filters'],
|
|
394
|
-
'pre_webhook_retry_count' => payload['pre_webhook_retry_count'].to_i,
|
|
395
|
-
'post_webhook_retry_count' => payload['post_webhook_retry_count'].to_i,
|
|
394
|
+
'pre_webhook_retry_count' => payload['pre_webhook_retry_count'] == nil ? payload['pre_webhook_retry_count'] : payload['pre_webhook_retry_count'].to_i,
|
|
395
|
+
'post_webhook_retry_count' => payload['post_webhook_retry_count'] == nil ? payload['post_webhook_retry_count'] : payload['post_webhook_retry_count'].to_i,
|
|
396
396
|
'notifications' => payload['notifications'],
|
|
397
397
|
'media' => payload['media'],
|
|
398
398
|
'url' => payload['url'],
|
|
@@ -83,13 +83,47 @@ module Twilio
|
|
|
83
83
|
# Fetch the PhoneNumberInstance
|
|
84
84
|
# @param [String] fields A comma-separated list of fields to return. Possible
|
|
85
85
|
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
|
86
|
-
# line_type_intelligence.
|
|
86
|
+
# line_type_intelligence, identity_match.
|
|
87
87
|
# @param [String] country_code The {country
|
|
88
88
|
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
|
89
89
|
# provided is in national format.
|
|
90
|
+
# @param [String] first_name User’s first name. This query parameter is only used
|
|
91
|
+
# (optionally) for identity_match package requests.
|
|
92
|
+
# @param [String] last_name User’s last name. This query parameter is only used
|
|
93
|
+
# (optionally) for identity_match package requests.
|
|
94
|
+
# @param [String] address_line_1 User’s first address line. This query parameter
|
|
95
|
+
# is only used (optionally) for identity_match package requests.
|
|
96
|
+
# @param [String] address_line_2 User’s second address line. This query parameter
|
|
97
|
+
# is only used (optionally) for identity_match package requests.
|
|
98
|
+
# @param [String] city User’s city. This query parameter is only used (optionally)
|
|
99
|
+
# for identity_match package requests.
|
|
100
|
+
# @param [String] state User’s country subdivision, such as state, province, or
|
|
101
|
+
# locality. This query parameter is only used (optionally) for identity_match
|
|
102
|
+
# package requests.
|
|
103
|
+
# @param [String] postal_code User’s postal zip code. This query parameter is only
|
|
104
|
+
# used (optionally) for identity_match package requests.
|
|
105
|
+
# @param [String] address_country_code User’s country, up to two characters. This
|
|
106
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
107
|
+
# @param [String] national_id User’s national ID, such as SSN or Passport ID. This
|
|
108
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
109
|
+
# @param [String] date_of_birth User’s date of birth, in YYYYMMDD format. This
|
|
110
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
90
111
|
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
|
91
|
-
def fetch(fields: :unset, country_code: :unset)
|
|
92
|
-
params = Twilio::Values.of({
|
|
112
|
+
def fetch(fields: :unset, country_code: :unset, first_name: :unset, last_name: :unset, address_line_1: :unset, address_line_2: :unset, city: :unset, state: :unset, postal_code: :unset, address_country_code: :unset, national_id: :unset, date_of_birth: :unset)
|
|
113
|
+
params = Twilio::Values.of({
|
|
114
|
+
'Fields' => fields,
|
|
115
|
+
'CountryCode' => country_code,
|
|
116
|
+
'FirstName' => first_name,
|
|
117
|
+
'LastName' => last_name,
|
|
118
|
+
'AddressLine1' => address_line_1,
|
|
119
|
+
'AddressLine2' => address_line_2,
|
|
120
|
+
'City' => city,
|
|
121
|
+
'State' => state,
|
|
122
|
+
'PostalCode' => postal_code,
|
|
123
|
+
'AddressCountryCode' => address_country_code,
|
|
124
|
+
'NationalId' => national_id,
|
|
125
|
+
'DateOfBirth' => date_of_birth,
|
|
126
|
+
})
|
|
93
127
|
|
|
94
128
|
payload = @version.fetch('GET', @uri, params: params)
|
|
95
129
|
|
|
@@ -137,6 +171,8 @@ module Twilio
|
|
|
137
171
|
'call_forwarding' => payload['call_forwarding'],
|
|
138
172
|
'live_activity' => payload['live_activity'],
|
|
139
173
|
'line_type_intelligence' => payload['line_type_intelligence'],
|
|
174
|
+
'identity_match' => payload['identity_match'],
|
|
175
|
+
'sms_pumping_risk' => payload['sms_pumping_risk'],
|
|
140
176
|
'url' => payload['url'],
|
|
141
177
|
}
|
|
142
178
|
|
|
@@ -222,6 +258,18 @@ module Twilio
|
|
|
222
258
|
@properties['line_type_intelligence']
|
|
223
259
|
end
|
|
224
260
|
|
|
261
|
+
##
|
|
262
|
+
# @return [Hash] An object that contains identity match information
|
|
263
|
+
def identity_match
|
|
264
|
+
@properties['identity_match']
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
##
|
|
268
|
+
# @return [Hash] An object that contains sms pumping risk information
|
|
269
|
+
def sms_pumping_risk
|
|
270
|
+
@properties['sms_pumping_risk']
|
|
271
|
+
end
|
|
272
|
+
|
|
225
273
|
##
|
|
226
274
|
# @return [String] The absolute URL of the resource
|
|
227
275
|
def url
|
|
@@ -232,13 +280,47 @@ module Twilio
|
|
|
232
280
|
# Fetch the PhoneNumberInstance
|
|
233
281
|
# @param [String] fields A comma-separated list of fields to return. Possible
|
|
234
282
|
# values are caller_name, sim_swap, call_forwarding, live_activity,
|
|
235
|
-
# line_type_intelligence.
|
|
283
|
+
# line_type_intelligence, identity_match.
|
|
236
284
|
# @param [String] country_code The {country
|
|
237
285
|
# code}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] used if the phone number
|
|
238
286
|
# provided is in national format.
|
|
287
|
+
# @param [String] first_name User’s first name. This query parameter is only used
|
|
288
|
+
# (optionally) for identity_match package requests.
|
|
289
|
+
# @param [String] last_name User’s last name. This query parameter is only used
|
|
290
|
+
# (optionally) for identity_match package requests.
|
|
291
|
+
# @param [String] address_line_1 User’s first address line. This query parameter
|
|
292
|
+
# is only used (optionally) for identity_match package requests.
|
|
293
|
+
# @param [String] address_line_2 User’s second address line. This query parameter
|
|
294
|
+
# is only used (optionally) for identity_match package requests.
|
|
295
|
+
# @param [String] city User’s city. This query parameter is only used (optionally)
|
|
296
|
+
# for identity_match package requests.
|
|
297
|
+
# @param [String] state User’s country subdivision, such as state, province, or
|
|
298
|
+
# locality. This query parameter is only used (optionally) for identity_match
|
|
299
|
+
# package requests.
|
|
300
|
+
# @param [String] postal_code User’s postal zip code. This query parameter is only
|
|
301
|
+
# used (optionally) for identity_match package requests.
|
|
302
|
+
# @param [String] address_country_code User’s country, up to two characters. This
|
|
303
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
304
|
+
# @param [String] national_id User’s national ID, such as SSN or Passport ID. This
|
|
305
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
306
|
+
# @param [String] date_of_birth User’s date of birth, in YYYYMMDD format. This
|
|
307
|
+
# query parameter is only used (optionally) for identity_match package requests.
|
|
239
308
|
# @return [PhoneNumberInstance] Fetched PhoneNumberInstance
|
|
240
|
-
def fetch(fields: :unset, country_code: :unset)
|
|
241
|
-
context.fetch(
|
|
309
|
+
def fetch(fields: :unset, country_code: :unset, first_name: :unset, last_name: :unset, address_line_1: :unset, address_line_2: :unset, city: :unset, state: :unset, postal_code: :unset, address_country_code: :unset, national_id: :unset, date_of_birth: :unset)
|
|
310
|
+
context.fetch(
|
|
311
|
+
fields: fields,
|
|
312
|
+
country_code: country_code,
|
|
313
|
+
first_name: first_name,
|
|
314
|
+
last_name: last_name,
|
|
315
|
+
address_line_1: address_line_1,
|
|
316
|
+
address_line_2: address_line_2,
|
|
317
|
+
city: city,
|
|
318
|
+
state: state,
|
|
319
|
+
postal_code: postal_code,
|
|
320
|
+
address_country_code: address_country_code,
|
|
321
|
+
national_id: national_id,
|
|
322
|
+
date_of_birth: date_of_birth,
|
|
323
|
+
)
|
|
242
324
|
end
|
|
243
325
|
|
|
244
326
|
##
|