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
@@ -0,0 +1,254 @@
|
|
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 Content < 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 LegacyContentList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the LegacyContentList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [LegacyContentList] LegacyContentList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/LegacyContent"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists LegacyContentInstance 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 LegacyContentInstance 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 LegacyContentInstance 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 LegacyContentInstance 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 LegacyContentInstance
|
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
|
+
LegacyContentPage.new(@version, response, @solution)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieve a single page of LegacyContentInstance 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 LegacyContentInstance
|
100
|
+
def get_page(target_url)
|
101
|
+
response = @version.domain.request(
|
102
|
+
'GET',
|
103
|
+
target_url
|
104
|
+
)
|
105
|
+
LegacyContentPage.new(@version, response, @solution)
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Provide a user friendly representation
|
110
|
+
def to_s
|
111
|
+
'#<Twilio.Content.V1.LegacyContentList>'
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
117
|
+
class LegacyContentPage < Page
|
118
|
+
##
|
119
|
+
# Initialize the LegacyContentPage
|
120
|
+
# @param [Version] version Version that contains the resource
|
121
|
+
# @param [Response] response Response from the API
|
122
|
+
# @param [Hash] solution Path solution for the resource
|
123
|
+
# @return [LegacyContentPage] LegacyContentPage
|
124
|
+
def initialize(version, response, solution)
|
125
|
+
super(version, response)
|
126
|
+
|
127
|
+
# Path Solution
|
128
|
+
@solution = solution
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Build an instance of LegacyContentInstance
|
133
|
+
# @param [Hash] payload Payload response from the API
|
134
|
+
# @return [LegacyContentInstance] LegacyContentInstance
|
135
|
+
def get_instance(payload)
|
136
|
+
LegacyContentInstance.new(@version, payload, )
|
137
|
+
end
|
138
|
+
|
139
|
+
##
|
140
|
+
# Provide a user friendly representation
|
141
|
+
def to_s
|
142
|
+
'<Twilio.Content.V1.LegacyContentPage>'
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# 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.
|
148
|
+
class LegacyContentInstance < InstanceResource
|
149
|
+
##
|
150
|
+
# Initialize the LegacyContentInstance
|
151
|
+
# @param [Version] version Version that contains the resource
|
152
|
+
# @param [Hash] payload payload that contains response from Twilio
|
153
|
+
# @return [LegacyContentInstance] LegacyContentInstance
|
154
|
+
def initialize(version, payload)
|
155
|
+
super(version)
|
156
|
+
|
157
|
+
# Marshaled Properties
|
158
|
+
@properties = {
|
159
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
160
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
161
|
+
'sid' => payload['sid'],
|
162
|
+
'account_sid' => payload['account_sid'],
|
163
|
+
'friendly_name' => payload['friendly_name'],
|
164
|
+
'language' => payload['language'],
|
165
|
+
'variables' => payload['variables'],
|
166
|
+
'types' => payload['types'],
|
167
|
+
'legacy_template_name' => payload['legacy_template_name'],
|
168
|
+
'legacy_body' => payload['legacy_body'],
|
169
|
+
'url' => payload['url'],
|
170
|
+
}
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
175
|
+
def date_created
|
176
|
+
@properties['date_created']
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
181
|
+
def date_updated
|
182
|
+
@properties['date_updated']
|
183
|
+
end
|
184
|
+
|
185
|
+
##
|
186
|
+
# @return [String] The unique string that identifies the resource
|
187
|
+
def sid
|
188
|
+
@properties['sid']
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# @return [String] The SID of the Account that created the resource
|
193
|
+
def account_sid
|
194
|
+
@properties['account_sid']
|
195
|
+
end
|
196
|
+
|
197
|
+
##
|
198
|
+
# @return [String] A string name used to describe the Content resource
|
199
|
+
def friendly_name
|
200
|
+
@properties['friendly_name']
|
201
|
+
end
|
202
|
+
|
203
|
+
##
|
204
|
+
# @return [String] Two-letter language code identifying the language the Content resource is in.
|
205
|
+
def language
|
206
|
+
@properties['language']
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# @return [Hash] Defines the default placeholder values for variables included in the Content resource
|
211
|
+
def variables
|
212
|
+
@properties['variables']
|
213
|
+
end
|
214
|
+
|
215
|
+
##
|
216
|
+
# @return [Hash] The Content types (e.g. twilio/text) for this Content resource
|
217
|
+
def types
|
218
|
+
@properties['types']
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# @return [String] The string name of the legacy content template associated with this Content resource
|
223
|
+
def legacy_template_name
|
224
|
+
@properties['legacy_template_name']
|
225
|
+
end
|
226
|
+
|
227
|
+
##
|
228
|
+
# @return [String] The string body of this legacy content template
|
229
|
+
def legacy_body
|
230
|
+
@properties['legacy_body']
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# @return [String] The URL of the resource, relative to `https://content.twilio.com`
|
235
|
+
def url
|
236
|
+
@properties['url']
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# Provide a user friendly representation
|
241
|
+
def to_s
|
242
|
+
"<Twilio.Content.V1.LegacyContentInstance>"
|
243
|
+
end
|
244
|
+
|
245
|
+
##
|
246
|
+
# Provide a detailed, user friendly representation
|
247
|
+
def inspect
|
248
|
+
"<Twilio.Content.V1.LegacyContentInstance>"
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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 Content
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# Initialize the V1 version of Content
|
15
|
+
def initialize(domain)
|
16
|
+
super
|
17
|
+
@version = 'v1'
|
18
|
+
@contents = nil
|
19
|
+
@legacy_contents = nil
|
20
|
+
end
|
21
|
+
|
22
|
+
##
|
23
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
24
|
+
# Content resource to fetch.
|
25
|
+
# @return [Twilio::REST::Content::V1::ContentContext] if sid was passed.
|
26
|
+
# @return [Twilio::REST::Content::V1::ContentList]
|
27
|
+
def contents(sid=:unset)
|
28
|
+
if sid.nil?
|
29
|
+
raise ArgumentError, 'sid cannot be nil'
|
30
|
+
end
|
31
|
+
if sid == :unset
|
32
|
+
@contents ||= ContentList.new self
|
33
|
+
else
|
34
|
+
ContentContext.new(self, sid)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
##
|
39
|
+
# @return [Twilio::REST::Content::V1::LegacyContentContext]
|
40
|
+
def legacy_contents
|
41
|
+
@legacy_contents ||= LegacyContentList.new self
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# Provide a user friendly representation
|
46
|
+
def to_s
|
47
|
+
'<Twilio::REST::Content::V1>'
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,53 @@
|
|
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 Content < Domain
|
12
|
+
##
|
13
|
+
# Initialize the Content Domain
|
14
|
+
def initialize(twilio)
|
15
|
+
super
|
16
|
+
|
17
|
+
@base_url = 'https://content.twilio.com'
|
18
|
+
@host = 'content.twilio.com'
|
19
|
+
@port = 443
|
20
|
+
|
21
|
+
# Versions
|
22
|
+
@v1 = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Version v1 of content
|
27
|
+
def v1
|
28
|
+
@v1 ||= V1.new self
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# @param [String] sid The unique string that that we created to identify the
|
33
|
+
# Content resource.
|
34
|
+
# @return [Twilio::REST::Content::V1::ContentInstance] if sid was passed.
|
35
|
+
# @return [Twilio::REST::Content::V1::ContentList]
|
36
|
+
def contents(sid=:unset)
|
37
|
+
self.v1.contents(sid)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# @return [Twilio::REST::Content::V1::LegacyContentInstance]
|
42
|
+
def legacy_contents
|
43
|
+
self.v1.legacy_contents()
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Provide a user friendly representation
|
48
|
+
def to_s
|
49
|
+
'#<Twilio::REST::Content>'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -229,7 +229,7 @@ module Twilio
|
|
229
229
|
'channel_message_sid' => payload['channel_message_sid'],
|
230
230
|
'participant_sid' => payload['participant_sid'],
|
231
231
|
'status' => payload['status'],
|
232
|
-
'error_code' => payload['error_code'].to_i,
|
232
|
+
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
233
233
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
234
234
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
235
235
|
'url' => payload['url'],
|
@@ -40,10 +40,16 @@ module Twilio
|
|
40
40
|
# you wish. The string value must contain structurally valid JSON if specified.
|
41
41
|
# **Note** that if the attributes are not set "{}" will be returned.
|
42
42
|
# @param [String] media_sid The Media SID to be attached to the new Message.
|
43
|
+
# @param [String] content_sid The unique ID of the multi-channel {Rich
|
44
|
+
# Content}[https://www.twilio.com/docs/content-api] template, required for
|
45
|
+
# template-generated messages. **Note** that if this field is set, `Body` and
|
46
|
+
# `MediaSid` parameters are ignored.
|
47
|
+
# @param [String] content_variables A structurally valid JSON string that contains
|
48
|
+
# values to resolve Rich Content template variables.
|
43
49
|
# @param [message.WebhookEnabledType] x_twilio_webhook_enabled The
|
44
50
|
# X-Twilio-Webhook-Enabled HTTP request header
|
45
51
|
# @return [MessageInstance] Created MessageInstance
|
46
|
-
def create(author: :unset, body: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, media_sid: :unset, x_twilio_webhook_enabled: :unset)
|
52
|
+
def create(author: :unset, body: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, media_sid: :unset, content_sid: :unset, content_variables: :unset, x_twilio_webhook_enabled: :unset)
|
47
53
|
data = Twilio::Values.of({
|
48
54
|
'Author' => author,
|
49
55
|
'Body' => body,
|
@@ -51,6 +57,8 @@ module Twilio
|
|
51
57
|
'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
|
52
58
|
'Attributes' => attributes,
|
53
59
|
'MediaSid' => media_sid,
|
60
|
+
'ContentSid' => content_sid,
|
61
|
+
'ContentVariables' => content_variables,
|
54
62
|
})
|
55
63
|
headers = Twilio::Values.of({'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, })
|
56
64
|
|
@@ -319,7 +327,7 @@ module Twilio
|
|
319
327
|
'account_sid' => payload['account_sid'],
|
320
328
|
'conversation_sid' => payload['conversation_sid'],
|
321
329
|
'sid' => payload['sid'],
|
322
|
-
'index' => payload['index'].to_i,
|
330
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
323
331
|
'author' => payload['author'],
|
324
332
|
'body' => payload['body'],
|
325
333
|
'media' => payload['media'],
|
@@ -330,6 +338,7 @@ module Twilio
|
|
330
338
|
'url' => payload['url'],
|
331
339
|
'delivery' => payload['delivery'],
|
332
340
|
'links' => payload['links'],
|
341
|
+
'content_sid' => payload['content_sid'],
|
333
342
|
}
|
334
343
|
|
335
344
|
# Context
|
@@ -432,6 +441,12 @@ module Twilio
|
|
432
441
|
@properties['links']
|
433
442
|
end
|
434
443
|
|
444
|
+
##
|
445
|
+
# @return [String] The unique ID of the multi-channel Rich Content template.
|
446
|
+
def content_sid
|
447
|
+
@properties['content_sid']
|
448
|
+
end
|
449
|
+
|
435
450
|
##
|
436
451
|
# Update the MessageInstance
|
437
452
|
# @param [String] author The channel specific identifier of the message's author.
|
@@ -251,7 +251,7 @@ module Twilio
|
|
251
251
|
'channel_message_sid' => payload['channel_message_sid'],
|
252
252
|
'participant_sid' => payload['participant_sid'],
|
253
253
|
'status' => payload['status'],
|
254
|
-
'error_code' => payload['error_code'].to_i,
|
254
|
+
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
255
255
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
256
256
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
257
257
|
'url' => payload['url'],
|
@@ -44,10 +44,16 @@ module Twilio
|
|
44
44
|
# you wish. The string value must contain structurally valid JSON if specified.
|
45
45
|
# **Note** that if the attributes are not set "{}" will be returned.
|
46
46
|
# @param [String] media_sid The Media SID to be attached to the new Message.
|
47
|
+
# @param [String] content_sid The unique ID of the multi-channel {Rich
|
48
|
+
# Content}[https://www.twilio.com/docs/content-api] template, required for
|
49
|
+
# template-generated messages. **Note** that if this field is set, `Body` and
|
50
|
+
# `MediaSid` parameters are ignored.
|
51
|
+
# @param [String] content_variables A structurally valid JSON string that contains
|
52
|
+
# values to resolve Rich Content template variables.
|
47
53
|
# @param [message.WebhookEnabledType] x_twilio_webhook_enabled The
|
48
54
|
# X-Twilio-Webhook-Enabled HTTP request header
|
49
55
|
# @return [MessageInstance] Created MessageInstance
|
50
|
-
def create(author: :unset, body: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, media_sid: :unset, x_twilio_webhook_enabled: :unset)
|
56
|
+
def create(author: :unset, body: :unset, date_created: :unset, date_updated: :unset, attributes: :unset, media_sid: :unset, content_sid: :unset, content_variables: :unset, x_twilio_webhook_enabled: :unset)
|
51
57
|
data = Twilio::Values.of({
|
52
58
|
'Author' => author,
|
53
59
|
'Body' => body,
|
@@ -55,6 +61,8 @@ module Twilio
|
|
55
61
|
'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
|
56
62
|
'Attributes' => attributes,
|
57
63
|
'MediaSid' => media_sid,
|
64
|
+
'ContentSid' => content_sid,
|
65
|
+
'ContentVariables' => content_variables,
|
58
66
|
})
|
59
67
|
headers = Twilio::Values.of({'X-Twilio-Webhook-Enabled' => x_twilio_webhook_enabled, })
|
60
68
|
|
@@ -349,7 +357,7 @@ module Twilio
|
|
349
357
|
'chat_service_sid' => payload['chat_service_sid'],
|
350
358
|
'conversation_sid' => payload['conversation_sid'],
|
351
359
|
'sid' => payload['sid'],
|
352
|
-
'index' => payload['index'].to_i,
|
360
|
+
'index' => payload['index'] == nil ? payload['index'] : payload['index'].to_i,
|
353
361
|
'author' => payload['author'],
|
354
362
|
'body' => payload['body'],
|
355
363
|
'media' => payload['media'],
|
@@ -360,6 +368,7 @@ module Twilio
|
|
360
368
|
'delivery' => payload['delivery'],
|
361
369
|
'url' => payload['url'],
|
362
370
|
'links' => payload['links'],
|
371
|
+
'content_sid' => payload['content_sid'],
|
363
372
|
}
|
364
373
|
|
365
374
|
# Context
|
@@ -477,6 +486,12 @@ module Twilio
|
|
477
486
|
@properties['links']
|
478
487
|
end
|
479
488
|
|
489
|
+
##
|
490
|
+
# @return [String] The unique ID of the multi-channel Rich Content template.
|
491
|
+
def content_sid
|
492
|
+
@properties['content_sid']
|
493
|
+
end
|
494
|
+
|
480
495
|
##
|
481
496
|
# Update the MessageInstance
|
482
497
|
# @param [String] author The channel specific identifier of the message's author.
|
@@ -210,7 +210,7 @@ module Twilio
|
|
210
210
|
# Marshaled Properties
|
211
211
|
@properties = {
|
212
212
|
'id' => payload['id'],
|
213
|
-
'schema_version' => payload['schema_version'].to_i,
|
213
|
+
'schema_version' => payload['schema_version'] == nil ? payload['schema_version'] : payload['schema_version'].to_i,
|
214
214
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
215
215
|
'url' => payload['url'],
|
216
216
|
'raw' => payload['raw'],
|
@@ -143,7 +143,7 @@ module Twilio
|
|
143
143
|
'url' => payload['url'],
|
144
144
|
'links' => payload['links'],
|
145
145
|
'latest_version_date_created' => Twilio.deserialize_iso8601_datetime(payload['latest_version_date_created']),
|
146
|
-
'latest_version' => payload['latest_version'].to_i,
|
146
|
+
'latest_version' => payload['latest_version'] == nil ? payload['latest_version'] : payload['latest_version'].to_i,
|
147
147
|
}
|
148
148
|
|
149
149
|
# Context
|
@@ -247,7 +247,7 @@ module Twilio
|
|
247
247
|
@properties = {
|
248
248
|
'account_sid' => payload['account_sid'],
|
249
249
|
'type' => payload['type'],
|
250
|
-
'schema_version' => payload['schema_version'].to_i,
|
250
|
+
'schema_version' => payload['schema_version'] == nil ? payload['schema_version'] : payload['schema_version'].to_i,
|
251
251
|
'subscription_sid' => payload['subscription_sid'],
|
252
252
|
'url' => payload['url'],
|
253
253
|
}
|