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
|
@@ -270,7 +270,7 @@ module Twilio
|
|
|
270
270
|
'ended_reason' => payload['ended_reason'],
|
|
271
271
|
'status_callback' => payload['status_callback'],
|
|
272
272
|
'status_callback_method' => payload['status_callback_method'],
|
|
273
|
-
'max_duration' => payload['max_duration'].to_i,
|
|
273
|
+
'max_duration' => payload['max_duration'] == nil ? payload['max_duration'] : payload['max_duration'].to_i,
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
# Context
|
|
@@ -245,14 +245,14 @@ module Twilio
|
|
|
245
245
|
'account_sid' => payload['account_sid'],
|
|
246
246
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
247
247
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
248
|
-
'duration' => payload['duration'].to_i,
|
|
248
|
+
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
|
249
249
|
'format' => payload['format'],
|
|
250
250
|
'links' => payload['links'],
|
|
251
251
|
'processor_sid' => payload['processor_sid'],
|
|
252
252
|
'resolution' => payload['resolution'],
|
|
253
253
|
'source_sid' => payload['source_sid'],
|
|
254
254
|
'sid' => payload['sid'],
|
|
255
|
-
'media_size' => payload['media_size'].to_i,
|
|
255
|
+
'media_size' => payload['media_size'] == nil ? payload['media_size'] : payload['media_size'].to_i,
|
|
256
256
|
'status' => payload['status'],
|
|
257
257
|
'status_callback' => payload['status_callback'],
|
|
258
258
|
'status_callback_method' => payload['status_callback_method'],
|
|
@@ -269,7 +269,7 @@ module Twilio
|
|
|
269
269
|
'status_callback' => payload['status_callback'],
|
|
270
270
|
'status_callback_method' => payload['status_callback_method'],
|
|
271
271
|
'ended_reason' => payload['ended_reason'],
|
|
272
|
-
'max_duration' => payload['max_duration'].to_i,
|
|
272
|
+
'max_duration' => payload['max_duration'] == nil ? payload['max_duration'] : payload['max_duration'].to_i,
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
# Context
|
|
@@ -0,0 +1,134 @@
|
|
|
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 Messaging < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
class BrandRegistrationContext < InstanceContext
|
|
14
|
+
##
|
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
16
|
+
class BrandRegistrationOtpList < ListResource
|
|
17
|
+
##
|
|
18
|
+
# Initialize the BrandRegistrationOtpList
|
|
19
|
+
# @param [Version] version Version that contains the resource
|
|
20
|
+
# @param [String] brand_registration_sid The unique string to identify Brand
|
|
21
|
+
# Registration of Sole Proprietor Brand
|
|
22
|
+
# @return [BrandRegistrationOtpList] BrandRegistrationOtpList
|
|
23
|
+
def initialize(version, brand_registration_sid: nil)
|
|
24
|
+
super(version)
|
|
25
|
+
|
|
26
|
+
# Path Solution
|
|
27
|
+
@solution = {brand_registration_sid: brand_registration_sid}
|
|
28
|
+
@uri = "/a2p/BrandRegistrations/#{@solution[:brand_registration_sid]}/SmsOtp"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
##
|
|
32
|
+
# Create the BrandRegistrationOtpInstance
|
|
33
|
+
# @return [BrandRegistrationOtpInstance] Created BrandRegistrationOtpInstance
|
|
34
|
+
def create
|
|
35
|
+
payload = @version.create('POST', @uri)
|
|
36
|
+
|
|
37
|
+
BrandRegistrationOtpInstance.new(
|
|
38
|
+
@version,
|
|
39
|
+
payload,
|
|
40
|
+
brand_registration_sid: @solution[:brand_registration_sid],
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
##
|
|
45
|
+
# Provide a user friendly representation
|
|
46
|
+
def to_s
|
|
47
|
+
'#<Twilio.Messaging.V1.BrandRegistrationOtpList>'
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
##
|
|
52
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
53
|
+
class BrandRegistrationOtpPage < Page
|
|
54
|
+
##
|
|
55
|
+
# Initialize the BrandRegistrationOtpPage
|
|
56
|
+
# @param [Version] version Version that contains the resource
|
|
57
|
+
# @param [Response] response Response from the API
|
|
58
|
+
# @param [Hash] solution Path solution for the resource
|
|
59
|
+
# @return [BrandRegistrationOtpPage] BrandRegistrationOtpPage
|
|
60
|
+
def initialize(version, response, solution)
|
|
61
|
+
super(version, response)
|
|
62
|
+
|
|
63
|
+
# Path Solution
|
|
64
|
+
@solution = solution
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
##
|
|
68
|
+
# Build an instance of BrandRegistrationOtpInstance
|
|
69
|
+
# @param [Hash] payload Payload response from the API
|
|
70
|
+
# @return [BrandRegistrationOtpInstance] BrandRegistrationOtpInstance
|
|
71
|
+
def get_instance(payload)
|
|
72
|
+
BrandRegistrationOtpInstance.new(
|
|
73
|
+
@version,
|
|
74
|
+
payload,
|
|
75
|
+
brand_registration_sid: @solution[:brand_registration_sid],
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
##
|
|
80
|
+
# Provide a user friendly representation
|
|
81
|
+
def to_s
|
|
82
|
+
'<Twilio.Messaging.V1.BrandRegistrationOtpPage>'
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
##
|
|
87
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
88
|
+
class BrandRegistrationOtpInstance < InstanceResource
|
|
89
|
+
##
|
|
90
|
+
# Initialize the BrandRegistrationOtpInstance
|
|
91
|
+
# @param [Version] version Version that contains the resource
|
|
92
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
93
|
+
# @param [String] brand_registration_sid The unique string to identify Brand
|
|
94
|
+
# Registration of Sole Proprietor Brand
|
|
95
|
+
# @return [BrandRegistrationOtpInstance] BrandRegistrationOtpInstance
|
|
96
|
+
def initialize(version, payload, brand_registration_sid: nil)
|
|
97
|
+
super(version)
|
|
98
|
+
|
|
99
|
+
# Marshaled Properties
|
|
100
|
+
@properties = {
|
|
101
|
+
'account_sid' => payload['account_sid'],
|
|
102
|
+
'brand_registration_sid' => payload['brand_registration_sid'],
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
##
|
|
107
|
+
# @return [String] The SID of the Account that created the vetting
|
|
108
|
+
def account_sid
|
|
109
|
+
@properties['account_sid']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
##
|
|
113
|
+
# @return [String] Brand Registration Sid
|
|
114
|
+
def brand_registration_sid
|
|
115
|
+
@properties['brand_registration_sid']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
##
|
|
119
|
+
# Provide a user friendly representation
|
|
120
|
+
def to_s
|
|
121
|
+
"<Twilio.Messaging.V1.BrandRegistrationOtpInstance>"
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
##
|
|
125
|
+
# Provide a detailed, user friendly representation
|
|
126
|
+
def inspect
|
|
127
|
+
"<Twilio.Messaging.V1.BrandRegistrationOtpInstance>"
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -110,8 +110,8 @@ module Twilio
|
|
|
110
110
|
# @param [String] customer_profile_bundle_sid Customer Profile Bundle Sid.
|
|
111
111
|
# @param [String] a2p_profile_bundle_sid A2P Messaging Profile Bundle Sid.
|
|
112
112
|
# @param [String] brand_type Type of brand being created. One of: "STANDARD",
|
|
113
|
-
# "
|
|
114
|
-
# other use cases.
|
|
113
|
+
# "SOLE_PROPRIETOR". SOLE_PROPRIETOR is for low volume, SOLE_PROPRIETOR use cases.
|
|
114
|
+
# STANDARD is for all other use cases.
|
|
115
115
|
# @param [Boolean] mock A boolean that specifies whether brand should be a mock or
|
|
116
116
|
# not. If true, brand will be registered as a mock brand. Defaults to false if no
|
|
117
117
|
# value is provided.
|
|
@@ -187,6 +187,7 @@ module Twilio
|
|
|
187
187
|
|
|
188
188
|
# Dependents
|
|
189
189
|
@brand_vettings = nil
|
|
190
|
+
@brand_registration_otps = nil
|
|
190
191
|
end
|
|
191
192
|
|
|
192
193
|
##
|
|
@@ -225,6 +226,21 @@ module Twilio
|
|
|
225
226
|
@brand_vettings
|
|
226
227
|
end
|
|
227
228
|
|
|
229
|
+
##
|
|
230
|
+
# Access the brand_registration_otps
|
|
231
|
+
# @return [BrandRegistrationOtpList]
|
|
232
|
+
# @return [BrandRegistrationOtpContext]
|
|
233
|
+
def brand_registration_otps
|
|
234
|
+
unless @brand_registration_otps
|
|
235
|
+
@brand_registration_otps = BrandRegistrationOtpList.new(
|
|
236
|
+
@version,
|
|
237
|
+
brand_registration_sid: @solution[:sid],
|
|
238
|
+
)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
@brand_registration_otps
|
|
242
|
+
end
|
|
243
|
+
|
|
228
244
|
##
|
|
229
245
|
# Provide a user friendly representation
|
|
230
246
|
def to_s
|
|
@@ -329,7 +345,7 @@ module Twilio
|
|
|
329
345
|
end
|
|
330
346
|
|
|
331
347
|
##
|
|
332
|
-
# @return [String] Type of brand. One of: "STANDARD", "
|
|
348
|
+
# @return [String] Type of brand. One of: "STANDARD", "SOLE_PROPRIETOR".
|
|
333
349
|
def brand_type
|
|
334
350
|
@properties['brand_type']
|
|
335
351
|
end
|
|
@@ -433,6 +449,13 @@ module Twilio
|
|
|
433
449
|
context.brand_vettings
|
|
434
450
|
end
|
|
435
451
|
|
|
452
|
+
##
|
|
453
|
+
# Access the brand_registration_otps
|
|
454
|
+
# @return [brand_registration_otps] brand_registration_otps
|
|
455
|
+
def brand_registration_otps
|
|
456
|
+
context.brand_registration_otps
|
|
457
|
+
end
|
|
458
|
+
|
|
436
459
|
##
|
|
437
460
|
# Provide a user friendly representation
|
|
438
461
|
def to_s
|
|
@@ -0,0 +1,257 @@
|
|
|
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 Messaging < Domain
|
|
12
|
+
class V1 < Version
|
|
13
|
+
##
|
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
15
|
+
class DomainCertsList < ListResource
|
|
16
|
+
##
|
|
17
|
+
# Initialize the DomainCertsList
|
|
18
|
+
# @param [Version] version Version that contains the resource
|
|
19
|
+
# @return [DomainCertsList] DomainCertsList
|
|
20
|
+
def initialize(version)
|
|
21
|
+
super(version)
|
|
22
|
+
|
|
23
|
+
# Path Solution
|
|
24
|
+
@solution = {}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
##
|
|
28
|
+
# Provide a user friendly representation
|
|
29
|
+
def to_s
|
|
30
|
+
'#<Twilio.Messaging.V1.DomainCertsList>'
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
##
|
|
35
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
36
|
+
class DomainCertsPage < Page
|
|
37
|
+
##
|
|
38
|
+
# Initialize the DomainCertsPage
|
|
39
|
+
# @param [Version] version Version that contains the resource
|
|
40
|
+
# @param [Response] response Response from the API
|
|
41
|
+
# @param [Hash] solution Path solution for the resource
|
|
42
|
+
# @return [DomainCertsPage] DomainCertsPage
|
|
43
|
+
def initialize(version, response, solution)
|
|
44
|
+
super(version, response)
|
|
45
|
+
|
|
46
|
+
# Path Solution
|
|
47
|
+
@solution = solution
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
##
|
|
51
|
+
# Build an instance of DomainCertsInstance
|
|
52
|
+
# @param [Hash] payload Payload response from the API
|
|
53
|
+
# @return [DomainCertsInstance] DomainCertsInstance
|
|
54
|
+
def get_instance(payload)
|
|
55
|
+
DomainCertsInstance.new(@version, payload, )
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
##
|
|
59
|
+
# Provide a user friendly representation
|
|
60
|
+
def to_s
|
|
61
|
+
'<Twilio.Messaging.V1.DomainCertsPage>'
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
67
|
+
class DomainCertsContext < InstanceContext
|
|
68
|
+
##
|
|
69
|
+
# Initialize the DomainCertsContext
|
|
70
|
+
# @param [Version] version Version that contains the resource
|
|
71
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
|
72
|
+
# certificate should be associated with.
|
|
73
|
+
# @return [DomainCertsContext] DomainCertsContext
|
|
74
|
+
def initialize(version, domain_sid)
|
|
75
|
+
super(version)
|
|
76
|
+
|
|
77
|
+
# Path Solution
|
|
78
|
+
@solution = {domain_sid: domain_sid, }
|
|
79
|
+
@uri = "/LinkShortening/Domains/#{@solution[:domain_sid]}/Certificate"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
##
|
|
83
|
+
# Update the DomainCertsInstance
|
|
84
|
+
# @param [String] tls_cert Contains the full TLS certificate and private for this
|
|
85
|
+
# domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail.
|
|
86
|
+
# Twilio uses this information to process HTTPS traffic sent to your domain.
|
|
87
|
+
# @return [DomainCertsInstance] Updated DomainCertsInstance
|
|
88
|
+
def update(tls_cert: nil)
|
|
89
|
+
data = Twilio::Values.of({'TlsCert' => tls_cert, })
|
|
90
|
+
|
|
91
|
+
payload = @version.update('POST', @uri, data: data)
|
|
92
|
+
|
|
93
|
+
DomainCertsInstance.new(@version, payload, domain_sid: @solution[:domain_sid], )
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
##
|
|
97
|
+
# Fetch the DomainCertsInstance
|
|
98
|
+
# @return [DomainCertsInstance] Fetched DomainCertsInstance
|
|
99
|
+
def fetch
|
|
100
|
+
payload = @version.fetch('GET', @uri)
|
|
101
|
+
|
|
102
|
+
DomainCertsInstance.new(@version, payload, domain_sid: @solution[:domain_sid], )
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
##
|
|
106
|
+
# Delete the DomainCertsInstance
|
|
107
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
108
|
+
def delete
|
|
109
|
+
@version.delete('DELETE', @uri)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
##
|
|
113
|
+
# Provide a user friendly representation
|
|
114
|
+
def to_s
|
|
115
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
116
|
+
"#<Twilio.Messaging.V1.DomainCertsContext #{context}>"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
##
|
|
120
|
+
# Provide a detailed, user friendly representation
|
|
121
|
+
def inspect
|
|
122
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
123
|
+
"#<Twilio.Messaging.V1.DomainCertsContext #{context}>"
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
##
|
|
128
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
|
129
|
+
class DomainCertsInstance < InstanceResource
|
|
130
|
+
##
|
|
131
|
+
# Initialize the DomainCertsInstance
|
|
132
|
+
# @param [Version] version Version that contains the resource
|
|
133
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
134
|
+
# @param [String] domain_sid Unique string used to identify the domain that this
|
|
135
|
+
# certificate should be associated with.
|
|
136
|
+
# @return [DomainCertsInstance] DomainCertsInstance
|
|
137
|
+
def initialize(version, payload, domain_sid: nil)
|
|
138
|
+
super(version)
|
|
139
|
+
|
|
140
|
+
# Marshaled Properties
|
|
141
|
+
@properties = {
|
|
142
|
+
'domain_sid' => payload['domain_sid'],
|
|
143
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
144
|
+
'date_expires' => Twilio.deserialize_iso8601_datetime(payload['date_expires']),
|
|
145
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
146
|
+
'domain_name' => payload['domain_name'],
|
|
147
|
+
'certificate_sid' => payload['certificate_sid'],
|
|
148
|
+
'url' => payload['url'],
|
|
149
|
+
'cert_in_validation' => payload['cert_in_validation'],
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
# Context
|
|
153
|
+
@instance_context = nil
|
|
154
|
+
@params = {'domain_sid' => domain_sid || @properties['domain_sid'], }
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
##
|
|
158
|
+
# Generate an instance context for the instance, the context is capable of
|
|
159
|
+
# performing various actions. All instance actions are proxied to the context
|
|
160
|
+
# @return [DomainCertsContext] DomainCertsContext for this DomainCertsInstance
|
|
161
|
+
def context
|
|
162
|
+
unless @instance_context
|
|
163
|
+
@instance_context = DomainCertsContext.new(@version, @params['domain_sid'], )
|
|
164
|
+
end
|
|
165
|
+
@instance_context
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
##
|
|
169
|
+
# @return [String] The unique string that we created to identify the Domain resource.
|
|
170
|
+
def domain_sid
|
|
171
|
+
@properties['domain_sid']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
##
|
|
175
|
+
# @return [Time] Date that this Domain was last updated.
|
|
176
|
+
def date_updated
|
|
177
|
+
@properties['date_updated']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
##
|
|
181
|
+
# @return [Time] Expiration date for your private certificate.
|
|
182
|
+
def date_expires
|
|
183
|
+
@properties['date_expires']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
##
|
|
187
|
+
# @return [Time] Date this Domain SID was created.
|
|
188
|
+
def date_created
|
|
189
|
+
@properties['date_created']
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
##
|
|
193
|
+
# @return [String] Full url path for this domain.
|
|
194
|
+
def domain_name
|
|
195
|
+
@properties['domain_name']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
##
|
|
199
|
+
# @return [String] The unique string that we created to identify this Certificate resource.
|
|
200
|
+
def certificate_sid
|
|
201
|
+
@properties['certificate_sid']
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
##
|
|
205
|
+
# @return [String] The url
|
|
206
|
+
def url
|
|
207
|
+
@properties['url']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
##
|
|
211
|
+
# @return [Hash] New certificate in process of validation field
|
|
212
|
+
def cert_in_validation
|
|
213
|
+
@properties['cert_in_validation']
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
##
|
|
217
|
+
# Update the DomainCertsInstance
|
|
218
|
+
# @param [String] tls_cert Contains the full TLS certificate and private for this
|
|
219
|
+
# domain in PEM format: https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail.
|
|
220
|
+
# Twilio uses this information to process HTTPS traffic sent to your domain.
|
|
221
|
+
# @return [DomainCertsInstance] Updated DomainCertsInstance
|
|
222
|
+
def update(tls_cert: nil)
|
|
223
|
+
context.update(tls_cert: tls_cert, )
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
##
|
|
227
|
+
# Fetch the DomainCertsInstance
|
|
228
|
+
# @return [DomainCertsInstance] Fetched DomainCertsInstance
|
|
229
|
+
def fetch
|
|
230
|
+
context.fetch
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
##
|
|
234
|
+
# Delete the DomainCertsInstance
|
|
235
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
236
|
+
def delete
|
|
237
|
+
context.delete
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
##
|
|
241
|
+
# Provide a user friendly representation
|
|
242
|
+
def to_s
|
|
243
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
244
|
+
"<Twilio.Messaging.V1.DomainCertsInstance #{values}>"
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
##
|
|
248
|
+
# Provide a detailed, user friendly representation
|
|
249
|
+
def inspect
|
|
250
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
251
|
+
"<Twilio.Messaging.V1.DomainCertsInstance #{values}>"
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
end
|