twilio-ruby 6.12.1 → 7.0.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test-and-deploy.yml +9 -9
- data/CHANGES.md +10 -57
- data/README.md +2 -2
- data/UPGRADE.md +10 -0
- data/lib/twilio-ruby/framework/request.rb +8 -1
- data/lib/twilio-ruby/http/http_client.rb +10 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +267 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +332 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +37 -28
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +3 -27
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +0 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +0 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -17
- data/lib/twilio-ruby/rest/client.rb +5 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +184 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -2
- data/lib/twilio-ruby/rest/content/v1/content.rb +363 -3
- data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +1 -1
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +0 -2
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +21 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai.rb +274 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai_report_insights.rb +253 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +0 -2
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +0 -2
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +0 -2
- data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -2
- data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -2
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +1 -11
- data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -2
- data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -112
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -2
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -2
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +0 -2
- data/lib/twilio-ruby/rest/insights/v1/room.rb +0 -2
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +0 -2
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -2
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +0 -2
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +0 -2
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +6 -8
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -2
- data/lib/twilio-ruby/rest/media.rb +32 -3
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +2 -11
- data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +4 -13
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -2
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -2
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +0 -2
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -2
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -2
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -2
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -2
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +0 -2
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +0 -2
- data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -2
- data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +13 -2
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +125 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -2
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +132 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -2
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -2
- data/lib/twilio-ruby/rest/numbers/v1.rb +15 -3
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +0 -2
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +13 -2
- data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +0 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +3 -15
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -2
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +0 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +0 -2
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +0 -2
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +0 -2
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +0 -2
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -2
- data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -2
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +0 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +0 -2
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -2
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +0 -2
- data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +164 -0
- data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +235 -0
- data/lib/twilio-ruby/rest/preview_messaging/v1.rb +46 -0
- data/lib/twilio-ruby/rest/preview_messaging.rb +12 -0
- data/lib/twilio-ruby/rest/preview_messaging_base.rb +38 -0
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +0 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +0 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +0 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +0 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +0 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +0 -2
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +0 -2
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +0 -2
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +0 -2
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +0 -2
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +0 -2
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +0 -2
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +0 -2
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +0 -2
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +0 -2
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +0 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +161 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +8 -8
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +2 -26
- data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -2
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -2
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +0 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -2
- data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +17 -12
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +0 -384
- data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +0 -446
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +0 -247
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +0 -393
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +0 -386
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +0 -233
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +0 -332
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +0 -256
@@ -19,6 +19,334 @@ module Twilio
|
|
19
19
|
class V1 < Version
|
20
20
|
class ContentList < ListResource
|
21
21
|
|
22
|
+
class AuthenticationAction
|
23
|
+
# @param [type]: [AuthenticationActionType]
|
24
|
+
# @param [copy_code_text]: [String]
|
25
|
+
attr_accessor :type, :copy_code_text
|
26
|
+
def initialize(payload)
|
27
|
+
@type = payload["type"]
|
28
|
+
@copy_code_text = payload["copy_code_text"]
|
29
|
+
end
|
30
|
+
def to_json(options = {})
|
31
|
+
{
|
32
|
+
type: @type,
|
33
|
+
copy_code_text: @copy_code_text,
|
34
|
+
}.to_json(options)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class CallToActionAction
|
39
|
+
# @param [type]: [CallToActionActionType]
|
40
|
+
# @param [title]: [String]
|
41
|
+
# @param [url]: [String]
|
42
|
+
# @param [phone]: [String]
|
43
|
+
# @param [id]: [String]
|
44
|
+
attr_accessor :type, :title, :url, :phone, :id
|
45
|
+
def initialize(payload)
|
46
|
+
@type = payload["type"]
|
47
|
+
@title = payload["title"]
|
48
|
+
@url = payload["url"]
|
49
|
+
@phone = payload["phone"]
|
50
|
+
@id = payload["id"]
|
51
|
+
end
|
52
|
+
def to_json(options = {})
|
53
|
+
{
|
54
|
+
type: @type,
|
55
|
+
title: @title,
|
56
|
+
url: @url,
|
57
|
+
phone: @phone,
|
58
|
+
id: @id,
|
59
|
+
}.to_json(options)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
class CardAction
|
64
|
+
# @param [type]: [CardActionType]
|
65
|
+
# @param [title]: [String]
|
66
|
+
# @param [url]: [String]
|
67
|
+
# @param [phone]: [String]
|
68
|
+
# @param [id]: [String]
|
69
|
+
attr_accessor :type, :title, :url, :phone, :id
|
70
|
+
def initialize(payload)
|
71
|
+
@type = payload["type"]
|
72
|
+
@title = payload["title"]
|
73
|
+
@url = payload["url"]
|
74
|
+
@phone = payload["phone"]
|
75
|
+
@id = payload["id"]
|
76
|
+
end
|
77
|
+
def to_json(options = {})
|
78
|
+
{
|
79
|
+
type: @type,
|
80
|
+
title: @title,
|
81
|
+
url: @url,
|
82
|
+
phone: @phone,
|
83
|
+
id: @id,
|
84
|
+
}.to_json(options)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
class ContentCreateRequest
|
89
|
+
# @param [friendly_name]: [String] User defined name of the content
|
90
|
+
# @param [variables]: [Hash<String, String>] Key value pairs of variable name to value
|
91
|
+
# @param [language]: [String] Language code for the content
|
92
|
+
# @param [types]: [ContentList.Types]
|
93
|
+
attr_accessor :friendly_name, :variables, :language, :types
|
94
|
+
def initialize(payload)
|
95
|
+
@friendly_name = payload["friendly_name"]
|
96
|
+
@variables = payload["variables"]
|
97
|
+
@language = payload["language"]
|
98
|
+
@types = payload["types"]
|
99
|
+
end
|
100
|
+
def to_json(options = {})
|
101
|
+
{
|
102
|
+
friendly_name: @friendly_name,
|
103
|
+
variables: @variables,
|
104
|
+
language: @language,
|
105
|
+
types: @types,
|
106
|
+
}.to_json(options)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
class ListItem
|
111
|
+
# @param [id]: [String]
|
112
|
+
# @param [item]: [String]
|
113
|
+
# @param [description]: [String]
|
114
|
+
attr_accessor :id, :item, :description
|
115
|
+
def initialize(payload)
|
116
|
+
@id = payload["id"]
|
117
|
+
@item = payload["item"]
|
118
|
+
@description = payload["description"]
|
119
|
+
end
|
120
|
+
def to_json(options = {})
|
121
|
+
{
|
122
|
+
id: @id,
|
123
|
+
item: @item,
|
124
|
+
description: @description,
|
125
|
+
}.to_json(options)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
class QuickReplyAction
|
130
|
+
# @param [type]: [QuickReplyActionType]
|
131
|
+
# @param [title]: [String]
|
132
|
+
# @param [id]: [String]
|
133
|
+
attr_accessor :type, :title, :id
|
134
|
+
def initialize(payload)
|
135
|
+
@type = payload["type"]
|
136
|
+
@title = payload["title"]
|
137
|
+
@id = payload["id"]
|
138
|
+
end
|
139
|
+
def to_json(options = {})
|
140
|
+
{
|
141
|
+
type: @type,
|
142
|
+
title: @title,
|
143
|
+
id: @id,
|
144
|
+
}.to_json(options)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
class TwilioCallToAction
|
149
|
+
# @param [body]: [String]
|
150
|
+
# @param [actions]: [Array<ContentList.CallToActionAction>]
|
151
|
+
attr_accessor :body, :actions
|
152
|
+
def initialize(payload)
|
153
|
+
@body = payload["body"]
|
154
|
+
@actions = payload["actions"]
|
155
|
+
end
|
156
|
+
def to_json(options = {})
|
157
|
+
{
|
158
|
+
body: @body,
|
159
|
+
actions: @actions,
|
160
|
+
}.to_json(options)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
164
|
+
class TwilioCard
|
165
|
+
# @param [title]: [String]
|
166
|
+
# @param [subtitle]: [String]
|
167
|
+
# @param [media]: [Array<String>]
|
168
|
+
# @param [actions]: [Array<ContentList.CardAction>]
|
169
|
+
attr_accessor :title, :subtitle, :media, :actions
|
170
|
+
def initialize(payload)
|
171
|
+
@title = payload["title"]
|
172
|
+
@subtitle = payload["subtitle"]
|
173
|
+
@media = payload["media"]
|
174
|
+
@actions = payload["actions"]
|
175
|
+
end
|
176
|
+
def to_json(options = {})
|
177
|
+
{
|
178
|
+
title: @title,
|
179
|
+
subtitle: @subtitle,
|
180
|
+
media: @media,
|
181
|
+
actions: @actions,
|
182
|
+
}.to_json(options)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
class TwilioListPicker
|
187
|
+
# @param [body]: [String]
|
188
|
+
# @param [button]: [String]
|
189
|
+
# @param [items]: [Array<ContentList.ListItem>]
|
190
|
+
attr_accessor :body, :button, :items
|
191
|
+
def initialize(payload)
|
192
|
+
@body = payload["body"]
|
193
|
+
@button = payload["button"]
|
194
|
+
@items = payload["items"]
|
195
|
+
end
|
196
|
+
def to_json(options = {})
|
197
|
+
{
|
198
|
+
body: @body,
|
199
|
+
button: @button,
|
200
|
+
items: @items,
|
201
|
+
}.to_json(options)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
class TwilioLocation
|
206
|
+
# @param [latitude]: [Float]
|
207
|
+
# @param [longitude]: [Float]
|
208
|
+
# @param [label]: [String]
|
209
|
+
attr_accessor :latitude, :longitude, :label
|
210
|
+
def initialize(payload)
|
211
|
+
@latitude = payload["latitude"]
|
212
|
+
@longitude = payload["longitude"]
|
213
|
+
@label = payload["label"]
|
214
|
+
end
|
215
|
+
def to_json(options = {})
|
216
|
+
{
|
217
|
+
latitude: @latitude,
|
218
|
+
longitude: @longitude,
|
219
|
+
label: @label,
|
220
|
+
}.to_json(options)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
class TwilioMedia
|
225
|
+
# @param [body]: [String]
|
226
|
+
# @param [media]: [Array<String>]
|
227
|
+
attr_accessor :body, :media
|
228
|
+
def initialize(payload)
|
229
|
+
@body = payload["body"]
|
230
|
+
@media = payload["media"]
|
231
|
+
end
|
232
|
+
def to_json(options = {})
|
233
|
+
{
|
234
|
+
body: @body,
|
235
|
+
media: @media,
|
236
|
+
}.to_json(options)
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
class TwilioQuickReply
|
241
|
+
# @param [body]: [String]
|
242
|
+
# @param [actions]: [Array<ContentList.QuickReplyAction>]
|
243
|
+
attr_accessor :body, :actions
|
244
|
+
def initialize(payload)
|
245
|
+
@body = payload["body"]
|
246
|
+
@actions = payload["actions"]
|
247
|
+
end
|
248
|
+
def to_json(options = {})
|
249
|
+
{
|
250
|
+
body: @body,
|
251
|
+
actions: @actions,
|
252
|
+
}.to_json(options)
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
class TwilioText
|
257
|
+
# @param [body]: [String]
|
258
|
+
attr_accessor :body
|
259
|
+
def initialize(payload)
|
260
|
+
@body = payload["body"]
|
261
|
+
end
|
262
|
+
def to_json(options = {})
|
263
|
+
{
|
264
|
+
body: @body,
|
265
|
+
}.to_json(options)
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
class Types
|
270
|
+
# @param [twilio_text]: [ContentList.TwilioText]
|
271
|
+
# @param [twilio_media]: [ContentList.TwilioMedia]
|
272
|
+
# @param [twilio_location]: [ContentList.TwilioLocation]
|
273
|
+
# @param [twilio_list_picker]: [ContentList.TwilioListPicker]
|
274
|
+
# @param [twilio_call_to_action]: [ContentList.TwilioCallToAction]
|
275
|
+
# @param [twilio_quick_reply]: [ContentList.TwilioQuickReply]
|
276
|
+
# @param [twilio_card]: [ContentList.TwilioCard]
|
277
|
+
# @param [whatsapp_card]: [ContentList.WhatsappCard]
|
278
|
+
# @param [whatsapp_authentication]: [ContentList.WhatsappAuthentication]
|
279
|
+
attr_accessor :twilio_text, :twilio_media, :twilio_location, :twilio_list_picker, :twilio_call_to_action, :twilio_quick_reply, :twilio_card, :whatsapp_card, :whatsapp_authentication
|
280
|
+
def initialize(payload)
|
281
|
+
@twilio_text = payload["twilio_text"]
|
282
|
+
@twilio_media = payload["twilio_media"]
|
283
|
+
@twilio_location = payload["twilio_location"]
|
284
|
+
@twilio_list_picker = payload["twilio_list_picker"]
|
285
|
+
@twilio_call_to_action = payload["twilio_call_to_action"]
|
286
|
+
@twilio_quick_reply = payload["twilio_quick_reply"]
|
287
|
+
@twilio_card = payload["twilio_card"]
|
288
|
+
@whatsapp_card = payload["whatsapp_card"]
|
289
|
+
@whatsapp_authentication = payload["whatsapp_authentication"]
|
290
|
+
end
|
291
|
+
def to_json(options = {})
|
292
|
+
{
|
293
|
+
twilio_text: @twilio_text,
|
294
|
+
twilio_media: @twilio_media,
|
295
|
+
twilio_location: @twilio_location,
|
296
|
+
twilio_list_picker: @twilio_list_picker,
|
297
|
+
twilio_call_to_action: @twilio_call_to_action,
|
298
|
+
twilio_quick_reply: @twilio_quick_reply,
|
299
|
+
twilio_card: @twilio_card,
|
300
|
+
whatsapp_card: @whatsapp_card,
|
301
|
+
whatsapp_authentication: @whatsapp_authentication,
|
302
|
+
}.to_json(options)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
class WhatsappAuthentication
|
307
|
+
# @param [add_security_recommendation]: [Boolean]
|
308
|
+
# @param [code_expiration_minutes]: [Float]
|
309
|
+
# @param [actions]: [Array<ContentList.AuthenticationAction>]
|
310
|
+
attr_accessor :add_security_recommendation, :code_expiration_minutes, :actions
|
311
|
+
def initialize(payload)
|
312
|
+
@add_security_recommendation = payload["add_security_recommendation"]
|
313
|
+
@code_expiration_minutes = payload["code_expiration_minutes"]
|
314
|
+
@actions = payload["actions"]
|
315
|
+
end
|
316
|
+
def to_json(options = {})
|
317
|
+
{
|
318
|
+
add_security_recommendation: @add_security_recommendation,
|
319
|
+
code_expiration_minutes: @code_expiration_minutes,
|
320
|
+
actions: @actions,
|
321
|
+
}.to_json(options)
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
class WhatsappCard
|
326
|
+
# @param [body]: [String]
|
327
|
+
# @param [footer]: [String]
|
328
|
+
# @param [media]: [Array<String>]
|
329
|
+
# @param [header_text]: [String]
|
330
|
+
# @param [actions]: [Array<ContentList.CardAction>]
|
331
|
+
attr_accessor :body, :footer, :media, :header_text, :actions
|
332
|
+
def initialize(payload)
|
333
|
+
@body = payload["body"]
|
334
|
+
@footer = payload["footer"]
|
335
|
+
@media = payload["media"]
|
336
|
+
@header_text = payload["header_text"]
|
337
|
+
@actions = payload["actions"]
|
338
|
+
end
|
339
|
+
def to_json(options = {})
|
340
|
+
{
|
341
|
+
body: @body,
|
342
|
+
footer: @footer,
|
343
|
+
media: @media,
|
344
|
+
header_text: @header_text,
|
345
|
+
actions: @actions,
|
346
|
+
}.to_json(options)
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
22
350
|
##
|
23
351
|
# Initialize the ContentList
|
24
352
|
# @param [Version] version Version that contains the resource
|
@@ -30,6 +358,21 @@ module Twilio
|
|
30
358
|
@uri = "/Content"
|
31
359
|
|
32
360
|
end
|
361
|
+
##
|
362
|
+
# Create the ContentInstance
|
363
|
+
# @param [ContentCreateRequest] content_create_request
|
364
|
+
# @return [ContentInstance] Created ContentInstance
|
365
|
+
def create(content_create_request: nil
|
366
|
+
)
|
367
|
+
|
368
|
+
headers = Twilio::Values.of({"Content-Type"=> "application/json"})
|
369
|
+
payload = @version.create('POST', @uri, data: content_create_request.to_json, headers: headers)
|
370
|
+
ContentInstance.new(
|
371
|
+
@version,
|
372
|
+
payload,
|
373
|
+
)
|
374
|
+
end
|
375
|
+
|
33
376
|
|
34
377
|
##
|
35
378
|
# Lists ContentInstance records from the API as a list.
|
@@ -124,8 +467,6 @@ module Twilio
|
|
124
467
|
end
|
125
468
|
|
126
469
|
|
127
|
-
##
|
128
|
-
#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.
|
129
470
|
class ContentContext < InstanceContext
|
130
471
|
##
|
131
472
|
# Initialize the ContentContext
|
@@ -140,6 +481,7 @@ module Twilio
|
|
140
481
|
@uri = "/Content/#{@solution[:sid]}"
|
141
482
|
|
142
483
|
# Dependents
|
484
|
+
@approval_create = nil
|
143
485
|
@approval_fetch = nil
|
144
486
|
end
|
145
487
|
##
|
@@ -165,6 +507,17 @@ module Twilio
|
|
165
507
|
)
|
166
508
|
end
|
167
509
|
|
510
|
+
##
|
511
|
+
# Access the approval_create
|
512
|
+
# @return [ApprovalCreateList]
|
513
|
+
# @return [ApprovalCreateContext]
|
514
|
+
def approval_create
|
515
|
+
unless @approval_create
|
516
|
+
@approval_create = ApprovalCreateList.new(
|
517
|
+
@version, content_sid: @solution[:sid], )
|
518
|
+
end
|
519
|
+
@approval_create
|
520
|
+
end
|
168
521
|
##
|
169
522
|
# Access the approval_fetch
|
170
523
|
# @return [ApprovalFetchList]
|
@@ -305,7 +658,7 @@ module Twilio
|
|
305
658
|
end
|
306
659
|
|
307
660
|
##
|
308
|
-
# @return [Hash] The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
|
661
|
+
# @return [Hash] The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
|
309
662
|
def types
|
310
663
|
@properties['types']
|
311
664
|
end
|
@@ -338,6 +691,13 @@ module Twilio
|
|
338
691
|
context.fetch
|
339
692
|
end
|
340
693
|
|
694
|
+
##
|
695
|
+
# Access the approval_create
|
696
|
+
# @return [approval_create] approval_create
|
697
|
+
def approval_create
|
698
|
+
context.approval_create
|
699
|
+
end
|
700
|
+
|
341
701
|
##
|
342
702
|
# Access the approval_fetch
|
343
703
|
# @return [approval_fetch] approval_fetch
|
@@ -222,7 +222,7 @@ module Twilio
|
|
222
222
|
end
|
223
223
|
|
224
224
|
##
|
225
|
-
# @return [Hash] The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
|
225
|
+
# @return [Hash] The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
|
226
226
|
def types
|
227
227
|
@properties['types']
|
228
228
|
end
|
@@ -224,7 +224,7 @@ module Twilio
|
|
224
224
|
end
|
225
225
|
|
226
226
|
##
|
227
|
-
# @return [Hash] The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
|
227
|
+
# @return [Hash] The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
|
228
228
|
def types
|
229
229
|
@properties['types']
|
230
230
|
end
|
@@ -186,8 +186,6 @@ module Twilio
|
|
186
186
|
end
|
187
187
|
|
188
188
|
|
189
|
-
##
|
190
|
-
#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.
|
191
189
|
class AssessmentsContext < InstanceContext
|
192
190
|
##
|
193
191
|
# Initialize the AssessmentsContext
|
@@ -73,6 +73,19 @@ module Twilio
|
|
73
73
|
)
|
74
74
|
end
|
75
75
|
|
76
|
+
##
|
77
|
+
# Update the ConfigurationInstance
|
78
|
+
# @return [ConfigurationInstance] Updated ConfigurationInstance
|
79
|
+
def update
|
80
|
+
|
81
|
+
|
82
|
+
payload = @version.update('POST', @uri)
|
83
|
+
ConfigurationInstance.new(
|
84
|
+
@version,
|
85
|
+
payload,
|
86
|
+
)
|
87
|
+
end
|
88
|
+
|
76
89
|
|
77
90
|
##
|
78
91
|
# Provide a user friendly representation
|
@@ -506,6 +519,14 @@ module Twilio
|
|
506
519
|
)
|
507
520
|
end
|
508
521
|
|
522
|
+
##
|
523
|
+
# Update the ConfigurationInstance
|
524
|
+
# @return [ConfigurationInstance] Updated ConfigurationInstance
|
525
|
+
def update
|
526
|
+
|
527
|
+
context.update
|
528
|
+
end
|
529
|
+
|
509
530
|
##
|
510
531
|
# Provide a user friendly representation
|
511
532
|
def to_s
|