twilio-ruby 5.39.2 → 5.40.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGES.md +107 -1
- data/CONTRIBUTING.md +2 -2
- data/ISSUE_TEMPLATE.md +5 -1
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +4 -3
- data/lib/twilio-ruby/framework/version.rb +4 -8
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +6 -4
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +12 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +85 -60
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -2
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +8 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +3 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +2 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +8 -4
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +11 -4
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +13 -6
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations.rb +39 -3
- data/lib/twilio-ruby/rest/conversations/v1.rb +68 -5
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +268 -0
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +262 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +21 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +13 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +34 -19
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +48 -32
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +14 -11
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +427 -0
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +374 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +442 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +388 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +271 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +315 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +586 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +549 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +394 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +519 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +457 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +395 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +419 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +398 -0
- data/lib/twilio-ruby/rest/events.rb +72 -0
- data/lib/twilio-ruby/rest/events/v1.rb +90 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +291 -0
- data/lib/twilio-ruby/rest/events/v1/schema.rb +226 -0
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +290 -0
- data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +383 -0
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +216 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +2 -1
- data/lib/twilio-ruby/rest/messaging.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +6 -3
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +12 -6
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +10 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +16 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +18 -4
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +10 -5
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +6 -3
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +1 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +3 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +45 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +13 -13
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +6 -6
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +8 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +6 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +8 -8
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +14 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +7 -7
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +12 -11
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +17 -7
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +75 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +2 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +6 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +1 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +6 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +38 -23
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +2 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +201 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +21 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -2
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -3
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +18 -9
- data/lib/twilio-ruby/rest/video/v1/room.rb +2 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +1 -4
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +2 -1
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +5 -19
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +53 -0
- data/spec/holodeck/holodeck.rb +3 -3
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
- data/spec/integration/api/v2010/account/message_spec.rb +37 -0
- data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
- data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
- data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
- data/spec/integration/conversations/v1/{webhook_spec.rb → configuration/webhook_spec.rb} +12 -8
- data/spec/integration/conversations/v1/configuration_spec.rb +87 -0
- data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +4 -0
- data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +60 -4
- data/spec/integration/conversations/v1/conversation_spec.rb +35 -0
- data/spec/integration/conversations/v1/credential_spec.rb +219 -0
- data/spec/integration/conversations/v1/role_spec.rb +249 -0
- data/spec/integration/conversations/v1/service/binding_spec.rb +166 -0
- data/spec/integration/conversations/v1/service/configuration/notification_spec.rb +115 -0
- data/spec/integration/conversations/v1/service/configuration_spec.rb +87 -0
- data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +144 -0
- data/spec/integration/conversations/v1/service/conversation/message_spec.rb +429 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +407 -0
- data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +299 -0
- data/spec/integration/conversations/v1/service/conversation_spec.rb +289 -0
- data/spec/integration/conversations/v1/service/role_spec.rb +260 -0
- data/spec/integration/conversations/v1/service/user_spec.rb +230 -0
- data/spec/integration/conversations/v1/service_spec.rb +174 -0
- data/spec/integration/conversations/v1/user_spec.rb +220 -0
- data/spec/integration/events/v1/event_type_spec.rb +133 -0
- data/spec/integration/events/v1/schema/schema_version_spec.rb +126 -0
- data/spec/integration/events/v1/schema_spec.rb +46 -0
- data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
- data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
- data/spec/integration/events/v1/sink_spec.rb +217 -0
- data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +91 -0
- data/spec/integration/events/v1/subscription_spec.rb +243 -0
- data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
- data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +27 -0
- data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/supersim/v1/sim_spec.rb +23 -0
- data/spec/integration/supersim/v1/usage_record_spec.rb +463 -18
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +79 -0
- data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
- data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
- data/spec/integration/video/v1/room_spec.rb +37 -0
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +82 -5
- data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +0 -262
@@ -113,11 +113,13 @@ module Twilio
|
|
113
113
|
# the resource. It can be up to 64 characters long.
|
114
114
|
# @param [String] certificate [APN only] The URL-encoded representation of the
|
115
115
|
# certificate. Strip everything outside of the headers, e.g. `-----BEGIN
|
116
|
-
# CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END
|
116
|
+
# CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END
|
117
|
+
# CERTIFICATE-----`
|
117
118
|
# @param [String] private_key [APN only] The URL-encoded representation of the
|
118
119
|
# private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA
|
119
120
|
# PRIVATE
|
120
|
-
# KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END
|
121
|
+
# KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END
|
122
|
+
# RSA PRIVATE KEY-----`
|
121
123
|
# @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
|
122
124
|
# APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
|
123
125
|
# @param [String] api_key [GCM only] The `Server key` of your project from
|
@@ -211,11 +213,13 @@ module Twilio
|
|
211
213
|
# the resource. It can be up to 64 characters long.
|
212
214
|
# @param [String] certificate [APN only] The URL-encoded representation of the
|
213
215
|
# certificate. Strip everything outside of the headers, e.g. `-----BEGIN
|
214
|
-
# CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END
|
216
|
+
# CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END
|
217
|
+
# CERTIFICATE-----`
|
215
218
|
# @param [String] private_key [APN only] The URL-encoded representation of the
|
216
219
|
# private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA
|
217
220
|
# PRIVATE
|
218
|
-
# KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END
|
221
|
+
# KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END
|
222
|
+
# RSA PRIVATE KEY-----`
|
219
223
|
# @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
|
220
224
|
# APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
|
221
225
|
# @param [String] api_key [GCM only] The `Server key` of your project from
|
@@ -362,11 +366,13 @@ module Twilio
|
|
362
366
|
# the resource. It can be up to 64 characters long.
|
363
367
|
# @param [String] certificate [APN only] The URL-encoded representation of the
|
364
368
|
# certificate. Strip everything outside of the headers, e.g. `-----BEGIN
|
365
|
-
# CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END
|
369
|
+
# CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END
|
370
|
+
# CERTIFICATE-----`
|
366
371
|
# @param [String] private_key [APN only] The URL-encoded representation of the
|
367
372
|
# private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA
|
368
373
|
# PRIVATE
|
369
|
-
# KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END
|
374
|
+
# KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END
|
375
|
+
# RSA PRIVATE KEY-----`
|
370
376
|
# @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
|
371
377
|
# APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
|
372
378
|
# @param [String] api_key [GCM only] The `Server key` of your project from
|
@@ -76,7 +76,9 @@ module Twilio
|
|
76
76
|
# APNS `Payload` item, therefore the `aps` key must be used to change standard
|
77
77
|
# attributes. Adds custom key-value pairs to the root of the dictionary. See the
|
78
78
|
# [APNS
|
79
|
-
# documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html)
|
79
|
+
# documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html)
|
80
|
+
# for more details. We reserve keys that start with `twi_` for future use. Custom
|
81
|
+
# keys that start with `twi_` are not allowed.
|
80
82
|
# @param [Hash] gcm The GCM-specific payload that overrides corresponding
|
81
83
|
# attributes in the generic payload for GCM Bindings. This property maps to the
|
82
84
|
# root JSON dictionary. See the [GCM
|
@@ -98,7 +100,13 @@ module Twilio
|
|
98
100
|
# @param [Hash] fcm The FCM-specific payload that overrides corresponding
|
99
101
|
# attributes in the generic payload for FCM Bindings. This property maps to the
|
100
102
|
# root JSON dictionary. See the [FCM
|
101
|
-
# documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream)
|
103
|
+
# documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream)
|
104
|
+
# for more details. Target parameters `to`, `registration_ids`, `condition`, and
|
105
|
+
# `notification_key` are not allowed in this parameter. We reserve keys that start
|
106
|
+
# with `twi_` for future use. Custom keys that start with `twi_` are not allowed.
|
107
|
+
# FCM also [reserves certain
|
108
|
+
# keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which
|
109
|
+
# cannot be used in that channel.
|
102
110
|
# @param [String] segment The Segment resource is deprecated. Use the `tag`
|
103
111
|
# parameter, instead.
|
104
112
|
# @param [Hash] alexa Deprecated.
|
@@ -48,7 +48,7 @@ module Twilio
|
|
48
48
|
|
49
49
|
##
|
50
50
|
# Access the end_users
|
51
|
-
# @param [String] sid The unique string
|
51
|
+
# @param [String] sid The unique string created by Twilio to identify the End User
|
52
52
|
# resource.
|
53
53
|
# @return [EndUserList]
|
54
54
|
# @return [EndUserContext] if sid was passed.
|
@@ -95,8 +95,8 @@ module Twilio
|
|
95
95
|
|
96
96
|
##
|
97
97
|
# Access the supporting_documents
|
98
|
-
# @param [String] sid The unique string
|
99
|
-
# Document resource.
|
98
|
+
# @param [String] sid The unique string created by Twilio to identify the
|
99
|
+
# Supporting Document resource.
|
100
100
|
# @return [SupportingDocumentList]
|
101
101
|
# @return [SupportingDocumentContext] if sid was passed.
|
102
102
|
def supporting_documents(sid=:unset)
|
@@ -165,7 +165,7 @@ module Twilio
|
|
165
165
|
##
|
166
166
|
# Initialize the EndUserContext
|
167
167
|
# @param [Version] version Version that contains the resource
|
168
|
-
# @param [String] sid The unique string
|
168
|
+
# @param [String] sid The unique string created by Twilio to identify the End User
|
169
169
|
# resource.
|
170
170
|
# @return [EndUserContext] EndUserContext
|
171
171
|
def initialize(version, sid)
|
@@ -203,6 +203,13 @@ module Twilio
|
|
203
203
|
EndUserInstance.new(@version, payload, sid: @solution[:sid], )
|
204
204
|
end
|
205
205
|
|
206
|
+
##
|
207
|
+
# Delete the EndUserInstance
|
208
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
209
|
+
def delete
|
210
|
+
@version.delete('DELETE', @uri)
|
211
|
+
end
|
212
|
+
|
206
213
|
##
|
207
214
|
# Provide a user friendly representation
|
208
215
|
def to_s
|
@@ -223,7 +230,7 @@ module Twilio
|
|
223
230
|
# Initialize the EndUserInstance
|
224
231
|
# @param [Version] version Version that contains the resource
|
225
232
|
# @param [Hash] payload payload that contains response from Twilio
|
226
|
-
# @param [String] sid The unique string
|
233
|
+
# @param [String] sid The unique string created by Twilio to identify the End User
|
227
234
|
# resource.
|
228
235
|
# @return [EndUserInstance] EndUserInstance
|
229
236
|
def initialize(version, payload, sid: nil)
|
@@ -323,6 +330,13 @@ module Twilio
|
|
323
330
|
context.update(friendly_name: friendly_name, attributes: attributes, )
|
324
331
|
end
|
325
332
|
|
333
|
+
##
|
334
|
+
# Delete the EndUserInstance
|
335
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
336
|
+
def delete
|
337
|
+
context.delete
|
338
|
+
end
|
339
|
+
|
326
340
|
##
|
327
341
|
# Provide a user friendly representation
|
328
342
|
def to_s
|
@@ -164,8 +164,8 @@ module Twilio
|
|
164
164
|
##
|
165
165
|
# Initialize the SupportingDocumentContext
|
166
166
|
# @param [Version] version Version that contains the resource
|
167
|
-
# @param [String] sid The unique string
|
168
|
-
# Document resource.
|
167
|
+
# @param [String] sid The unique string created by Twilio to identify the
|
168
|
+
# Supporting Document resource.
|
169
169
|
# @return [SupportingDocumentContext] SupportingDocumentContext
|
170
170
|
def initialize(version, sid)
|
171
171
|
super(version)
|
@@ -202,6 +202,13 @@ module Twilio
|
|
202
202
|
SupportingDocumentInstance.new(@version, payload, sid: @solution[:sid], )
|
203
203
|
end
|
204
204
|
|
205
|
+
##
|
206
|
+
# Delete the SupportingDocumentInstance
|
207
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
208
|
+
def delete
|
209
|
+
@version.delete('DELETE', @uri)
|
210
|
+
end
|
211
|
+
|
205
212
|
##
|
206
213
|
# Provide a user friendly representation
|
207
214
|
def to_s
|
@@ -222,8 +229,8 @@ module Twilio
|
|
222
229
|
# Initialize the SupportingDocumentInstance
|
223
230
|
# @param [Version] version Version that contains the resource
|
224
231
|
# @param [Hash] payload payload that contains response from Twilio
|
225
|
-
# @param [String] sid The unique string
|
226
|
-
# Document resource.
|
232
|
+
# @param [String] sid The unique string created by Twilio to identify the
|
233
|
+
# Supporting Document resource.
|
227
234
|
# @return [SupportingDocumentInstance] SupportingDocumentInstance
|
228
235
|
def initialize(version, payload, sid: nil)
|
229
236
|
super(version)
|
@@ -336,6 +343,13 @@ module Twilio
|
|
336
343
|
context.update(friendly_name: friendly_name, attributes: attributes, )
|
337
344
|
end
|
338
345
|
|
346
|
+
##
|
347
|
+
# Delete the SupportingDocumentInstance
|
348
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
349
|
+
def delete
|
350
|
+
context.delete
|
351
|
+
end
|
352
|
+
|
339
353
|
##
|
340
354
|
# Provide a user friendly representation
|
341
355
|
def to_s
|
@@ -34,7 +34,8 @@ module Twilio
|
|
34
34
|
# @param [authorization_document.Status] status Status of an instance resource. It
|
35
35
|
# can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5.
|
36
36
|
# failed. See the section entitled [Status
|
37
|
-
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
37
|
+
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
38
|
+
# for more information on each of these statuses.
|
38
39
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
39
40
|
# guarantees to never return more than limit. Default is no limit
|
40
41
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -55,7 +56,8 @@ module Twilio
|
|
55
56
|
# @param [authorization_document.Status] status Status of an instance resource. It
|
56
57
|
# can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5.
|
57
58
|
# failed. See the section entitled [Status
|
58
|
-
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
59
|
+
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
60
|
+
# for more information on each of these statuses.
|
59
61
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
60
62
|
# guarantees to never return more than limit. Default is no limit.
|
61
63
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -93,7 +95,8 @@ module Twilio
|
|
93
95
|
# @param [authorization_document.Status] status Status of an instance resource. It
|
94
96
|
# can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5.
|
95
97
|
# failed. See the section entitled [Status
|
96
|
-
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
98
|
+
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
99
|
+
# for more information on each of these statuses.
|
97
100
|
# @param [String] page_token PageToken provided by the API
|
98
101
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
99
102
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -237,7 +240,8 @@ module Twilio
|
|
237
240
|
# @param [authorization_document.Status] status Status of an instance resource. It
|
238
241
|
# can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5.
|
239
242
|
# failed. See the section entitled [Status
|
240
|
-
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
243
|
+
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
244
|
+
# for more information on each of these statuses.
|
241
245
|
# @param [String] contact_title The title of the person authorized to sign the
|
242
246
|
# Authorization Document for this phone number.
|
243
247
|
# @param [String] contact_phone_number The contact phone number of the person
|
@@ -406,7 +410,8 @@ module Twilio
|
|
406
410
|
# @param [authorization_document.Status] status Status of an instance resource. It
|
407
411
|
# can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5.
|
408
412
|
# failed. See the section entitled [Status
|
409
|
-
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
413
|
+
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
414
|
+
# for more information on each of these statuses.
|
410
415
|
# @param [String] contact_title The title of the person authorized to sign the
|
411
416
|
# Authorization Document for this phone number.
|
412
417
|
# @param [String] contact_phone_number The contact phone number of the person
|
@@ -35,7 +35,8 @@ module Twilio
|
|
35
35
|
# @param [dependent_hosted_number_order.Status] status Status of an instance
|
36
36
|
# resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4.
|
37
37
|
# canceled, 5. failed. See the section entitled [Status
|
38
|
-
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
38
|
+
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
39
|
+
# for more information on each of these statuses.
|
39
40
|
# @param [String] phone_number An E164 formatted phone number hosted by this
|
40
41
|
# HostedNumberOrder.
|
41
42
|
# @param [String] incoming_phone_number_sid A 34 character string that uniquely
|
@@ -71,7 +72,8 @@ module Twilio
|
|
71
72
|
# @param [dependent_hosted_number_order.Status] status Status of an instance
|
72
73
|
# resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4.
|
73
74
|
# canceled, 5. failed. See the section entitled [Status
|
74
|
-
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
75
|
+
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
76
|
+
# for more information on each of these statuses.
|
75
77
|
# @param [String] phone_number An E164 formatted phone number hosted by this
|
76
78
|
# HostedNumberOrder.
|
77
79
|
# @param [String] incoming_phone_number_sid A 34 character string that uniquely
|
@@ -123,7 +125,8 @@ module Twilio
|
|
123
125
|
# @param [dependent_hosted_number_order.Status] status Status of an instance
|
124
126
|
# resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4.
|
125
127
|
# canceled, 5. failed. See the section entitled [Status
|
126
|
-
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
128
|
+
# Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values)
|
129
|
+
# for more information on each of these statuses.
|
127
130
|
# @param [String] phone_number An E164 formatted phone number hosted by this
|
128
131
|
# HostedNumberOrder.
|
129
132
|
# @param [String] incoming_phone_number_sid A 34 character string that uniquely
|
@@ -32,12 +32,9 @@ module Twilio
|
|
32
32
|
|
33
33
|
##
|
34
34
|
# Access the impressions_rate
|
35
|
-
# @return [
|
36
|
-
# @return [ImpressionsRateContext]
|
35
|
+
# @return [ImpressionsRateContext] ImpressionsRateContext
|
37
36
|
def impressions_rate
|
38
37
|
return ImpressionsRateContext.new(@version, @solution[:business_sid], )
|
39
|
-
|
40
|
-
@impressions_rate ||= ImpressionsRateList.new(@version, business_sid: @solution[:business_sid], )
|
41
38
|
end
|
42
39
|
|
43
40
|
##
|
@@ -31,7 +31,9 @@ module Twilio
|
|
31
31
|
##
|
32
32
|
# Create the PhoneNumberInstance
|
33
33
|
# @param [String] sid The SID of a Twilio
|
34
|
-
# [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource)
|
34
|
+
# [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource)
|
35
|
+
# resource that represents the Twilio Number you would like to assign to your
|
36
|
+
# Proxy Service.
|
35
37
|
# @param [String] phone_number The phone number in
|
36
38
|
# [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone
|
37
39
|
# numbers consist of a + followed by the country code and subscriber number
|
@@ -127,8 +127,20 @@ module Twilio
|
|
127
127
|
# on create.
|
128
128
|
# @param [Hash] participants The Participant objects to include in the new
|
129
129
|
# session.
|
130
|
+
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
131
|
+
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
132
|
+
# per-request opt-in to allowing Proxy to reject a Session create (with
|
133
|
+
# Participants) request that could cause the same Identifier/ProxyIdentifier pair
|
134
|
+
# to be active in multiple Sessions. Depending on the context, this could be a 409
|
135
|
+
# error (Twilio error code 80623) or a 400 error (Twilio error code 80604). If not
|
136
|
+
# provided, requests will be allowed to succeed and a Debugger notification
|
137
|
+
# (80802) will be emitted. Having multiple, active Participants with the same
|
138
|
+
# Identifier/ProxyIdentifier pair causes calls and messages from affected
|
139
|
+
# Participants to be routed incorrectly. Please note, the default behavior for
|
140
|
+
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
141
|
+
# as described. This will eventually be the default for all accounts.
|
130
142
|
# @return [SessionInstance] Created SessionInstance
|
131
|
-
def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset)
|
143
|
+
def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset, fail_on_participant_conflict: :unset)
|
132
144
|
data = Twilio::Values.of({
|
133
145
|
'UniqueName' => unique_name,
|
134
146
|
'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry),
|
@@ -136,6 +148,7 @@ module Twilio
|
|
136
148
|
'Mode' => mode,
|
137
149
|
'Status' => status,
|
138
150
|
'Participants' => Twilio.serialize_list(participants) { |e| Twilio.serialize_object(e) },
|
151
|
+
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
139
152
|
})
|
140
153
|
|
141
154
|
payload = @version.create('POST', @uri, data: data)
|
@@ -230,12 +243,24 @@ module Twilio
|
|
230
243
|
# is measured from the last Session create or the Session's last Interaction.
|
231
244
|
# @param [session.Status] status The new status of the resource. Can be:
|
232
245
|
# `in-progress` to re-open a session or `closed` to close a session.
|
246
|
+
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
247
|
+
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
248
|
+
# per-request opt-in to allowing Proxy to return a 400 error (Twilio error code
|
249
|
+
# 80604) when a request to set a Session to in-progress would cause Participants
|
250
|
+
# with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions.
|
251
|
+
# If not provided, requests will be allowed to succeed, and a Debugger
|
252
|
+
# notification (80801) will be emitted. Having multiple, active Participants with
|
253
|
+
# the same Identifier/ProxyIdentifier pair causes calls and messages from affected
|
254
|
+
# Participants to be routed incorrectly. Please note, the default behavior for
|
255
|
+
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
256
|
+
# as described. This will eventually be the default for all accounts.
|
233
257
|
# @return [SessionInstance] Updated SessionInstance
|
234
|
-
def update(date_expiry: :unset, ttl: :unset, status: :unset)
|
258
|
+
def update(date_expiry: :unset, ttl: :unset, status: :unset, fail_on_participant_conflict: :unset)
|
235
259
|
data = Twilio::Values.of({
|
236
260
|
'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry),
|
237
261
|
'Ttl' => ttl,
|
238
262
|
'Status' => status,
|
263
|
+
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
239
264
|
})
|
240
265
|
|
241
266
|
payload = @version.update('POST', @uri, data: data)
|
@@ -473,9 +498,25 @@ module Twilio
|
|
473
498
|
# is measured from the last Session create or the Session's last Interaction.
|
474
499
|
# @param [session.Status] status The new status of the resource. Can be:
|
475
500
|
# `in-progress` to re-open a session or `closed` to close a session.
|
501
|
+
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
502
|
+
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
503
|
+
# per-request opt-in to allowing Proxy to return a 400 error (Twilio error code
|
504
|
+
# 80604) when a request to set a Session to in-progress would cause Participants
|
505
|
+
# with the same Identifier/ProxyIdentifier pair to be active in multiple Sessions.
|
506
|
+
# If not provided, requests will be allowed to succeed, and a Debugger
|
507
|
+
# notification (80801) will be emitted. Having multiple, active Participants with
|
508
|
+
# the same Identifier/ProxyIdentifier pair causes calls and messages from affected
|
509
|
+
# Participants to be routed incorrectly. Please note, the default behavior for
|
510
|
+
# accounts without the ProxyAllowParticipantConflict flag is to reject the request
|
511
|
+
# as described. This will eventually be the default for all accounts.
|
476
512
|
# @return [SessionInstance] Updated SessionInstance
|
477
|
-
def update(date_expiry: :unset, ttl: :unset, status: :unset)
|
478
|
-
context.update(
|
513
|
+
def update(date_expiry: :unset, ttl: :unset, status: :unset, fail_on_participant_conflict: :unset)
|
514
|
+
context.update(
|
515
|
+
date_expiry: date_expiry,
|
516
|
+
ttl: ttl,
|
517
|
+
status: status,
|
518
|
+
fail_on_participant_conflict: fail_on_participant_conflict,
|
519
|
+
)
|
479
520
|
end
|
480
521
|
|
481
522
|
##
|
@@ -121,13 +121,26 @@ module Twilio
|
|
121
121
|
# Participant. If not specified, Proxy will select a number from the pool.
|
122
122
|
# @param [String] proxy_identifier_sid The SID of the Proxy Identifier to assign
|
123
123
|
# to the Participant.
|
124
|
+
# @param [Boolean] fail_on_participant_conflict [Experimental] For accounts with
|
125
|
+
# the ProxyAllowParticipantConflict account flag, setting to true enables
|
126
|
+
# per-request opt-in to allowing Proxy to reject a Participant create request that
|
127
|
+
# could cause the same Identifier/ProxyIdentifier pair to be active in multiple
|
128
|
+
# Sessions. Depending on the context, this could be a 409 error (Twilio error code
|
129
|
+
# 80623) or a 400 error (Twilio error code 80604). If not provided, requests will
|
130
|
+
# be allowed to succeed and a Debugger notification (80802) will be emitted.
|
131
|
+
# Having multiple, active Participants with the same Identifier/ProxyIdentifier
|
132
|
+
# pair causes calls and messages from affected Participants to be routed
|
133
|
+
# incorrectly. Please note, the default behavior for accounts without the
|
134
|
+
# ProxyAllowParticipantConflict flag is to reject the request as described. This
|
135
|
+
# will eventually be the default for all accounts.
|
124
136
|
# @return [ParticipantInstance] Created ParticipantInstance
|
125
|
-
def create(identifier: nil, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset)
|
137
|
+
def create(identifier: nil, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset, fail_on_participant_conflict: :unset)
|
126
138
|
data = Twilio::Values.of({
|
127
139
|
'Identifier' => identifier,
|
128
140
|
'FriendlyName' => friendly_name,
|
129
141
|
'ProxyIdentifier' => proxy_identifier,
|
130
142
|
'ProxyIdentifierSid' => proxy_identifier_sid,
|
143
|
+
'FailOnParticipantConflict' => fail_on_participant_conflict,
|
131
144
|
})
|
132
145
|
|
133
146
|
payload = @version.create('POST', @uri, data: data)
|
@@ -107,12 +107,12 @@ module Twilio
|
|
107
107
|
|
108
108
|
##
|
109
109
|
# Create the ServiceInstance
|
110
|
-
# @param [String] unique_name
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
110
|
+
# @param [String] unique_name A user-defined string that uniquely identifies the
|
111
|
+
# Service resource. It can be used as an alternative to the `sid` in the URL path
|
112
|
+
# to address the Service resource. This value must be 50 characters or less in
|
113
|
+
# length and be unique.
|
114
114
|
# @param [String] friendly_name A descriptive string that you create to describe
|
115
|
-
# the Service resource. It can be
|
115
|
+
# the Service resource. It can be a maximum of 255 characters.
|
116
116
|
# @param [Boolean] include_credentials Whether to inject Account credentials into
|
117
117
|
# a function invocation context. The default value is `false`.
|
118
118
|
# @param [Boolean] ui_editable Whether the Service's properties and subresources
|
@@ -212,9 +212,9 @@ module Twilio
|
|
212
212
|
# @param [Boolean] include_credentials Whether to inject Account credentials into
|
213
213
|
# a function invocation context.
|
214
214
|
# @param [String] friendly_name A descriptive string that you create to describe
|
215
|
-
# the Service resource. It can be
|
216
|
-
# @param [Boolean] ui_editable Whether the Service's properties and
|
217
|
-
# can be edited via the UI. The default value is `false`.
|
215
|
+
# the Service resource. It can be a maximum of 255 characters.
|
216
|
+
# @param [Boolean] ui_editable Whether the Service resource's properties and
|
217
|
+
# subresources can be edited via the UI. The default value is `false`.
|
218
218
|
# @return [ServiceInstance] Updated ServiceInstance
|
219
219
|
def update(include_credentials: :unset, friendly_name: :unset, ui_editable: :unset)
|
220
220
|
data = Twilio::Values.of({
|
@@ -376,7 +376,7 @@ module Twilio
|
|
376
376
|
end
|
377
377
|
|
378
378
|
##
|
379
|
-
# @return [String]
|
379
|
+
# @return [String] A user-defined string that uniquely identifies the Service resource
|
380
380
|
def unique_name
|
381
381
|
@properties['unique_name']
|
382
382
|
end
|
@@ -388,7 +388,7 @@ module Twilio
|
|
388
388
|
end
|
389
389
|
|
390
390
|
##
|
391
|
-
# @return [Boolean] Whether the Service's properties and subresources can be edited via the UI
|
391
|
+
# @return [Boolean] Whether the Service resource's properties and subresources can be edited via the UI
|
392
392
|
def ui_editable
|
393
393
|
@properties['ui_editable']
|
394
394
|
end
|
@@ -436,9 +436,9 @@ module Twilio
|
|
436
436
|
# @param [Boolean] include_credentials Whether to inject Account credentials into
|
437
437
|
# a function invocation context.
|
438
438
|
# @param [String] friendly_name A descriptive string that you create to describe
|
439
|
-
# the Service resource. It can be
|
440
|
-
# @param [Boolean] ui_editable Whether the Service's properties and
|
441
|
-
# can be edited via the UI. The default value is `false`.
|
439
|
+
# the Service resource. It can be a maximum of 255 characters.
|
440
|
+
# @param [Boolean] ui_editable Whether the Service resource's properties and
|
441
|
+
# subresources can be edited via the UI. The default value is `false`.
|
442
442
|
# @return [ServiceInstance] Updated ServiceInstance
|
443
443
|
def update(include_credentials: :unset, friendly_name: :unset, ui_editable: :unset)
|
444
444
|
context.update(
|