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,251 @@
|
|
|
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 Api < Domain
|
|
12
|
+
class V2010 < Version
|
|
13
|
+
class AccountContext < InstanceContext
|
|
14
|
+
class CallContext < InstanceContext
|
|
15
|
+
class UserDefinedMessageSubscriptionList < ListResource
|
|
16
|
+
##
|
|
17
|
+
# Initialize the UserDefinedMessageSubscriptionList
|
|
18
|
+
# @param [Version] version Version that contains the resource
|
|
19
|
+
# @param [String] account_sid The SID of the
|
|
20
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
|
21
|
+
# User Defined Messages.
|
|
22
|
+
# @param [String] call_sid The SID of the
|
|
23
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
|
24
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
|
25
|
+
# producing the User Defined Messages.
|
|
26
|
+
# @return [UserDefinedMessageSubscriptionList] UserDefinedMessageSubscriptionList
|
|
27
|
+
def initialize(version, account_sid: nil, call_sid: nil)
|
|
28
|
+
super(version)
|
|
29
|
+
|
|
30
|
+
# Path Solution
|
|
31
|
+
@solution = {account_sid: account_sid, call_sid: call_sid}
|
|
32
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions.json"
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
##
|
|
36
|
+
# Create the UserDefinedMessageSubscriptionInstance
|
|
37
|
+
# @param [String] callback The URL we should call using the `method` to send user
|
|
38
|
+
# defined events to your application. URLs must contain a valid hostname
|
|
39
|
+
# (underscores are not permitted).
|
|
40
|
+
# @param [String] idempotency_key A unique string value to identify API call. This
|
|
41
|
+
# should be a unique string value per API call and can be a randomly generated.
|
|
42
|
+
# @param [String] method The HTTP method Twilio will use when requesting the above
|
|
43
|
+
# `Url`. Either `GET` or `POST`. Default is `POST`.
|
|
44
|
+
# @return [UserDefinedMessageSubscriptionInstance] Created UserDefinedMessageSubscriptionInstance
|
|
45
|
+
def create(callback: nil, idempotency_key: :unset, method: :unset)
|
|
46
|
+
data = Twilio::Values.of({
|
|
47
|
+
'Callback' => callback,
|
|
48
|
+
'IdempotencyKey' => idempotency_key,
|
|
49
|
+
'Method' => method,
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
payload = @version.create('POST', @uri, data: data)
|
|
53
|
+
|
|
54
|
+
UserDefinedMessageSubscriptionInstance.new(
|
|
55
|
+
@version,
|
|
56
|
+
payload,
|
|
57
|
+
account_sid: @solution[:account_sid],
|
|
58
|
+
call_sid: @solution[:call_sid],
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
##
|
|
63
|
+
# Provide a user friendly representation
|
|
64
|
+
def to_s
|
|
65
|
+
'#<Twilio.Api.V2010.UserDefinedMessageSubscriptionList>'
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
class UserDefinedMessageSubscriptionPage < Page
|
|
70
|
+
##
|
|
71
|
+
# Initialize the UserDefinedMessageSubscriptionPage
|
|
72
|
+
# @param [Version] version Version that contains the resource
|
|
73
|
+
# @param [Response] response Response from the API
|
|
74
|
+
# @param [Hash] solution Path solution for the resource
|
|
75
|
+
# @return [UserDefinedMessageSubscriptionPage] UserDefinedMessageSubscriptionPage
|
|
76
|
+
def initialize(version, response, solution)
|
|
77
|
+
super(version, response)
|
|
78
|
+
|
|
79
|
+
# Path Solution
|
|
80
|
+
@solution = solution
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
##
|
|
84
|
+
# Build an instance of UserDefinedMessageSubscriptionInstance
|
|
85
|
+
# @param [Hash] payload Payload response from the API
|
|
86
|
+
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
|
87
|
+
def get_instance(payload)
|
|
88
|
+
UserDefinedMessageSubscriptionInstance.new(
|
|
89
|
+
@version,
|
|
90
|
+
payload,
|
|
91
|
+
account_sid: @solution[:account_sid],
|
|
92
|
+
call_sid: @solution[:call_sid],
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
##
|
|
97
|
+
# Provide a user friendly representation
|
|
98
|
+
def to_s
|
|
99
|
+
'<Twilio.Api.V2010.UserDefinedMessageSubscriptionPage>'
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
class UserDefinedMessageSubscriptionContext < InstanceContext
|
|
104
|
+
##
|
|
105
|
+
# Initialize the UserDefinedMessageSubscriptionContext
|
|
106
|
+
# @param [Version] version Version that contains the resource
|
|
107
|
+
# @param [String] account_sid The SID of the
|
|
108
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
|
109
|
+
# User Defined Messages.
|
|
110
|
+
# @param [String] call_sid The SID of the
|
|
111
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
|
112
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
|
113
|
+
# producing the User Defined Messages.
|
|
114
|
+
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
|
115
|
+
# Subscription.
|
|
116
|
+
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext
|
|
117
|
+
def initialize(version, account_sid, call_sid, sid)
|
|
118
|
+
super(version)
|
|
119
|
+
|
|
120
|
+
# Path Solution
|
|
121
|
+
@solution = {account_sid: account_sid, call_sid: call_sid, sid: sid, }
|
|
122
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions/#{@solution[:sid]}.json"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
##
|
|
126
|
+
# Delete the UserDefinedMessageSubscriptionInstance
|
|
127
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
128
|
+
def delete
|
|
129
|
+
@version.delete('DELETE', @uri)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
##
|
|
133
|
+
# Provide a user friendly representation
|
|
134
|
+
def to_s
|
|
135
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
136
|
+
"#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
##
|
|
140
|
+
# Provide a detailed, user friendly representation
|
|
141
|
+
def inspect
|
|
142
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
143
|
+
"#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
class UserDefinedMessageSubscriptionInstance < InstanceResource
|
|
148
|
+
##
|
|
149
|
+
# Initialize the UserDefinedMessageSubscriptionInstance
|
|
150
|
+
# @param [Version] version Version that contains the resource
|
|
151
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
152
|
+
# @param [String] account_sid The SID of the
|
|
153
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
|
154
|
+
# User Defined Messages.
|
|
155
|
+
# @param [String] call_sid The SID of the
|
|
156
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
|
157
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
|
158
|
+
# producing the User Defined Messages.
|
|
159
|
+
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
|
160
|
+
# Subscription.
|
|
161
|
+
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
|
162
|
+
def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
|
|
163
|
+
super(version)
|
|
164
|
+
|
|
165
|
+
# Marshaled Properties
|
|
166
|
+
@properties = {
|
|
167
|
+
'account_sid' => payload['account_sid'],
|
|
168
|
+
'call_sid' => payload['call_sid'],
|
|
169
|
+
'sid' => payload['sid'],
|
|
170
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
171
|
+
'uri' => payload['uri'],
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
# Context
|
|
175
|
+
@instance_context = nil
|
|
176
|
+
@params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid'], }
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
##
|
|
180
|
+
# Generate an instance context for the instance, the context is capable of
|
|
181
|
+
# performing various actions. All instance actions are proxied to the context
|
|
182
|
+
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext for this UserDefinedMessageSubscriptionInstance
|
|
183
|
+
def context
|
|
184
|
+
unless @instance_context
|
|
185
|
+
@instance_context = UserDefinedMessageSubscriptionContext.new(
|
|
186
|
+
@version,
|
|
187
|
+
@params['account_sid'],
|
|
188
|
+
@params['call_sid'],
|
|
189
|
+
@params['sid'],
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
@instance_context
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
##
|
|
196
|
+
# @return [String] Account SID.
|
|
197
|
+
def account_sid
|
|
198
|
+
@properties['account_sid']
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
##
|
|
202
|
+
# @return [String] Call SID.
|
|
203
|
+
def call_sid
|
|
204
|
+
@properties['call_sid']
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
##
|
|
208
|
+
# @return [String] User Defined Message Subscription SID.
|
|
209
|
+
def sid
|
|
210
|
+
@properties['sid']
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
##
|
|
214
|
+
# @return [Time] The date this User Defined Message Subscription was created.
|
|
215
|
+
def date_created
|
|
216
|
+
@properties['date_created']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
##
|
|
220
|
+
# @return [String] The URI of the User Defined Message Subscription Resource, relative to `https://api.twilio.com`.
|
|
221
|
+
def uri
|
|
222
|
+
@properties['uri']
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
##
|
|
226
|
+
# Delete the UserDefinedMessageSubscriptionInstance
|
|
227
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
228
|
+
def delete
|
|
229
|
+
context.delete
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
##
|
|
233
|
+
# Provide a user friendly representation
|
|
234
|
+
def to_s
|
|
235
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
236
|
+
"<Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance #{values}>"
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
##
|
|
240
|
+
# Provide a detailed, user friendly representation
|
|
241
|
+
def inspect
|
|
242
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
243
|
+
"<Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance #{values}>"
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
@@ -444,6 +444,8 @@ module Twilio
|
|
|
444
444
|
@payments = nil
|
|
445
445
|
@siprec = nil
|
|
446
446
|
@streams = nil
|
|
447
|
+
@user_defined_message_subscriptions = nil
|
|
448
|
+
@user_defined_messages = nil
|
|
447
449
|
end
|
|
448
450
|
|
|
449
451
|
##
|
|
@@ -636,6 +638,49 @@ module Twilio
|
|
|
636
638
|
@streams
|
|
637
639
|
end
|
|
638
640
|
|
|
641
|
+
##
|
|
642
|
+
# Access the user_defined_message_subscriptions
|
|
643
|
+
# @return [UserDefinedMessageSubscriptionList]
|
|
644
|
+
# @return [UserDefinedMessageSubscriptionContext] if sid was passed.
|
|
645
|
+
def user_defined_message_subscriptions(sid=:unset)
|
|
646
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
647
|
+
|
|
648
|
+
if sid != :unset
|
|
649
|
+
return UserDefinedMessageSubscriptionContext.new(
|
|
650
|
+
@version,
|
|
651
|
+
@solution[:account_sid],
|
|
652
|
+
@solution[:sid],
|
|
653
|
+
sid,
|
|
654
|
+
)
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
unless @user_defined_message_subscriptions
|
|
658
|
+
@user_defined_message_subscriptions = UserDefinedMessageSubscriptionList.new(
|
|
659
|
+
@version,
|
|
660
|
+
account_sid: @solution[:account_sid],
|
|
661
|
+
call_sid: @solution[:sid],
|
|
662
|
+
)
|
|
663
|
+
end
|
|
664
|
+
|
|
665
|
+
@user_defined_message_subscriptions
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
##
|
|
669
|
+
# Access the user_defined_messages
|
|
670
|
+
# @return [UserDefinedMessageList]
|
|
671
|
+
# @return [UserDefinedMessageContext]
|
|
672
|
+
def user_defined_messages
|
|
673
|
+
unless @user_defined_messages
|
|
674
|
+
@user_defined_messages = UserDefinedMessageList.new(
|
|
675
|
+
@version,
|
|
676
|
+
account_sid: @solution[:account_sid],
|
|
677
|
+
call_sid: @solution[:sid],
|
|
678
|
+
)
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
@user_defined_messages
|
|
682
|
+
end
|
|
683
|
+
|
|
639
684
|
##
|
|
640
685
|
# Provide a user friendly representation
|
|
641
686
|
def to_s
|
|
@@ -977,6 +1022,20 @@ module Twilio
|
|
|
977
1022
|
context.streams
|
|
978
1023
|
end
|
|
979
1024
|
|
|
1025
|
+
##
|
|
1026
|
+
# Access the user_defined_message_subscriptions
|
|
1027
|
+
# @return [user_defined_message_subscriptions] user_defined_message_subscriptions
|
|
1028
|
+
def user_defined_message_subscriptions
|
|
1029
|
+
context.user_defined_message_subscriptions
|
|
1030
|
+
end
|
|
1031
|
+
|
|
1032
|
+
##
|
|
1033
|
+
# Access the user_defined_messages
|
|
1034
|
+
# @return [user_defined_messages] user_defined_messages
|
|
1035
|
+
def user_defined_messages
|
|
1036
|
+
context.user_defined_messages
|
|
1037
|
+
end
|
|
1038
|
+
|
|
980
1039
|
##
|
|
981
1040
|
# Provide a user friendly representation
|
|
982
1041
|
def to_s
|
|
@@ -169,8 +169,34 @@ module Twilio
|
|
|
169
169
|
# Twilio. `both` records the audio that is received and sent by Twilio.
|
|
170
170
|
# @param [String] time_limit The maximum duration of the call in seconds.
|
|
171
171
|
# Constraints depend on account and configuration.
|
|
172
|
+
# @param [String] machine_detection Whether to detect if a human, answering
|
|
173
|
+
# machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`.
|
|
174
|
+
# Use `Enable` if you would like us to return `AnsweredBy` as soon as the called
|
|
175
|
+
# party is identified. Use `DetectMessageEnd`, if you would like to leave a
|
|
176
|
+
# message on an answering machine. If `send_digits` is provided, this parameter is
|
|
177
|
+
# ignored. For more information, see {Answering Machine
|
|
178
|
+
# Detection}[https://www.twilio.com/docs/voice/answering-machine-detection].
|
|
179
|
+
# @param [String] machine_detection_timeout The number of seconds that we should
|
|
180
|
+
# attempt to detect an answering machine before timing out and sending a voice
|
|
181
|
+
# request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
|
|
182
|
+
# @param [String] machine_detection_speech_threshold The number of milliseconds
|
|
183
|
+
# that is used as the measuring stick for the length of the speech activity, where
|
|
184
|
+
# durations lower than this value will be interpreted as a human and longer than
|
|
185
|
+
# this value as a machine. Possible Values: 1000-6000. Default: 2400.
|
|
186
|
+
# @param [String] machine_detection_speech_end_threshold The number of
|
|
187
|
+
# milliseconds of silence after speech activity at which point the speech activity
|
|
188
|
+
# is considered complete. Possible Values: 500-5000. Default: 1200.
|
|
189
|
+
# @param [String] machine_detection_silence_timeout The number of milliseconds of
|
|
190
|
+
# initial silence after which an `unknown` AnsweredBy result will be returned.
|
|
191
|
+
# Possible Values: 2000-10000. Default: 5000.
|
|
192
|
+
# @param [String] amd_status_callback The URL that we should call using the
|
|
193
|
+
# `amd_status_callback_method` to notify customer application whether the call was
|
|
194
|
+
# answered by human, machine or fax.
|
|
195
|
+
# @param [String] amd_status_callback_method The HTTP method we should use when
|
|
196
|
+
# calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default
|
|
197
|
+
# is `POST`.
|
|
172
198
|
# @return [ParticipantInstance] Created ParticipantInstance
|
|
173
|
-
def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset, time_limit: :unset)
|
|
199
|
+
def create(from: nil, to: nil, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, label: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_record: :unset, conference_trim: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, region: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, recording_status_callback_event: :unset, conference_recording_status_callback_event: :unset, coaching: :unset, call_sid_to_coach: :unset, jitter_buffer_size: :unset, byoc: :unset, caller_id: :unset, call_reason: :unset, recording_track: :unset, time_limit: :unset, machine_detection: :unset, machine_detection_timeout: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, amd_status_callback: :unset, amd_status_callback_method: :unset)
|
|
174
200
|
data = Twilio::Values.of({
|
|
175
201
|
'From' => from,
|
|
176
202
|
'To' => to,
|
|
@@ -211,6 +237,13 @@ module Twilio
|
|
|
211
237
|
'CallReason' => call_reason,
|
|
212
238
|
'RecordingTrack' => recording_track,
|
|
213
239
|
'TimeLimit' => time_limit,
|
|
240
|
+
'MachineDetection' => machine_detection,
|
|
241
|
+
'MachineDetectionTimeout' => machine_detection_timeout,
|
|
242
|
+
'MachineDetectionSpeechThreshold' => machine_detection_speech_threshold,
|
|
243
|
+
'MachineDetectionSpeechEndThreshold' => machine_detection_speech_end_threshold,
|
|
244
|
+
'MachineDetectionSilenceTimeout' => machine_detection_silence_timeout,
|
|
245
|
+
'AmdStatusCallback' => amd_status_callback,
|
|
246
|
+
'AmdStatusCallbackMethod' => amd_status_callback_method,
|
|
214
247
|
})
|
|
215
248
|
|
|
216
249
|
payload = @version.create('POST', @uri, data: data)
|
|
@@ -416,20 +449,23 @@ module Twilio
|
|
|
416
449
|
# @param [Boolean] hold Whether the participant should be on hold. Can be: `true`
|
|
417
450
|
# or `false`. `true` puts the participant on hold, and `false` lets them rejoin
|
|
418
451
|
# the conference.
|
|
419
|
-
# @param [String] hold_url The URL we call using the `hold_method` for
|
|
452
|
+
# @param [String] hold_url The URL we call using the `hold_method` for music that
|
|
420
453
|
# plays when the participant is on hold. The URL may return an MP3 file, a WAV
|
|
421
|
-
# file, or a TwiML document that contains
|
|
422
|
-
#
|
|
454
|
+
# file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or
|
|
455
|
+
# `<Redirect>` verbs.
|
|
423
456
|
# @param [String] hold_method The HTTP method we should use to call `hold_url`.
|
|
424
457
|
# Can be: `GET` or `POST` and the default is `GET`.
|
|
425
458
|
# @param [String] announce_url The URL we call using the `announce_method` for an
|
|
426
|
-
# announcement to the participant. The URL
|
|
427
|
-
# a TwiML document that contains `<Play
|
|
459
|
+
# announcement to the participant. The URL may return an MP3 file, a WAV file, or
|
|
460
|
+
# a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>`
|
|
461
|
+
# verbs.
|
|
428
462
|
# @param [String] announce_method The HTTP method we should use to call
|
|
429
463
|
# `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
|
430
|
-
# @param [String] wait_url The URL we
|
|
431
|
-
#
|
|
432
|
-
#
|
|
464
|
+
# @param [String] wait_url The URL we call using the `wait_method` for the music
|
|
465
|
+
# to play while participants are waiting for the conference to start. The URL may
|
|
466
|
+
# return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`,
|
|
467
|
+
# `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our
|
|
468
|
+
# standard hold music. {Learn more about hold
|
|
433
469
|
# music}[https://www.twilio.com/labs/twimlets/holdmusic].
|
|
434
470
|
# @param [String] wait_method The HTTP method we should use to call `wait_url`.
|
|
435
471
|
# Can be `GET` or `POST` and the default is `POST`. When using a static audio
|
|
@@ -653,20 +689,23 @@ module Twilio
|
|
|
653
689
|
# @param [Boolean] hold Whether the participant should be on hold. Can be: `true`
|
|
654
690
|
# or `false`. `true` puts the participant on hold, and `false` lets them rejoin
|
|
655
691
|
# the conference.
|
|
656
|
-
# @param [String] hold_url The URL we call using the `hold_method` for
|
|
692
|
+
# @param [String] hold_url The URL we call using the `hold_method` for music that
|
|
657
693
|
# plays when the participant is on hold. The URL may return an MP3 file, a WAV
|
|
658
|
-
# file, or a TwiML document that contains
|
|
659
|
-
#
|
|
694
|
+
# file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or
|
|
695
|
+
# `<Redirect>` verbs.
|
|
660
696
|
# @param [String] hold_method The HTTP method we should use to call `hold_url`.
|
|
661
697
|
# Can be: `GET` or `POST` and the default is `GET`.
|
|
662
698
|
# @param [String] announce_url The URL we call using the `announce_method` for an
|
|
663
|
-
# announcement to the participant. The URL
|
|
664
|
-
# a TwiML document that contains `<Play
|
|
699
|
+
# announcement to the participant. The URL may return an MP3 file, a WAV file, or
|
|
700
|
+
# a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>`
|
|
701
|
+
# verbs.
|
|
665
702
|
# @param [String] announce_method The HTTP method we should use to call
|
|
666
703
|
# `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
|
667
|
-
# @param [String] wait_url The URL we
|
|
668
|
-
#
|
|
669
|
-
#
|
|
704
|
+
# @param [String] wait_url The URL we call using the `wait_method` for the music
|
|
705
|
+
# to play while participants are waiting for the conference to start. The URL may
|
|
706
|
+
# return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`,
|
|
707
|
+
# `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our
|
|
708
|
+
# standard hold music. {Learn more about hold
|
|
670
709
|
# music}[https://www.twilio.com/labs/twimlets/holdmusic].
|
|
671
710
|
# @param [String] wait_method The HTTP method we should use to call `wait_url`.
|
|
672
711
|
# Can be `GET` or `POST` and the default is `POST`. When using a static audio
|
|
@@ -285,7 +285,7 @@ module Twilio
|
|
|
285
285
|
'price' => payload['price'],
|
|
286
286
|
'price_unit' => payload['price_unit'],
|
|
287
287
|
'status' => payload['status'],
|
|
288
|
-
'channels' => payload['channels'].to_i,
|
|
288
|
+
'channels' => payload['channels'] == nil ? payload['channels'] : payload['channels'].to_i,
|
|
289
289
|
'source' => payload['source'],
|
|
290
290
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
|
291
291
|
'encryption_details' => payload['encryption_details'],
|
|
@@ -244,8 +244,8 @@ module Twilio
|
|
|
244
244
|
# Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end
|
|
245
245
|
# the conference and hang up all participants
|
|
246
246
|
# @param [String] announce_url The URL we should call to announce something into
|
|
247
|
-
# the conference. The URL
|
|
248
|
-
# `<Play
|
|
247
|
+
# the conference. The URL may return an MP3 file, a WAV file, or a TwiML document
|
|
248
|
+
# that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs.
|
|
249
249
|
# @param [String] announce_method The HTTP method used to call `announce_url`. Can
|
|
250
250
|
# be: `GET` or `POST` and the default is `POST`
|
|
251
251
|
# @return [ConferenceInstance] Updated ConferenceInstance
|
|
@@ -396,7 +396,7 @@ module Twilio
|
|
|
396
396
|
end
|
|
397
397
|
|
|
398
398
|
##
|
|
399
|
-
# @return [String] A string that you assigned to describe this conference room
|
|
399
|
+
# @return [String] A string that you assigned to describe this conference room. Max length is 128 characters.
|
|
400
400
|
def friendly_name
|
|
401
401
|
@properties['friendly_name']
|
|
402
402
|
end
|
|
@@ -456,8 +456,8 @@ module Twilio
|
|
|
456
456
|
# Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end
|
|
457
457
|
# the conference and hang up all participants
|
|
458
458
|
# @param [String] announce_url The URL we should call to announce something into
|
|
459
|
-
# the conference. The URL
|
|
460
|
-
# `<Play
|
|
459
|
+
# the conference. The URL may return an MP3 file, a WAV file, or a TwiML document
|
|
460
|
+
# that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs.
|
|
461
461
|
# @param [String] announce_method The HTTP method used to call `announce_url`. Can
|
|
462
462
|
# be: `GET` or `POST` and the default is `POST`
|
|
463
463
|
# @return [ConferenceInstance] Updated ConferenceInstance
|
|
@@ -78,12 +78,25 @@ module Twilio
|
|
|
78
78
|
# @param [Boolean] smart_encoded Whether to detect Unicode characters that have a
|
|
79
79
|
# similar GSM-7 character and replace them. Can be: `true` or `false`.
|
|
80
80
|
# @param [Array[String]] persistent_action Rich actions for Channels Messages.
|
|
81
|
+
# @param [Boolean] shorten_urls Determines the usage of Click Tracking. Setting it
|
|
82
|
+
# to `true` will instruct Twilio to replace all links in the Message with a
|
|
83
|
+
# shortened version based on the associated Domain Sid and track clicks on them.
|
|
84
|
+
# If this parameter is not set on an API call, we will use the value set on the
|
|
85
|
+
# Messaging Service. If this parameter is not set and the value is not configured
|
|
86
|
+
# on the Messaging Service used this will default to `false`.
|
|
81
87
|
# @param [message.ScheduleType] schedule_type Indicates your intent to schedule a
|
|
82
88
|
# message. Pass the value `fixed` to schedule a message at a fixed time.
|
|
83
89
|
# @param [Time] send_at The time that Twilio will send the message. Must be in ISO
|
|
84
90
|
# 8601 format.
|
|
85
91
|
# @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as
|
|
86
92
|
# a single MMS message, regardless of the presence of media.
|
|
93
|
+
# @param [String] content_sid The SID of the Content object returned at Content
|
|
94
|
+
# API content create time
|
|
95
|
+
# (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template).
|
|
96
|
+
# If this parameter is not specified, then the Content API will not be utilized.
|
|
97
|
+
# @param [String] content_variables Key-value pairs of variable names to
|
|
98
|
+
# substitution values, used alongside a content_sid. If not specified, Content API
|
|
99
|
+
# will default to the default variables defined at create time.
|
|
87
100
|
# @param [String] from A Twilio phone number in
|
|
88
101
|
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, an {alphanumeric
|
|
89
102
|
# sender
|
|
@@ -114,7 +127,7 @@ module Twilio
|
|
|
114
127
|
# parameters in the POST request. You can include up to 10 `media_url` parameters
|
|
115
128
|
# per message. You can send images in an SMS message in only the US and Canada.
|
|
116
129
|
# @return [MessageInstance] Created MessageInstance
|
|
117
|
-
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
|
130
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, shorten_urls: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, content_sid: :unset, content_variables: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
|
118
131
|
data = Twilio::Values.of({
|
|
119
132
|
'To' => to,
|
|
120
133
|
'From' => from,
|
|
@@ -132,9 +145,12 @@ module Twilio
|
|
|
132
145
|
'AddressRetention' => address_retention,
|
|
133
146
|
'SmartEncoded' => smart_encoded,
|
|
134
147
|
'PersistentAction' => Twilio.serialize_list(persistent_action) { |e| e },
|
|
148
|
+
'ShortenUrls' => shorten_urls,
|
|
135
149
|
'ScheduleType' => schedule_type,
|
|
136
150
|
'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
|
|
137
151
|
'SendAsMms' => send_as_mms,
|
|
152
|
+
'ContentSid' => content_sid,
|
|
153
|
+
'ContentVariables' => content_variables,
|
|
138
154
|
})
|
|
139
155
|
|
|
140
156
|
payload = @version.create('POST', @uri, data: data)
|
|
@@ -242,9 +242,9 @@ module Twilio
|
|
|
242
242
|
@properties = {
|
|
243
243
|
'call_sid' => payload['call_sid'],
|
|
244
244
|
'date_enqueued' => Twilio.deserialize_rfc2822(payload['date_enqueued']),
|
|
245
|
-
'position' => payload['position'].to_i,
|
|
245
|
+
'position' => payload['position'] == nil ? payload['position'] : payload['position'].to_i,
|
|
246
246
|
'uri' => payload['uri'],
|
|
247
|
-
'wait_time' => payload['wait_time'].to_i,
|
|
247
|
+
'wait_time' => payload['wait_time'] == nil ? payload['wait_time'] : payload['wait_time'].to_i,
|
|
248
248
|
'queue_sid' => payload['queue_sid'],
|
|
249
249
|
}
|
|
250
250
|
|
|
@@ -112,7 +112,7 @@ module Twilio
|
|
|
112
112
|
# @param [String] friendly_name A descriptive string that you created to describe
|
|
113
113
|
# this resource. It can be up to 64 characters long.
|
|
114
114
|
# @param [String] max_size The maximum number of calls allowed to be in the queue.
|
|
115
|
-
# The default is
|
|
115
|
+
# The default is 1000. The maximum is 5000.
|
|
116
116
|
# @return [QueueInstance] Created QueueInstance
|
|
117
117
|
def create(friendly_name: nil, max_size: :unset)
|
|
118
118
|
data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size, })
|
|
@@ -193,7 +193,7 @@ module Twilio
|
|
|
193
193
|
# @param [String] friendly_name A descriptive string that you created to describe
|
|
194
194
|
# this resource. It can be up to 64 characters long.
|
|
195
195
|
# @param [String] max_size The maximum number of calls allowed to be in the queue.
|
|
196
|
-
# The default is
|
|
196
|
+
# The default is 1000. The maximum is 5000.
|
|
197
197
|
# @return [QueueInstance] Updated QueueInstance
|
|
198
198
|
def update(friendly_name: :unset, max_size: :unset)
|
|
199
199
|
data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size, })
|
|
@@ -264,14 +264,14 @@ module Twilio
|
|
|
264
264
|
# Marshaled Properties
|
|
265
265
|
@properties = {
|
|
266
266
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
267
|
-
'current_size' => payload['current_size'].to_i,
|
|
267
|
+
'current_size' => payload['current_size'] == nil ? payload['current_size'] : payload['current_size'].to_i,
|
|
268
268
|
'friendly_name' => payload['friendly_name'],
|
|
269
269
|
'uri' => payload['uri'],
|
|
270
270
|
'account_sid' => payload['account_sid'],
|
|
271
|
-
'average_wait_time' => payload['average_wait_time'].to_i,
|
|
271
|
+
'average_wait_time' => payload['average_wait_time'] == nil ? payload['average_wait_time'] : payload['average_wait_time'].to_i,
|
|
272
272
|
'sid' => payload['sid'],
|
|
273
273
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
274
|
-
'max_size' => payload['max_size'].to_i,
|
|
274
|
+
'max_size' => payload['max_size'] == nil ? payload['max_size'] : payload['max_size'].to_i,
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
# Context
|
|
@@ -356,7 +356,7 @@ module Twilio
|
|
|
356
356
|
# @param [String] friendly_name A descriptive string that you created to describe
|
|
357
357
|
# this resource. It can be up to 64 characters long.
|
|
358
358
|
# @param [String] max_size The maximum number of calls allowed to be in the queue.
|
|
359
|
-
# The default is
|
|
359
|
+
# The default is 1000. The maximum is 5000.
|
|
360
360
|
# @return [QueueInstance] Updated QueueInstance
|
|
361
361
|
def update(friendly_name: :unset, max_size: :unset)
|
|
362
362
|
context.update(friendly_name: friendly_name, max_size: max_size, )
|
|
@@ -234,7 +234,7 @@ module Twilio
|
|
|
234
234
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
235
235
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
236
236
|
'duration' => payload['duration'],
|
|
237
|
-
'price' => payload['price'].to_f,
|
|
237
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
238
238
|
'price_unit' => payload['price_unit'],
|
|
239
239
|
'recording_sid' => payload['recording_sid'],
|
|
240
240
|
'sid' => payload['sid'],
|
|
@@ -329,7 +329,7 @@ module Twilio
|
|
|
329
329
|
'price' => payload['price'],
|
|
330
330
|
'price_unit' => payload['price_unit'],
|
|
331
331
|
'status' => payload['status'],
|
|
332
|
-
'channels' => payload['channels'].to_i,
|
|
332
|
+
'channels' => payload['channels'] == nil ? payload['channels'] : payload['channels'].to_i,
|
|
333
333
|
'source' => payload['source'],
|
|
334
334
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
|
335
335
|
'uri' => payload['uri'],
|
|
@@ -290,7 +290,7 @@ module Twilio
|
|
|
290
290
|
'account_sid' => payload['account_sid'],
|
|
291
291
|
'friendly_name' => payload['friendly_name'],
|
|
292
292
|
'ip_address' => payload['ip_address'],
|
|
293
|
-
'cidr_prefix_length' => payload['cidr_prefix_length'].to_i,
|
|
293
|
+
'cidr_prefix_length' => payload['cidr_prefix_length'] == nil ? payload['cidr_prefix_length'] : payload['cidr_prefix_length'].to_i,
|
|
294
294
|
'ip_access_control_list_sid' => payload['ip_access_control_list_sid'],
|
|
295
295
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
296
296
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
@@ -218,7 +218,7 @@ module Twilio
|
|
|
218
218
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
219
219
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
220
220
|
'duration' => payload['duration'],
|
|
221
|
-
'price' => payload['price'].to_f,
|
|
221
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
222
222
|
'price_unit' => payload['price_unit'],
|
|
223
223
|
'recording_sid' => payload['recording_sid'],
|
|
224
224
|
'sid' => payload['sid'],
|