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
@@ -36,8 +36,8 @@ module Twilio
|
|
36
36
|
# Create the MessageInstance
|
37
37
|
# @param [String] to The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
|
38
38
|
# @param [String] status_callback The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
|
39
|
-
# @param [String] application_sid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL.
|
40
|
-
# @param [Float] max_price
|
39
|
+
# @param [String] application_sid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL.
|
40
|
+
# @param [Float] max_price The maximum price in US dollars that you are willing to pay for this Message's delivery. The value can have up to four decimal places. When the `max_price` parameter is provided, the cost of a message is checked before it is sent. If the cost exceeds `max_price`, the message is not sent and the Message `status` is `failed`.
|
41
41
|
# @param [Boolean] provide_feedback Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`.
|
42
42
|
# @param [String] attempt Total number of attempts made (including this request) to send the message regardless of the provider used
|
43
43
|
# @param [String] validity_period The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `14400`. Default value is `14400`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
|
@@ -127,8 +127,6 @@ module Twilio
|
|
127
127
|
# @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
|
128
128
|
# @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
|
129
129
|
# @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
130
|
-
# @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
131
|
-
# @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
132
130
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
133
131
|
# guarantees to never return more than limit. Default is no limit
|
134
132
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -136,13 +134,11 @@ module Twilio
|
|
136
134
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
137
135
|
# efficient page size, i.e. min(limit, 1000)
|
138
136
|
# @return [Array] Array of up to limit results
|
139
|
-
def list(to: :unset, from: :unset, date_sent: :unset,
|
137
|
+
def list(to: :unset, from: :unset, date_sent: :unset, limit: nil, page_size: nil)
|
140
138
|
self.stream(
|
141
139
|
to: to,
|
142
140
|
from: from,
|
143
141
|
date_sent: date_sent,
|
144
|
-
date_sent_before: date_sent_before,
|
145
|
-
date_sent_after: date_sent_after,
|
146
142
|
limit: limit,
|
147
143
|
page_size: page_size
|
148
144
|
).entries
|
@@ -155,8 +151,6 @@ module Twilio
|
|
155
151
|
# @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
|
156
152
|
# @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
|
157
153
|
# @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
158
|
-
# @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
159
|
-
# @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
160
154
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
161
155
|
# guarantees to never return more than limit. Default is no limit
|
162
156
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -164,15 +158,13 @@ module Twilio
|
|
164
158
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
165
159
|
# efficient page size, i.e. min(limit, 1000)
|
166
160
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
167
|
-
def stream(to: :unset, from: :unset, date_sent: :unset,
|
161
|
+
def stream(to: :unset, from: :unset, date_sent: :unset, limit: nil, page_size: nil)
|
168
162
|
limits = @version.read_limits(limit, page_size)
|
169
163
|
|
170
164
|
page = self.page(
|
171
165
|
to: to,
|
172
166
|
from: from,
|
173
167
|
date_sent: date_sent,
|
174
|
-
date_sent_before: date_sent_before,
|
175
|
-
date_sent_after: date_sent_after,
|
176
168
|
page_size: limits[:page_size], )
|
177
169
|
|
178
170
|
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
@@ -198,19 +190,15 @@ module Twilio
|
|
198
190
|
# @param [String] to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
|
199
191
|
# @param [String] from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
|
200
192
|
# @param [Time] date_sent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
201
|
-
# @param [Time] date_sent_before Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
202
|
-
# @param [Time] date_sent_after Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
|
203
193
|
# @param [String] page_token PageToken provided by the API
|
204
194
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
205
195
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
206
196
|
# @return [Page] Page of MessageInstance
|
207
|
-
def page(to: :unset, from: :unset, date_sent: :unset,
|
197
|
+
def page(to: :unset, from: :unset, date_sent: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
208
198
|
params = Twilio::Values.of({
|
209
199
|
'To' => to,
|
210
200
|
'From' => from,
|
211
201
|
'DateSent' => Twilio.serialize_iso8601_datetime(date_sent),
|
212
|
-
'DateSent<' => Twilio.serialize_iso8601_datetime(date_sent_before),
|
213
|
-
'DateSent>' => Twilio.serialize_iso8601_datetime(date_sent_after),
|
214
202
|
'PageToken' => page_token,
|
215
203
|
'Page' => page_number,
|
216
204
|
'PageSize' => page_size,
|
@@ -87,6 +87,11 @@ module Twilio
|
|
87
87
|
@media ||= Media.new self
|
88
88
|
end
|
89
89
|
##
|
90
|
+
# Access the PreviewMessaging Twilio Domain
|
91
|
+
def preview_messaging
|
92
|
+
@preview_messaging ||= PreviewMessaging.new self
|
93
|
+
end
|
94
|
+
##
|
90
95
|
# Access the Messaging Twilio Domain
|
91
96
|
def messaging
|
92
97
|
@messaging ||= Messaging.new self
|
@@ -0,0 +1,184 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Content
|
8
|
+
# This is the public Twilio REST API.
|
9
|
+
#
|
10
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
11
|
+
# https://openapi-generator.tech
|
12
|
+
# Do not edit the class manually.
|
13
|
+
#
|
14
|
+
|
15
|
+
|
16
|
+
module Twilio
|
17
|
+
module REST
|
18
|
+
class Content < ContentBase
|
19
|
+
class V1 < Version
|
20
|
+
class ContentContext < InstanceContext
|
21
|
+
|
22
|
+
class ApprovalCreateList < ListResource
|
23
|
+
|
24
|
+
class ContentApprovalRequest
|
25
|
+
# @param [name]: [String] Name of the template.
|
26
|
+
# @param [category]: [String] A WhatsApp recognized template category.
|
27
|
+
attr_accessor :name, :category
|
28
|
+
def initialize(payload)
|
29
|
+
@name = payload["name"]
|
30
|
+
@category = payload["category"]
|
31
|
+
end
|
32
|
+
def to_json(options = {})
|
33
|
+
{
|
34
|
+
name: @name,
|
35
|
+
category: @category,
|
36
|
+
}.to_json(options)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Initialize the ApprovalCreateList
|
42
|
+
# @param [Version] version Version that contains the resource
|
43
|
+
# @return [ApprovalCreateList] ApprovalCreateList
|
44
|
+
def initialize(version, sid: nil)
|
45
|
+
super(version)
|
46
|
+
# Path Solution
|
47
|
+
@solution = { sid: sid }
|
48
|
+
@uri = "/Content/#{@solution[:sid]}/ApprovalRequests/whatsapp"
|
49
|
+
|
50
|
+
end
|
51
|
+
##
|
52
|
+
# Create the ApprovalCreateInstance
|
53
|
+
# @param [ContentApprovalRequest] content_approval_request
|
54
|
+
# @return [ApprovalCreateInstance] Created ApprovalCreateInstance
|
55
|
+
def create(content_approval_request: nil
|
56
|
+
)
|
57
|
+
|
58
|
+
headers = Twilio::Values.of({"Content-Type"=> "application/json"})
|
59
|
+
payload = @version.create('POST', @uri, data: content_approval_request.to_json, headers: headers)
|
60
|
+
ApprovalCreateInstance.new(
|
61
|
+
@version,
|
62
|
+
payload,
|
63
|
+
sid: @solution[:sid],
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
# Provide a user friendly representation
|
71
|
+
def to_s
|
72
|
+
'#<Twilio.Content.V1.ApprovalCreateList>'
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
class ApprovalCreatePage < Page
|
77
|
+
##
|
78
|
+
# Initialize the ApprovalCreatePage
|
79
|
+
# @param [Version] version Version that contains the resource
|
80
|
+
# @param [Response] response Response from the API
|
81
|
+
# @param [Hash] solution Path solution for the resource
|
82
|
+
# @return [ApprovalCreatePage] ApprovalCreatePage
|
83
|
+
def initialize(version, response, solution)
|
84
|
+
super(version, response)
|
85
|
+
|
86
|
+
# Path Solution
|
87
|
+
@solution = solution
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# Build an instance of ApprovalCreateInstance
|
92
|
+
# @param [Hash] payload Payload response from the API
|
93
|
+
# @return [ApprovalCreateInstance] ApprovalCreateInstance
|
94
|
+
def get_instance(payload)
|
95
|
+
ApprovalCreateInstance.new(@version, payload, sid: @solution[:sid])
|
96
|
+
end
|
97
|
+
|
98
|
+
##
|
99
|
+
# Provide a user friendly representation
|
100
|
+
def to_s
|
101
|
+
'<Twilio.Content.V1.ApprovalCreatePage>'
|
102
|
+
end
|
103
|
+
end
|
104
|
+
class ApprovalCreateInstance < InstanceResource
|
105
|
+
##
|
106
|
+
# Initialize the ApprovalCreateInstance
|
107
|
+
# @param [Version] version Version that contains the resource
|
108
|
+
# @param [Hash] payload payload that contains response from Twilio
|
109
|
+
# @param [String] account_sid The SID of the
|
110
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this ApprovalCreate
|
111
|
+
# resource.
|
112
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
113
|
+
# @return [ApprovalCreateInstance] ApprovalCreateInstance
|
114
|
+
def initialize(version, payload , sid: nil)
|
115
|
+
super(version)
|
116
|
+
|
117
|
+
# Marshaled Properties
|
118
|
+
@properties = {
|
119
|
+
'name' => payload['name'],
|
120
|
+
'category' => payload['category'],
|
121
|
+
'content_type' => payload['content_type'],
|
122
|
+
'status' => payload['status'],
|
123
|
+
'rejection_reason' => payload['rejection_reason'],
|
124
|
+
'allow_category_change' => payload['allow_category_change'],
|
125
|
+
}
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
##
|
130
|
+
# @return [String]
|
131
|
+
def name
|
132
|
+
@properties['name']
|
133
|
+
end
|
134
|
+
|
135
|
+
##
|
136
|
+
# @return [String]
|
137
|
+
def category
|
138
|
+
@properties['category']
|
139
|
+
end
|
140
|
+
|
141
|
+
##
|
142
|
+
# @return [String]
|
143
|
+
def content_type
|
144
|
+
@properties['content_type']
|
145
|
+
end
|
146
|
+
|
147
|
+
##
|
148
|
+
# @return [String]
|
149
|
+
def status
|
150
|
+
@properties['status']
|
151
|
+
end
|
152
|
+
|
153
|
+
##
|
154
|
+
# @return [String]
|
155
|
+
def rejection_reason
|
156
|
+
@properties['rejection_reason']
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# @return [Boolean]
|
161
|
+
def allow_category_change
|
162
|
+
@properties['allow_category_change']
|
163
|
+
end
|
164
|
+
|
165
|
+
##
|
166
|
+
# Provide a user friendly representation
|
167
|
+
def to_s
|
168
|
+
"<Twilio.Content.V1.ApprovalCreateInstance>"
|
169
|
+
end
|
170
|
+
|
171
|
+
##
|
172
|
+
# Provide a detailed, user friendly representation
|
173
|
+
def inspect
|
174
|
+
"<Twilio.Content.V1.ApprovalCreateInstance>"
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
|
@@ -42,8 +42,6 @@ module Twilio
|
|
42
42
|
end
|
43
43
|
|
44
44
|
|
45
|
-
##
|
46
|
-
#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.
|
47
45
|
class ApprovalFetchContext < InstanceContext
|
48
46
|
##
|
49
47
|
# Initialize the ApprovalFetchContext
|