twilio-ruby 5.67.3 → 5.74.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +288 -0
- data/LICENSE +1 -1
- data/Makefile +6 -2
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +19 -3
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +22 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -17
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +28 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +254 -0
- data/lib/twilio-ruby/rest/content/v1.rb +52 -0
- data/lib/twilio-ruby/rest/content.rb +53 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +17 -2
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +397 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +314 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +394 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +313 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +390 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +413 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/brands_information.rb → flex_api/v1/insights_session.rb} +58 -55
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answersets.rb +144 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +130 -0
- data/lib/twilio-ruby/rest/{preview/trusted_comms/cps.rb → flex_api/v1/insights_user_roles.rb} +42 -54
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +22 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +115 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +133 -0
- data/lib/twilio-ruby/rest/flex_api/v2.rb +35 -0
- data/lib/twilio-ruby/rest/flex_api.rb +83 -0
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +322 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +14 -0
- data/lib/twilio-ruby/rest/insights/v1/call.rb +16 -8
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
- data/lib/twilio-ruby/rest/insights/v1.rb +0 -16
- data/lib/twilio-ruby/rest/insights.rb +0 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +94 -12
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -9
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +5 -5
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +98 -3
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +709 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +50 -0
- data/lib/twilio-ruby/rest/messaging.rb +26 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +317 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +310 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +192 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +330 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +342 -0
- data/lib/twilio-ruby/rest/{preview/bulk_exports/export/day.rb → microvisor/v1/device/device_secret.rb} +125 -84
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +393 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +92 -0
- data/lib/twilio-ruby/rest/microvisor.rb +70 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1/device_code.rb +153 -0
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +63 -0
- data/lib/twilio-ruby/rest/oauth.rb +68 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +0 -58
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
- data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
- data/lib/twilio-ruby/rest/routes.rb +62 -0
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +21 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +17 -7
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +5 -2
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +247 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +195 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +20 -0
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +3 -3
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +6 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +14 -10
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +8 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
- data/lib/twilio-ruby/rest/verify.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/security/request_validator.rb +1 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +135 -35
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +52 -17
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +0 -271
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
@@ -17,8 +17,11 @@ module Twilio
|
|
17
17
|
@version = 'v1'
|
18
18
|
@brand_registrations = nil
|
19
19
|
@deactivations = nil
|
20
|
+
@domain_certs = nil
|
21
|
+
@domain_config = nil
|
20
22
|
@external_campaign = nil
|
21
23
|
@services = nil
|
24
|
+
@tollfree_verifications = nil
|
22
25
|
@usecases = nil
|
23
26
|
end
|
24
27
|
|
@@ -43,6 +46,38 @@ module Twilio
|
|
43
46
|
@deactivations ||= DeactivationsContext.new self
|
44
47
|
end
|
45
48
|
|
49
|
+
##
|
50
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
51
|
+
# certificate should be associated with.
|
52
|
+
# @return [Twilio::REST::Messaging::V1::DomainCertsContext] if domain_sid was passed.
|
53
|
+
# @return [Twilio::REST::Messaging::V1::DomainCertsList]
|
54
|
+
def domain_certs(domain_sid=:unset)
|
55
|
+
if domain_sid.nil?
|
56
|
+
raise ArgumentError, 'domain_sid cannot be nil'
|
57
|
+
end
|
58
|
+
if domain_sid == :unset
|
59
|
+
@domain_certs ||= DomainCertsList.new self
|
60
|
+
else
|
61
|
+
DomainCertsContext.new(self, domain_sid)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
67
|
+
# config should be associated with.
|
68
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigContext] if domain_sid was passed.
|
69
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigList]
|
70
|
+
def domain_config(domain_sid=:unset)
|
71
|
+
if domain_sid.nil?
|
72
|
+
raise ArgumentError, 'domain_sid cannot be nil'
|
73
|
+
end
|
74
|
+
if domain_sid == :unset
|
75
|
+
@domain_config ||= DomainConfigList.new self
|
76
|
+
else
|
77
|
+
DomainConfigContext.new(self, domain_sid)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
46
81
|
##
|
47
82
|
# @return [Twilio::REST::Messaging::V1::ExternalCampaignContext]
|
48
83
|
def external_campaign
|
@@ -64,6 +99,21 @@ module Twilio
|
|
64
99
|
end
|
65
100
|
end
|
66
101
|
|
102
|
+
##
|
103
|
+
# @param [String] sid The unique string to identify Tollfree Verification.
|
104
|
+
# @return [Twilio::REST::Messaging::V1::TollfreeVerificationContext] if sid was passed.
|
105
|
+
# @return [Twilio::REST::Messaging::V1::TollfreeVerificationList]
|
106
|
+
def tollfree_verifications(sid=:unset)
|
107
|
+
if sid.nil?
|
108
|
+
raise ArgumentError, 'sid cannot be nil'
|
109
|
+
end
|
110
|
+
if sid == :unset
|
111
|
+
@tollfree_verifications ||= TollfreeVerificationList.new self
|
112
|
+
else
|
113
|
+
TollfreeVerificationContext.new(self, sid)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
67
117
|
##
|
68
118
|
# @return [Twilio::REST::Messaging::V1::UsecaseContext]
|
69
119
|
def usecases
|
@@ -42,6 +42,24 @@ module Twilio
|
|
42
42
|
self.v1.deactivations()
|
43
43
|
end
|
44
44
|
|
45
|
+
##
|
46
|
+
# @param [String] domain_sid The unique string that we created to identify the
|
47
|
+
# Domain resource.
|
48
|
+
# @return [Twilio::REST::Messaging::V1::DomainCertsInstance] if domain_sid was passed.
|
49
|
+
# @return [Twilio::REST::Messaging::V1::DomainCertsList]
|
50
|
+
def domain_certs(domain_sid=:unset)
|
51
|
+
self.v1.domain_certs(domain_sid)
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# @param [String] domain_sid The unique string that we created to identify the
|
56
|
+
# Domain resource.
|
57
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigInstance] if domain_sid was passed.
|
58
|
+
# @return [Twilio::REST::Messaging::V1::DomainConfigList]
|
59
|
+
def domain_config(domain_sid=:unset)
|
60
|
+
self.v1.domain_config(domain_sid)
|
61
|
+
end
|
62
|
+
|
45
63
|
##
|
46
64
|
# @return [Twilio::REST::Messaging::V1::ExternalCampaignInstance]
|
47
65
|
def external_campaign
|
@@ -57,6 +75,14 @@ module Twilio
|
|
57
75
|
self.v1.services(sid)
|
58
76
|
end
|
59
77
|
|
78
|
+
##
|
79
|
+
# @param [String] sid The unique string to identify Tollfree Verification.
|
80
|
+
# @return [Twilio::REST::Messaging::V1::TollfreeVerificationInstance] if sid was passed.
|
81
|
+
# @return [Twilio::REST::Messaging::V1::TollfreeVerificationList]
|
82
|
+
def tollfree_verifications(sid=:unset)
|
83
|
+
self.v1.tollfree_verifications(sid)
|
84
|
+
end
|
85
|
+
|
60
86
|
##
|
61
87
|
# @return [Twilio::REST::Messaging::V1::UsecaseInstance]
|
62
88
|
def usecases
|
@@ -0,0 +1,317 @@
|
|
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 Microvisor < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
+
class AccountConfigList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the AccountConfigList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [AccountConfigList] AccountConfigList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/Configs"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists AccountConfigInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
33
|
+
# guarantees to never return more than limit. Default is no limit
|
34
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
35
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
36
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
37
|
+
# efficient page size, i.e. min(limit, 1000)
|
38
|
+
# @return [Array] Array of up to limit results
|
39
|
+
def list(limit: nil, page_size: nil)
|
40
|
+
self.stream(limit: limit, page_size: page_size).entries
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Streams AccountConfigInstance records from the API as an Enumerable.
|
45
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
46
|
+
# is reached.
|
47
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
48
|
+
# guarantees to never return more than limit. Default is no limit.
|
49
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
50
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
51
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
52
|
+
# efficient page size, i.e. min(limit, 1000)
|
53
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
54
|
+
def stream(limit: nil, page_size: nil)
|
55
|
+
limits = @version.read_limits(limit, page_size)
|
56
|
+
|
57
|
+
page = self.page(page_size: limits[:page_size], )
|
58
|
+
|
59
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# When passed a block, yields AccountConfigInstance records from the API.
|
64
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
65
|
+
# is reached.
|
66
|
+
def each
|
67
|
+
limits = @version.read_limits
|
68
|
+
|
69
|
+
page = self.page(page_size: limits[:page_size], )
|
70
|
+
|
71
|
+
@version.stream(page,
|
72
|
+
limit: limits[:limit],
|
73
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Retrieve a single page of AccountConfigInstance records from the API.
|
78
|
+
# Request is executed immediately.
|
79
|
+
# @param [String] page_token PageToken provided by the API
|
80
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
81
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
82
|
+
# @return [Page] Page of AccountConfigInstance
|
83
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
84
|
+
params = Twilio::Values.of({
|
85
|
+
'PageToken' => page_token,
|
86
|
+
'Page' => page_number,
|
87
|
+
'PageSize' => page_size,
|
88
|
+
})
|
89
|
+
|
90
|
+
response = @version.page('GET', @uri, params: params)
|
91
|
+
|
92
|
+
AccountConfigPage.new(@version, response, @solution)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieve a single page of AccountConfigInstance records from the API.
|
97
|
+
# Request is executed immediately.
|
98
|
+
# @param [String] target_url API-generated URL for the requested results page
|
99
|
+
# @return [Page] Page of AccountConfigInstance
|
100
|
+
def get_page(target_url)
|
101
|
+
response = @version.domain.request(
|
102
|
+
'GET',
|
103
|
+
target_url
|
104
|
+
)
|
105
|
+
AccountConfigPage.new(@version, response, @solution)
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Create the AccountConfigInstance
|
110
|
+
# @param [String] key The config key; up to 100 characters.
|
111
|
+
# @param [String] value The config value; up to 4096 characters.
|
112
|
+
# @return [AccountConfigInstance] Created AccountConfigInstance
|
113
|
+
def create(key: nil, value: nil)
|
114
|
+
data = Twilio::Values.of({'Key' => key, 'Value' => value, })
|
115
|
+
|
116
|
+
payload = @version.create('POST', @uri, data: data)
|
117
|
+
|
118
|
+
AccountConfigInstance.new(@version, payload, )
|
119
|
+
end
|
120
|
+
|
121
|
+
##
|
122
|
+
# Provide a user friendly representation
|
123
|
+
def to_s
|
124
|
+
'#<Twilio.Microvisor.V1.AccountConfigList>'
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
##
|
129
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
130
|
+
class AccountConfigPage < Page
|
131
|
+
##
|
132
|
+
# Initialize the AccountConfigPage
|
133
|
+
# @param [Version] version Version that contains the resource
|
134
|
+
# @param [Response] response Response from the API
|
135
|
+
# @param [Hash] solution Path solution for the resource
|
136
|
+
# @return [AccountConfigPage] AccountConfigPage
|
137
|
+
def initialize(version, response, solution)
|
138
|
+
super(version, response)
|
139
|
+
|
140
|
+
# Path Solution
|
141
|
+
@solution = solution
|
142
|
+
end
|
143
|
+
|
144
|
+
##
|
145
|
+
# Build an instance of AccountConfigInstance
|
146
|
+
# @param [Hash] payload Payload response from the API
|
147
|
+
# @return [AccountConfigInstance] AccountConfigInstance
|
148
|
+
def get_instance(payload)
|
149
|
+
AccountConfigInstance.new(@version, payload, )
|
150
|
+
end
|
151
|
+
|
152
|
+
##
|
153
|
+
# Provide a user friendly representation
|
154
|
+
def to_s
|
155
|
+
'<Twilio.Microvisor.V1.AccountConfigPage>'
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
161
|
+
class AccountConfigContext < InstanceContext
|
162
|
+
##
|
163
|
+
# Initialize the AccountConfigContext
|
164
|
+
# @param [Version] version Version that contains the resource
|
165
|
+
# @param [String] key The config key; up to 100 characters.
|
166
|
+
# @return [AccountConfigContext] AccountConfigContext
|
167
|
+
def initialize(version, key)
|
168
|
+
super(version)
|
169
|
+
|
170
|
+
# Path Solution
|
171
|
+
@solution = {key: key, }
|
172
|
+
@uri = "/Configs/#{@solution[:key]}"
|
173
|
+
end
|
174
|
+
|
175
|
+
##
|
176
|
+
# Fetch the AccountConfigInstance
|
177
|
+
# @return [AccountConfigInstance] Fetched AccountConfigInstance
|
178
|
+
def fetch
|
179
|
+
payload = @version.fetch('GET', @uri)
|
180
|
+
|
181
|
+
AccountConfigInstance.new(@version, payload, key: @solution[:key], )
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# Update the AccountConfigInstance
|
186
|
+
# @param [String] value The config value; up to 4096 characters.
|
187
|
+
# @return [AccountConfigInstance] Updated AccountConfigInstance
|
188
|
+
def update(value: nil)
|
189
|
+
data = Twilio::Values.of({'Value' => value, })
|
190
|
+
|
191
|
+
payload = @version.update('POST', @uri, data: data)
|
192
|
+
|
193
|
+
AccountConfigInstance.new(@version, payload, key: @solution[:key], )
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# Delete the AccountConfigInstance
|
198
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
199
|
+
def delete
|
200
|
+
@version.delete('DELETE', @uri)
|
201
|
+
end
|
202
|
+
|
203
|
+
##
|
204
|
+
# Provide a user friendly representation
|
205
|
+
def to_s
|
206
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
207
|
+
"#<Twilio.Microvisor.V1.AccountConfigContext #{context}>"
|
208
|
+
end
|
209
|
+
|
210
|
+
##
|
211
|
+
# Provide a detailed, user friendly representation
|
212
|
+
def inspect
|
213
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
214
|
+
"#<Twilio.Microvisor.V1.AccountConfigContext #{context}>"
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
##
|
219
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
220
|
+
class AccountConfigInstance < InstanceResource
|
221
|
+
##
|
222
|
+
# Initialize the AccountConfigInstance
|
223
|
+
# @param [Version] version Version that contains the resource
|
224
|
+
# @param [Hash] payload payload that contains response from Twilio
|
225
|
+
# @param [String] key The config key; up to 100 characters.
|
226
|
+
# @return [AccountConfigInstance] AccountConfigInstance
|
227
|
+
def initialize(version, payload, key: nil)
|
228
|
+
super(version)
|
229
|
+
|
230
|
+
# Marshaled Properties
|
231
|
+
@properties = {
|
232
|
+
'key' => payload['key'],
|
233
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
234
|
+
'value' => payload['value'],
|
235
|
+
'url' => payload['url'],
|
236
|
+
}
|
237
|
+
|
238
|
+
# Context
|
239
|
+
@instance_context = nil
|
240
|
+
@params = {'key' => key || @properties['key'], }
|
241
|
+
end
|
242
|
+
|
243
|
+
##
|
244
|
+
# Generate an instance context for the instance, the context is capable of
|
245
|
+
# performing various actions. All instance actions are proxied to the context
|
246
|
+
# @return [AccountConfigContext] AccountConfigContext for this AccountConfigInstance
|
247
|
+
def context
|
248
|
+
unless @instance_context
|
249
|
+
@instance_context = AccountConfigContext.new(@version, @params['key'], )
|
250
|
+
end
|
251
|
+
@instance_context
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# @return [String] The config key.
|
256
|
+
def key
|
257
|
+
@properties['key']
|
258
|
+
end
|
259
|
+
|
260
|
+
##
|
261
|
+
# @return [Time] The date_updated
|
262
|
+
def date_updated
|
263
|
+
@properties['date_updated']
|
264
|
+
end
|
265
|
+
|
266
|
+
##
|
267
|
+
# @return [String] The config value.
|
268
|
+
def value
|
269
|
+
@properties['value']
|
270
|
+
end
|
271
|
+
|
272
|
+
##
|
273
|
+
# @return [String] The absolute URL of the Config.
|
274
|
+
def url
|
275
|
+
@properties['url']
|
276
|
+
end
|
277
|
+
|
278
|
+
##
|
279
|
+
# Fetch the AccountConfigInstance
|
280
|
+
# @return [AccountConfigInstance] Fetched AccountConfigInstance
|
281
|
+
def fetch
|
282
|
+
context.fetch
|
283
|
+
end
|
284
|
+
|
285
|
+
##
|
286
|
+
# Update the AccountConfigInstance
|
287
|
+
# @param [String] value The config value; up to 4096 characters.
|
288
|
+
# @return [AccountConfigInstance] Updated AccountConfigInstance
|
289
|
+
def update(value: nil)
|
290
|
+
context.update(value: value, )
|
291
|
+
end
|
292
|
+
|
293
|
+
##
|
294
|
+
# Delete the AccountConfigInstance
|
295
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
296
|
+
def delete
|
297
|
+
context.delete
|
298
|
+
end
|
299
|
+
|
300
|
+
##
|
301
|
+
# Provide a user friendly representation
|
302
|
+
def to_s
|
303
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
304
|
+
"<Twilio.Microvisor.V1.AccountConfigInstance #{values}>"
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# Provide a detailed, user friendly representation
|
309
|
+
def inspect
|
310
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
311
|
+
"<Twilio.Microvisor.V1.AccountConfigInstance #{values}>"
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|