twilio-ruby 6.12.1 → 7.0.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/test-and-deploy.yml +5 -5
- data/CHANGES.md +47 -1
- data/README.md +2 -2
- data/UPGRADE.md +11 -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/payment.rb +0 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +22 -22
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +7 -0
- 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/client.rb +8 -3
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +184 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +11 -13
- data/lib/twilio-ruby/rest/content/v1/content.rb +422 -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/conversations/v1/service/conversation.rb +6 -6
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +0 -2
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +26 -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/plugin.rb +6 -0
- data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -2
- 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/v2/phone_number.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +0 -2
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -2
- 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 +0 -2
- 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 +16 -3
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +127 -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 +134 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +7 -2
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -2
- data/lib/twilio-ruby/rest/numbers/v1.rb +12 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +0 -2
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +16 -3
- data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +0 -2
- data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +143 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +181 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +46 -0
- data/lib/twilio-ruby/rest/{media.rb → oauth.rb} +1 -1
- data/lib/twilio-ruby/rest/{media_base.rb → oauth_base.rb} +6 -6
- 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 +163 -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 +95 -4
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +9 -3
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +9 -3
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +18 -18
- data/lib/twilio-ruby/rest/trusthub/v1.rb +12 -3
- 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/version.rb +1 -1
- metadata +16 -9
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +0 -424
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +0 -407
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +0 -255
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +0 -436
- data/lib/twilio-ruby/rest/media/v1.rb +0 -79
|
@@ -19,6 +19,393 @@ 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 CatalogItem
|
|
89
|
+
# @param [id]: [String]
|
|
90
|
+
# @param [section_title]: [String]
|
|
91
|
+
# @param [name]: [String]
|
|
92
|
+
# @param [media_url]: [String]
|
|
93
|
+
# @param [price]: [Float]
|
|
94
|
+
# @param [description]: [String]
|
|
95
|
+
attr_accessor :id, :section_title, :name, :media_url, :price, :description
|
|
96
|
+
def initialize(payload)
|
|
97
|
+
@id = payload["id"]
|
|
98
|
+
@section_title = payload["section_title"]
|
|
99
|
+
@name = payload["name"]
|
|
100
|
+
@media_url = payload["media_url"]
|
|
101
|
+
@price = payload["price"]
|
|
102
|
+
@description = payload["description"]
|
|
103
|
+
end
|
|
104
|
+
def to_json(options = {})
|
|
105
|
+
{
|
|
106
|
+
id: @id,
|
|
107
|
+
section_title: @section_title,
|
|
108
|
+
name: @name,
|
|
109
|
+
media_url: @media_url,
|
|
110
|
+
price: @price,
|
|
111
|
+
description: @description,
|
|
112
|
+
}.to_json(options)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
class ContentCreateRequest
|
|
117
|
+
# @param [friendly_name]: [String] User defined name of the content
|
|
118
|
+
# @param [variables]: [Hash<String, String>] Key value pairs of variable name to value
|
|
119
|
+
# @param [language]: [String] Language code for the content
|
|
120
|
+
# @param [types]: [ContentList.Types]
|
|
121
|
+
attr_accessor :friendly_name, :variables, :language, :types
|
|
122
|
+
def initialize(payload)
|
|
123
|
+
@friendly_name = payload["friendly_name"]
|
|
124
|
+
@variables = payload["variables"]
|
|
125
|
+
@language = payload["language"]
|
|
126
|
+
@types = payload["types"]
|
|
127
|
+
end
|
|
128
|
+
def to_json(options = {})
|
|
129
|
+
{
|
|
130
|
+
friendly_name: @friendly_name,
|
|
131
|
+
variables: @variables,
|
|
132
|
+
language: @language,
|
|
133
|
+
types: @types,
|
|
134
|
+
}.to_json(options)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
class ListItem
|
|
139
|
+
# @param [id]: [String]
|
|
140
|
+
# @param [item]: [String]
|
|
141
|
+
# @param [description]: [String]
|
|
142
|
+
attr_accessor :id, :item, :description
|
|
143
|
+
def initialize(payload)
|
|
144
|
+
@id = payload["id"]
|
|
145
|
+
@item = payload["item"]
|
|
146
|
+
@description = payload["description"]
|
|
147
|
+
end
|
|
148
|
+
def to_json(options = {})
|
|
149
|
+
{
|
|
150
|
+
id: @id,
|
|
151
|
+
item: @item,
|
|
152
|
+
description: @description,
|
|
153
|
+
}.to_json(options)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
class QuickReplyAction
|
|
158
|
+
# @param [type]: [QuickReplyActionType]
|
|
159
|
+
# @param [title]: [String]
|
|
160
|
+
# @param [id]: [String]
|
|
161
|
+
attr_accessor :type, :title, :id
|
|
162
|
+
def initialize(payload)
|
|
163
|
+
@type = payload["type"]
|
|
164
|
+
@title = payload["title"]
|
|
165
|
+
@id = payload["id"]
|
|
166
|
+
end
|
|
167
|
+
def to_json(options = {})
|
|
168
|
+
{
|
|
169
|
+
type: @type,
|
|
170
|
+
title: @title,
|
|
171
|
+
id: @id,
|
|
172
|
+
}.to_json(options)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
class TwilioCallToAction
|
|
177
|
+
# @param [body]: [String]
|
|
178
|
+
# @param [actions]: [Array<ContentList.CallToActionAction>]
|
|
179
|
+
attr_accessor :body, :actions
|
|
180
|
+
def initialize(payload)
|
|
181
|
+
@body = payload["body"]
|
|
182
|
+
@actions = payload["actions"]
|
|
183
|
+
end
|
|
184
|
+
def to_json(options = {})
|
|
185
|
+
{
|
|
186
|
+
body: @body,
|
|
187
|
+
actions: @actions,
|
|
188
|
+
}.to_json(options)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
class TwilioCard
|
|
193
|
+
# @param [title]: [String]
|
|
194
|
+
# @param [subtitle]: [String]
|
|
195
|
+
# @param [media]: [Array<String>]
|
|
196
|
+
# @param [actions]: [Array<ContentList.CardAction>]
|
|
197
|
+
attr_accessor :title, :subtitle, :media, :actions
|
|
198
|
+
def initialize(payload)
|
|
199
|
+
@title = payload["title"]
|
|
200
|
+
@subtitle = payload["subtitle"]
|
|
201
|
+
@media = payload["media"]
|
|
202
|
+
@actions = payload["actions"]
|
|
203
|
+
end
|
|
204
|
+
def to_json(options = {})
|
|
205
|
+
{
|
|
206
|
+
title: @title,
|
|
207
|
+
subtitle: @subtitle,
|
|
208
|
+
media: @media,
|
|
209
|
+
actions: @actions,
|
|
210
|
+
}.to_json(options)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
class TwilioCatalog
|
|
215
|
+
# @param [title]: [String]
|
|
216
|
+
# @param [body]: [String]
|
|
217
|
+
# @param [subtitle]: [String]
|
|
218
|
+
# @param [id]: [String]
|
|
219
|
+
# @param [items]: [Array<ContentList.CatalogItem>]
|
|
220
|
+
# @param [dynamic_items]: [String]
|
|
221
|
+
attr_accessor :title, :body, :subtitle, :id, :items, :dynamic_items
|
|
222
|
+
def initialize(payload)
|
|
223
|
+
@title = payload["title"]
|
|
224
|
+
@body = payload["body"]
|
|
225
|
+
@subtitle = payload["subtitle"]
|
|
226
|
+
@id = payload["id"]
|
|
227
|
+
@items = payload["items"]
|
|
228
|
+
@dynamic_items = payload["dynamic_items"]
|
|
229
|
+
end
|
|
230
|
+
def to_json(options = {})
|
|
231
|
+
{
|
|
232
|
+
title: @title,
|
|
233
|
+
body: @body,
|
|
234
|
+
subtitle: @subtitle,
|
|
235
|
+
id: @id,
|
|
236
|
+
items: @items,
|
|
237
|
+
dynamic_items: @dynamic_items,
|
|
238
|
+
}.to_json(options)
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
class TwilioListPicker
|
|
243
|
+
# @param [body]: [String]
|
|
244
|
+
# @param [button]: [String]
|
|
245
|
+
# @param [items]: [Array<ContentList.ListItem>]
|
|
246
|
+
attr_accessor :body, :button, :items
|
|
247
|
+
def initialize(payload)
|
|
248
|
+
@body = payload["body"]
|
|
249
|
+
@button = payload["button"]
|
|
250
|
+
@items = payload["items"]
|
|
251
|
+
end
|
|
252
|
+
def to_json(options = {})
|
|
253
|
+
{
|
|
254
|
+
body: @body,
|
|
255
|
+
button: @button,
|
|
256
|
+
items: @items,
|
|
257
|
+
}.to_json(options)
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
class TwilioLocation
|
|
262
|
+
# @param [latitude]: [Float]
|
|
263
|
+
# @param [longitude]: [Float]
|
|
264
|
+
# @param [label]: [String]
|
|
265
|
+
attr_accessor :latitude, :longitude, :label
|
|
266
|
+
def initialize(payload)
|
|
267
|
+
@latitude = payload["latitude"]
|
|
268
|
+
@longitude = payload["longitude"]
|
|
269
|
+
@label = payload["label"]
|
|
270
|
+
end
|
|
271
|
+
def to_json(options = {})
|
|
272
|
+
{
|
|
273
|
+
latitude: @latitude,
|
|
274
|
+
longitude: @longitude,
|
|
275
|
+
label: @label,
|
|
276
|
+
}.to_json(options)
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
class TwilioMedia
|
|
281
|
+
# @param [body]: [String]
|
|
282
|
+
# @param [media]: [Array<String>]
|
|
283
|
+
attr_accessor :body, :media
|
|
284
|
+
def initialize(payload)
|
|
285
|
+
@body = payload["body"]
|
|
286
|
+
@media = payload["media"]
|
|
287
|
+
end
|
|
288
|
+
def to_json(options = {})
|
|
289
|
+
{
|
|
290
|
+
body: @body,
|
|
291
|
+
media: @media,
|
|
292
|
+
}.to_json(options)
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
class TwilioQuickReply
|
|
297
|
+
# @param [body]: [String]
|
|
298
|
+
# @param [actions]: [Array<ContentList.QuickReplyAction>]
|
|
299
|
+
attr_accessor :body, :actions
|
|
300
|
+
def initialize(payload)
|
|
301
|
+
@body = payload["body"]
|
|
302
|
+
@actions = payload["actions"]
|
|
303
|
+
end
|
|
304
|
+
def to_json(options = {})
|
|
305
|
+
{
|
|
306
|
+
body: @body,
|
|
307
|
+
actions: @actions,
|
|
308
|
+
}.to_json(options)
|
|
309
|
+
end
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
class TwilioText
|
|
313
|
+
# @param [body]: [String]
|
|
314
|
+
attr_accessor :body
|
|
315
|
+
def initialize(payload)
|
|
316
|
+
@body = payload["body"]
|
|
317
|
+
end
|
|
318
|
+
def to_json(options = {})
|
|
319
|
+
{
|
|
320
|
+
body: @body,
|
|
321
|
+
}.to_json(options)
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
class Types
|
|
326
|
+
# @param [twilio_text]: [ContentList.TwilioText]
|
|
327
|
+
# @param [twilio_media]: [ContentList.TwilioMedia]
|
|
328
|
+
# @param [twilio_location]: [ContentList.TwilioLocation]
|
|
329
|
+
# @param [twilio_list_picker]: [ContentList.TwilioListPicker]
|
|
330
|
+
# @param [twilio_call_to_action]: [ContentList.TwilioCallToAction]
|
|
331
|
+
# @param [twilio_quick_reply]: [ContentList.TwilioQuickReply]
|
|
332
|
+
# @param [twilio_card]: [ContentList.TwilioCard]
|
|
333
|
+
# @param [twilio_catalog]: [ContentList.TwilioCatalog]
|
|
334
|
+
# @param [whatsapp_card]: [ContentList.WhatsappCard]
|
|
335
|
+
# @param [whatsapp_authentication]: [ContentList.WhatsappAuthentication]
|
|
336
|
+
attr_accessor :twilio_text, :twilio_media, :twilio_location, :twilio_list_picker, :twilio_call_to_action, :twilio_quick_reply, :twilio_card, :twilio_catalog, :whatsapp_card, :whatsapp_authentication
|
|
337
|
+
def initialize(payload)
|
|
338
|
+
@twilio_text = payload["twilio_text"]
|
|
339
|
+
@twilio_media = payload["twilio_media"]
|
|
340
|
+
@twilio_location = payload["twilio_location"]
|
|
341
|
+
@twilio_list_picker = payload["twilio_list_picker"]
|
|
342
|
+
@twilio_call_to_action = payload["twilio_call_to_action"]
|
|
343
|
+
@twilio_quick_reply = payload["twilio_quick_reply"]
|
|
344
|
+
@twilio_card = payload["twilio_card"]
|
|
345
|
+
@twilio_catalog = payload["twilio_catalog"]
|
|
346
|
+
@whatsapp_card = payload["whatsapp_card"]
|
|
347
|
+
@whatsapp_authentication = payload["whatsapp_authentication"]
|
|
348
|
+
end
|
|
349
|
+
def to_json(options = {})
|
|
350
|
+
{
|
|
351
|
+
twilio_text: @twilio_text,
|
|
352
|
+
twilio_media: @twilio_media,
|
|
353
|
+
twilio_location: @twilio_location,
|
|
354
|
+
twilio_list_picker: @twilio_list_picker,
|
|
355
|
+
twilio_call_to_action: @twilio_call_to_action,
|
|
356
|
+
twilio_quick_reply: @twilio_quick_reply,
|
|
357
|
+
twilio_card: @twilio_card,
|
|
358
|
+
twilio_catalog: @twilio_catalog,
|
|
359
|
+
whatsapp_card: @whatsapp_card,
|
|
360
|
+
whatsapp_authentication: @whatsapp_authentication,
|
|
361
|
+
}.to_json(options)
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
class WhatsappAuthentication
|
|
366
|
+
# @param [add_security_recommendation]: [Boolean]
|
|
367
|
+
# @param [code_expiration_minutes]: [Float]
|
|
368
|
+
# @param [actions]: [Array<ContentList.AuthenticationAction>]
|
|
369
|
+
attr_accessor :add_security_recommendation, :code_expiration_minutes, :actions
|
|
370
|
+
def initialize(payload)
|
|
371
|
+
@add_security_recommendation = payload["add_security_recommendation"]
|
|
372
|
+
@code_expiration_minutes = payload["code_expiration_minutes"]
|
|
373
|
+
@actions = payload["actions"]
|
|
374
|
+
end
|
|
375
|
+
def to_json(options = {})
|
|
376
|
+
{
|
|
377
|
+
add_security_recommendation: @add_security_recommendation,
|
|
378
|
+
code_expiration_minutes: @code_expiration_minutes,
|
|
379
|
+
actions: @actions,
|
|
380
|
+
}.to_json(options)
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
class WhatsappCard
|
|
385
|
+
# @param [body]: [String]
|
|
386
|
+
# @param [footer]: [String]
|
|
387
|
+
# @param [media]: [Array<String>]
|
|
388
|
+
# @param [header_text]: [String]
|
|
389
|
+
# @param [actions]: [Array<ContentList.CardAction>]
|
|
390
|
+
attr_accessor :body, :footer, :media, :header_text, :actions
|
|
391
|
+
def initialize(payload)
|
|
392
|
+
@body = payload["body"]
|
|
393
|
+
@footer = payload["footer"]
|
|
394
|
+
@media = payload["media"]
|
|
395
|
+
@header_text = payload["header_text"]
|
|
396
|
+
@actions = payload["actions"]
|
|
397
|
+
end
|
|
398
|
+
def to_json(options = {})
|
|
399
|
+
{
|
|
400
|
+
body: @body,
|
|
401
|
+
footer: @footer,
|
|
402
|
+
media: @media,
|
|
403
|
+
header_text: @header_text,
|
|
404
|
+
actions: @actions,
|
|
405
|
+
}.to_json(options)
|
|
406
|
+
end
|
|
407
|
+
end
|
|
408
|
+
|
|
22
409
|
##
|
|
23
410
|
# Initialize the ContentList
|
|
24
411
|
# @param [Version] version Version that contains the resource
|
|
@@ -30,6 +417,21 @@ module Twilio
|
|
|
30
417
|
@uri = "/Content"
|
|
31
418
|
|
|
32
419
|
end
|
|
420
|
+
##
|
|
421
|
+
# Create the ContentInstance
|
|
422
|
+
# @param [ContentCreateRequest] content_create_request
|
|
423
|
+
# @return [ContentInstance] Created ContentInstance
|
|
424
|
+
def create(content_create_request: nil
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
headers = Twilio::Values.of({"Content-Type"=> "application/json"})
|
|
428
|
+
payload = @version.create('POST', @uri, data: content_create_request.to_json, headers: headers)
|
|
429
|
+
ContentInstance.new(
|
|
430
|
+
@version,
|
|
431
|
+
payload,
|
|
432
|
+
)
|
|
433
|
+
end
|
|
434
|
+
|
|
33
435
|
|
|
34
436
|
##
|
|
35
437
|
# Lists ContentInstance records from the API as a list.
|
|
@@ -124,8 +526,6 @@ module Twilio
|
|
|
124
526
|
end
|
|
125
527
|
|
|
126
528
|
|
|
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
529
|
class ContentContext < InstanceContext
|
|
130
530
|
##
|
|
131
531
|
# Initialize the ContentContext
|
|
@@ -140,6 +540,7 @@ module Twilio
|
|
|
140
540
|
@uri = "/Content/#{@solution[:sid]}"
|
|
141
541
|
|
|
142
542
|
# Dependents
|
|
543
|
+
@approval_create = nil
|
|
143
544
|
@approval_fetch = nil
|
|
144
545
|
end
|
|
145
546
|
##
|
|
@@ -165,6 +566,17 @@ module Twilio
|
|
|
165
566
|
)
|
|
166
567
|
end
|
|
167
568
|
|
|
569
|
+
##
|
|
570
|
+
# Access the approval_create
|
|
571
|
+
# @return [ApprovalCreateList]
|
|
572
|
+
# @return [ApprovalCreateContext]
|
|
573
|
+
def approval_create
|
|
574
|
+
unless @approval_create
|
|
575
|
+
@approval_create = ApprovalCreateList.new(
|
|
576
|
+
@version, content_sid: @solution[:sid], )
|
|
577
|
+
end
|
|
578
|
+
@approval_create
|
|
579
|
+
end
|
|
168
580
|
##
|
|
169
581
|
# Access the approval_fetch
|
|
170
582
|
# @return [ApprovalFetchList]
|
|
@@ -305,7 +717,7 @@ module Twilio
|
|
|
305
717
|
end
|
|
306
718
|
|
|
307
719
|
##
|
|
308
|
-
# @return [Hash] The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
|
|
720
|
+
# @return [Hash] The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
|
|
309
721
|
def types
|
|
310
722
|
@properties['types']
|
|
311
723
|
end
|
|
@@ -338,6 +750,13 @@ module Twilio
|
|
|
338
750
|
context.fetch
|
|
339
751
|
end
|
|
340
752
|
|
|
753
|
+
##
|
|
754
|
+
# Access the approval_create
|
|
755
|
+
# @return [approval_create] approval_create
|
|
756
|
+
def approval_create
|
|
757
|
+
context.approval_create
|
|
758
|
+
end
|
|
759
|
+
|
|
341
760
|
##
|
|
342
761
|
# Access the approval_fetch
|
|
343
762
|
# @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
|
|
@@ -91,8 +91,8 @@ module Twilio
|
|
|
91
91
|
# Lists ConversationInstance records from the API as a list.
|
|
92
92
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
93
93
|
# memory before returning.
|
|
94
|
-
# @param [String] start_date
|
|
95
|
-
# @param [String] end_date
|
|
94
|
+
# @param [String] start_date Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
|
|
95
|
+
# @param [String] end_date Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
|
|
96
96
|
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
|
97
97
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
98
98
|
# guarantees to never return more than limit. Default is no limit
|
|
@@ -115,8 +115,8 @@ module Twilio
|
|
|
115
115
|
# Streams Instance records from the API as an Enumerable.
|
|
116
116
|
# This operation lazily loads records as efficiently as possible until the limit
|
|
117
117
|
# is reached.
|
|
118
|
-
# @param [String] start_date
|
|
119
|
-
# @param [String] end_date
|
|
118
|
+
# @param [String] start_date Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
|
|
119
|
+
# @param [String] end_date Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
|
|
120
120
|
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
|
121
121
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
122
122
|
# guarantees to never return more than limit. Default is no limit
|
|
@@ -154,8 +154,8 @@ module Twilio
|
|
|
154
154
|
##
|
|
155
155
|
# Retrieve a single page of ConversationInstance records from the API.
|
|
156
156
|
# Request is executed immediately.
|
|
157
|
-
# @param [String] start_date
|
|
158
|
-
# @param [String] end_date
|
|
157
|
+
# @param [String] start_date Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
|
|
158
|
+
# @param [String] end_date Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
|
|
159
159
|
# @param [State] state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
|
|
160
160
|
# @param [String] page_token PageToken provided by the API
|
|
161
161
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
@@ -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,21 @@ module Twilio
|
|
|
73
73
|
)
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
+
##
|
|
77
|
+
# Update the ConfigurationInstance
|
|
78
|
+
# @param [Object] body
|
|
79
|
+
# @return [ConfigurationInstance] Updated ConfigurationInstance
|
|
80
|
+
def update(body: :unset
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
headers = Twilio::Values.of({"Content-Type"=> "application/json"})
|
|
84
|
+
payload = @version.update('POST', @uri, data: body.to_json, headers: headers)
|
|
85
|
+
ConfigurationInstance.new(
|
|
86
|
+
@version,
|
|
87
|
+
payload,
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
|
|
76
91
|
|
|
77
92
|
##
|
|
78
93
|
# Provide a user friendly representation
|
|
@@ -506,6 +521,17 @@ module Twilio
|
|
|
506
521
|
)
|
|
507
522
|
end
|
|
508
523
|
|
|
524
|
+
##
|
|
525
|
+
# Update the ConfigurationInstance
|
|
526
|
+
# @param [Object] body
|
|
527
|
+
# @return [ConfigurationInstance] Updated ConfigurationInstance
|
|
528
|
+
def update(body: :unset
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
context.update(
|
|
532
|
+
)
|
|
533
|
+
end
|
|
534
|
+
|
|
509
535
|
##
|
|
510
536
|
# Provide a user friendly representation
|
|
511
537
|
def to_s
|
|
@@ -168,8 +168,6 @@ module Twilio
|
|
|
168
168
|
end
|
|
169
169
|
|
|
170
170
|
|
|
171
|
-
##
|
|
172
|
-
#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.
|
|
173
171
|
class InsightsQuestionnairesContext < InstanceContext
|
|
174
172
|
##
|
|
175
173
|
# Initialize the InsightsQuestionnairesContext
|
|
@@ -153,8 +153,6 @@ module Twilio
|
|
|
153
153
|
end
|
|
154
154
|
|
|
155
155
|
|
|
156
|
-
##
|
|
157
|
-
#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.
|
|
158
156
|
class InsightsQuestionnairesCategoryContext < InstanceContext
|
|
159
157
|
##
|
|
160
158
|
# Initialize the InsightsQuestionnairesCategoryContext
|
|
@@ -172,8 +172,6 @@ module Twilio
|
|
|
172
172
|
end
|
|
173
173
|
|
|
174
174
|
|
|
175
|
-
##
|
|
176
|
-
#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.
|
|
177
175
|
class InsightsQuestionnairesQuestionContext < InstanceContext
|
|
178
176
|
##
|
|
179
177
|
# Initialize the InsightsQuestionnairesQuestionContext
|
|
@@ -40,8 +40,6 @@ module Twilio
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
##
|
|
44
|
-
#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.
|
|
45
43
|
class InsightsSessionContext < InstanceContext
|
|
46
44
|
##
|
|
47
45
|
# Initialize the InsightsSessionContext
|
|
@@ -40,8 +40,6 @@ module Twilio
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
##
|
|
44
|
-
#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.
|
|
45
43
|
class InsightsUserRolesContext < InstanceContext
|
|
46
44
|
##
|
|
47
45
|
# Initialize the InsightsUserRolesContext
|
|
@@ -35,12 +35,16 @@ module Twilio
|
|
|
35
35
|
# @param [String] unique_name The Flex Plugin's unique name.
|
|
36
36
|
# @param [String] friendly_name The Flex Plugin's friendly name.
|
|
37
37
|
# @param [String] description A descriptive string that you create to describe the plugin resource. It can be up to 500 characters long
|
|
38
|
+
# @param [String] cli_version The version of Flex Plugins CLI used to create this plugin
|
|
39
|
+
# @param [String] validate_status The validation status of the plugin, indicating whether it has been validated
|
|
38
40
|
# @param [String] flex_metadata The Flex-Metadata HTTP request header
|
|
39
41
|
# @return [PluginInstance] Created PluginInstance
|
|
40
42
|
def create(
|
|
41
43
|
unique_name: nil,
|
|
42
44
|
friendly_name: :unset,
|
|
43
45
|
description: :unset,
|
|
46
|
+
cli_version: :unset,
|
|
47
|
+
validate_status: :unset,
|
|
44
48
|
flex_metadata: :unset
|
|
45
49
|
)
|
|
46
50
|
|
|
@@ -48,6 +52,8 @@ module Twilio
|
|
|
48
52
|
'UniqueName' => unique_name,
|
|
49
53
|
'FriendlyName' => friendly_name,
|
|
50
54
|
'Description' => description,
|
|
55
|
+
'CliVersion' => cli_version,
|
|
56
|
+
'ValidateStatus' => validate_status,
|
|
51
57
|
})
|
|
52
58
|
|
|
53
59
|
|