twilio-ruby 5.40.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/CHANGES.md +15 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/framework/version.rb +2 -1
- 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 +8 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -2
- 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/conversations.rb +0 -16
- data/lib/twilio-ruby/rest/conversations/v1.rb +0 -24
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +17 -7
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +262 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +6 -6
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +13 -10
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +22 -16
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +42 -36
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +14 -11
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +4 -2
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +28 -25
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +30 -18
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +315 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +23 -20
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +32 -26
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +52 -46
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +24 -21
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +13 -11
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +23 -23
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +14 -14
- data/lib/twilio-ruby/rest/events.rb +10 -1
- data/lib/twilio-ruby/rest/events/v1.rb +17 -1
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +8 -8
- 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/subscription.rb +28 -8
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +3 -109
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +2 -1
- 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/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/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 +19 -26
- 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/verification.rb +3 -1
- 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/voice/v1/dialing_permissions.rb +1 -4
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +2 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +11 -0
- data/spec/integration/conversations/v1/{webhook_spec.rb → configuration/webhook_spec.rb} +12 -8
- data/spec/integration/conversations/v1/configuration_spec.rb +4 -2
- data/spec/integration/conversations/v1/{notification_spec.rb → service/configuration/notification_spec.rb} +12 -4
- 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/subscription/subscribed_event_spec.rb +0 -121
- data/spec/integration/events/v1/subscription_spec.rb +38 -0
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +79 -0
- metadata +17 -8
- data/lib/twilio-ruby/rest/conversations/v1/notification.rb +0 -310
- data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +0 -262
@@ -166,7 +166,8 @@ module Twilio
|
|
166
166
|
# defaults to `fine`.
|
167
167
|
# @param [String] status_callback The URL we should call using the `POST` method
|
168
168
|
# to send [status
|
169
|
-
# information](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback)
|
169
|
+
# information](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback)
|
170
|
+
# to your application when the status of the fax changes.
|
170
171
|
# @param [String] from The number the fax was sent from. Can be the phone number
|
171
172
|
# in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the SIP
|
172
173
|
# `from` value. The caller ID displayed to the recipient uses this value. If this
|
@@ -41,7 +41,8 @@ module Twilio
|
|
41
41
|
# @param [String] fallback_method The HTTP method we should use to call
|
42
42
|
# `fallback_url`. Can be: `GET` or `POST`.
|
43
43
|
# @param [String] status_callback The URL we should call to [pass status
|
44
|
-
# updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values)
|
44
|
+
# updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values)
|
45
|
+
# about message delivery.
|
45
46
|
# @param [Boolean] sticky_sender Whether to enable [Sticky
|
46
47
|
# Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service
|
47
48
|
# instance.
|
@@ -240,7 +241,8 @@ module Twilio
|
|
240
241
|
# @param [String] fallback_method The HTTP method we should use to call
|
241
242
|
# `fallback_url`. Can be: `GET` or `POST`.
|
242
243
|
# @param [String] status_callback The URL we should call to [pass status
|
243
|
-
# updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values)
|
244
|
+
# updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values)
|
245
|
+
# about message delivery.
|
244
246
|
# @param [Boolean] sticky_sender Whether to enable [Sticky
|
245
247
|
# Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service
|
246
248
|
# instance.
|
@@ -557,7 +559,8 @@ module Twilio
|
|
557
559
|
# @param [String] fallback_method The HTTP method we should use to call
|
558
560
|
# `fallback_url`. Can be: `GET` or `POST`.
|
559
561
|
# @param [String] status_callback The URL we should call to [pass status
|
560
|
-
# updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values)
|
562
|
+
# updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values)
|
563
|
+
# about message delivery.
|
561
564
|
# @param [Boolean] sticky_sender Whether to enable [Sticky
|
562
565
|
# Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service
|
563
566
|
# instance.
|
@@ -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.
|
@@ -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
|
@@ -305,7 +305,9 @@ module Twilio
|
|
305
305
|
# should use to call `conference_recording_status_callback`. Can be: `GET` or
|
306
306
|
# `POST` and defaults to `POST`.
|
307
307
|
# @param [String] region The
|
308
|
-
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls)
|
308
|
+
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls)
|
309
|
+
# where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`,
|
310
|
+
# `br1`, `au1`, or `jp1`.
|
309
311
|
# @param [String] sip_auth_username The SIP username used for authentication.
|
310
312
|
# @param [String] sip_auth_password The SIP password for authentication.
|
311
313
|
# @param [String] dequeue_status_callback_event The Call progress events sent via
|
@@ -643,7 +645,9 @@ module Twilio
|
|
643
645
|
# should use to call `conference_recording_status_callback`. Can be: `GET` or
|
644
646
|
# `POST` and defaults to `POST`.
|
645
647
|
# @param [String] region The
|
646
|
-
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls)
|
648
|
+
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls)
|
649
|
+
# where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`,
|
650
|
+
# `br1`, `au1`, or `jp1`.
|
647
651
|
# @param [String] sip_auth_username The SIP username used for authentication.
|
648
652
|
# @param [String] sip_auth_password The SIP password for authentication.
|
649
653
|
# @param [String] dequeue_status_callback_event The Call progress events sent via
|
@@ -210,12 +210,9 @@ module Twilio
|
|
210
210
|
|
211
211
|
##
|
212
212
|
# Access the statistics
|
213
|
-
# @return [
|
214
|
-
# @return [WorkersStatisticsContext]
|
213
|
+
# @return [WorkersStatisticsContext] WorkersStatisticsContext
|
215
214
|
def statistics
|
216
215
|
return WorkersStatisticsContext.new(@version, @solution[:workspace_sid], )
|
217
|
-
|
218
|
-
@statistics ||= WorkersStatisticsList.new(@version, workspace_sid: @solution[:workspace_sid], )
|
219
216
|
end
|
220
217
|
|
221
218
|
##
|
@@ -309,7 +309,9 @@ module Twilio
|
|
309
309
|
# should use to call `conference_recording_status_callback`. Can be: `GET` or
|
310
310
|
# `POST` and defaults to `POST`.
|
311
311
|
# @param [String] region The
|
312
|
-
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls)
|
312
|
+
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls)
|
313
|
+
# where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`,
|
314
|
+
# `br1`, `au1`, or `jp1`.
|
313
315
|
# @param [String] sip_auth_username The SIP username used for authentication.
|
314
316
|
# @param [String] sip_auth_password The SIP password for authentication.
|
315
317
|
# @param [String] dequeue_status_callback_event The call progress events sent via
|
@@ -645,7 +647,9 @@ module Twilio
|
|
645
647
|
# should use to call `conference_recording_status_callback`. Can be: `GET` or
|
646
648
|
# `POST` and defaults to `POST`.
|
647
649
|
# @param [String] region The
|
648
|
-
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls)
|
650
|
+
# [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls)
|
651
|
+
# where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`,
|
652
|
+
# `br1`, `au1`, or `jp1`.
|
649
653
|
# @param [String] sip_auth_username The SIP username used for authentication.
|
650
654
|
# @param [String] sip_auth_password The SIP password for authentication.
|
651
655
|
# @param [String] dequeue_status_callback_event The call progress events sent via
|
@@ -40,14 +40,6 @@ module Twilio
|
|
40
40
|
# information.
|
41
41
|
# @param [String] disaster_recovery_method The HTTP method we should use to call
|
42
42
|
# the `disaster_recovery_url`. Can be: `GET` or `POST`.
|
43
|
-
# @param [trunk.RecordingSetting] recording The recording settings for the trunk.
|
44
|
-
# Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to
|
45
|
-
# `record-from-ringing` or `record-from-answer`, all calls going through the trunk
|
46
|
-
# will be recorded. The only way to change recording parameters is on a
|
47
|
-
# sub-resource of a Trunk after it has been created.
|
48
|
-
# e.g.`/Trunks/[Trunk_SID]/Recording -XPOST -d'Mode=record-from-answer'`. See
|
49
|
-
# [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more
|
50
|
-
# information.
|
51
43
|
# @param [trunk.TransferSetting] transfer_mode The call transfer settings for the
|
52
44
|
# trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See
|
53
45
|
# [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more
|
@@ -63,13 +55,12 @@ module Twilio
|
|
63
55
|
# Caller ID data on your phone. See [CNAM
|
64
56
|
# Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
|
65
57
|
# @return [TrunkInstance] Created TrunkInstance
|
66
|
-
def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset,
|
58
|
+
def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
67
59
|
data = Twilio::Values.of({
|
68
60
|
'FriendlyName' => friendly_name,
|
69
61
|
'DomainName' => domain_name,
|
70
62
|
'DisasterRecoveryUrl' => disaster_recovery_url,
|
71
63
|
'DisasterRecoveryMethod' => disaster_recovery_method,
|
72
|
-
'Recording' => recording,
|
73
64
|
'TransferMode' => transfer_mode,
|
74
65
|
'Secure' => secure,
|
75
66
|
'CnamLookupEnabled' => cnam_lookup_enabled,
|
@@ -215,6 +206,7 @@ module Twilio
|
|
215
206
|
@credentials_lists = nil
|
216
207
|
@ip_access_control_lists = nil
|
217
208
|
@phone_numbers = nil
|
209
|
+
@recordings = nil
|
218
210
|
end
|
219
211
|
|
220
212
|
##
|
@@ -250,12 +242,6 @@ module Twilio
|
|
250
242
|
# information.
|
251
243
|
# @param [String] disaster_recovery_method The HTTP method we should use to call
|
252
244
|
# the `disaster_recovery_url`. Can be: `GET` or `POST`.
|
253
|
-
# @param [trunk.RecordingSetting] recording The recording settings for the trunk.
|
254
|
-
# Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to
|
255
|
-
# `record-from-ringing` or `record-from-answer`, all calls going through the trunk
|
256
|
-
# will be recorded. See
|
257
|
-
# [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more
|
258
|
-
# information.
|
259
245
|
# @param [trunk.TransferSetting] transfer_mode The call transfer settings for the
|
260
246
|
# trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See
|
261
247
|
# [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more
|
@@ -271,13 +257,12 @@ module Twilio
|
|
271
257
|
# Caller ID data on your phone. See [CNAM
|
272
258
|
# Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
|
273
259
|
# @return [TrunkInstance] Updated TrunkInstance
|
274
|
-
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset,
|
260
|
+
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
275
261
|
data = Twilio::Values.of({
|
276
262
|
'FriendlyName' => friendly_name,
|
277
263
|
'DomainName' => domain_name,
|
278
264
|
'DisasterRecoveryUrl' => disaster_recovery_url,
|
279
265
|
'DisasterRecoveryMethod' => disaster_recovery_method,
|
280
|
-
'Recording' => recording,
|
281
266
|
'TransferMode' => transfer_mode,
|
282
267
|
'Secure' => secure,
|
283
268
|
'CnamLookupEnabled' => cnam_lookup_enabled,
|
@@ -360,6 +345,14 @@ module Twilio
|
|
360
345
|
@phone_numbers
|
361
346
|
end
|
362
347
|
|
348
|
+
##
|
349
|
+
# Access the recordings
|
350
|
+
# @return [RecordingList]
|
351
|
+
# @return [RecordingContext]
|
352
|
+
def recordings
|
353
|
+
RecordingContext.new(@version, @solution[:sid], )
|
354
|
+
end
|
355
|
+
|
363
356
|
##
|
364
357
|
# Provide a user friendly representation
|
365
358
|
def to_s
|
@@ -549,12 +542,6 @@ module Twilio
|
|
549
542
|
# information.
|
550
543
|
# @param [String] disaster_recovery_method The HTTP method we should use to call
|
551
544
|
# the `disaster_recovery_url`. Can be: `GET` or `POST`.
|
552
|
-
# @param [trunk.RecordingSetting] recording The recording settings for the trunk.
|
553
|
-
# Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to
|
554
|
-
# `record-from-ringing` or `record-from-answer`, all calls going through the trunk
|
555
|
-
# will be recorded. See
|
556
|
-
# [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more
|
557
|
-
# information.
|
558
545
|
# @param [trunk.TransferSetting] transfer_mode The call transfer settings for the
|
559
546
|
# trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See
|
560
547
|
# [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more
|
@@ -570,13 +557,12 @@ module Twilio
|
|
570
557
|
# Caller ID data on your phone. See [CNAM
|
571
558
|
# Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
|
572
559
|
# @return [TrunkInstance] Updated TrunkInstance
|
573
|
-
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset,
|
560
|
+
def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
|
574
561
|
context.update(
|
575
562
|
friendly_name: friendly_name,
|
576
563
|
domain_name: domain_name,
|
577
564
|
disaster_recovery_url: disaster_recovery_url,
|
578
565
|
disaster_recovery_method: disaster_recovery_method,
|
579
|
-
recording: recording,
|
580
566
|
transfer_mode: transfer_mode,
|
581
567
|
secure: secure,
|
582
568
|
cnam_lookup_enabled: cnam_lookup_enabled,
|
@@ -611,6 +597,13 @@ module Twilio
|
|
611
597
|
context.phone_numbers
|
612
598
|
end
|
613
599
|
|
600
|
+
##
|
601
|
+
# Access the recordings
|
602
|
+
# @return [recordings] recordings
|
603
|
+
def recordings
|
604
|
+
context.recordings
|
605
|
+
end
|
606
|
+
|
614
607
|
##
|
615
608
|
# Provide a user friendly representation
|
616
609
|
def to_s
|
@@ -28,7 +28,8 @@ module Twilio
|
|
28
28
|
##
|
29
29
|
# Create the IpAccessControlListInstance
|
30
30
|
# @param [String] ip_access_control_list_sid The SID of the [IP Access Control
|
31
|
-
# List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource)
|
31
|
+
# List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource)
|
32
|
+
# that you want to associate with the trunk.
|
32
33
|
# @return [IpAccessControlListInstance] Created IpAccessControlListInstance
|
33
34
|
def create(ip_access_control_list_sid: nil)
|
34
35
|
data = Twilio::Values.of({'IpAccessControlListSid' => ip_access_control_list_sid, })
|
@@ -31,7 +31,8 @@ module Twilio
|
|
31
31
|
##
|
32
32
|
# Create the PhoneNumberInstance
|
33
33
|
# @param [String] phone_number_sid The SID of the [Incoming Phone
|
34
|
-
# Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource)
|
34
|
+
# Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource)
|
35
|
+
# that you want to associate with the trunk.
|
35
36
|
# @return [PhoneNumberInstance] Created PhoneNumberInstance
|
36
37
|
def create(phone_number_sid: nil)
|
37
38
|
data = Twilio::Values.of({'PhoneNumberSid' => phone_number_sid, })
|
@@ -0,0 +1,201 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Trunking < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class TrunkContext < InstanceContext
|
14
|
+
class RecordingList < ListResource
|
15
|
+
##
|
16
|
+
# Initialize the RecordingList
|
17
|
+
# @param [Version] version Version that contains the resource
|
18
|
+
# @param [String] trunk_sid The trunk_sid
|
19
|
+
# @return [RecordingList] RecordingList
|
20
|
+
def initialize(version, trunk_sid: nil)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {trunk_sid: trunk_sid}
|
25
|
+
end
|
26
|
+
|
27
|
+
##
|
28
|
+
# Provide a user friendly representation
|
29
|
+
def to_s
|
30
|
+
'#<Twilio.Trunking.V1.RecordingList>'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
class RecordingPage < Page
|
35
|
+
##
|
36
|
+
# Initialize the RecordingPage
|
37
|
+
# @param [Version] version Version that contains the resource
|
38
|
+
# @param [Response] response Response from the API
|
39
|
+
# @param [Hash] solution Path solution for the resource
|
40
|
+
# @return [RecordingPage] RecordingPage
|
41
|
+
def initialize(version, response, solution)
|
42
|
+
super(version, response)
|
43
|
+
|
44
|
+
# Path Solution
|
45
|
+
@solution = solution
|
46
|
+
end
|
47
|
+
|
48
|
+
##
|
49
|
+
# Build an instance of RecordingInstance
|
50
|
+
# @param [Hash] payload Payload response from the API
|
51
|
+
# @return [RecordingInstance] RecordingInstance
|
52
|
+
def get_instance(payload)
|
53
|
+
RecordingInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], )
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Provide a user friendly representation
|
58
|
+
def to_s
|
59
|
+
'<Twilio.Trunking.V1.RecordingPage>'
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
class RecordingContext < InstanceContext
|
64
|
+
##
|
65
|
+
# Initialize the RecordingContext
|
66
|
+
# @param [Version] version Version that contains the resource
|
67
|
+
# @param [String] trunk_sid The SID of the Trunk from which to fetch the recording
|
68
|
+
# settings.
|
69
|
+
# @return [RecordingContext] RecordingContext
|
70
|
+
def initialize(version, trunk_sid)
|
71
|
+
super(version)
|
72
|
+
|
73
|
+
# Path Solution
|
74
|
+
@solution = {trunk_sid: trunk_sid, }
|
75
|
+
@uri = "/Trunks/#{@solution[:trunk_sid]}/Recording"
|
76
|
+
end
|
77
|
+
|
78
|
+
##
|
79
|
+
# Fetch the RecordingInstance
|
80
|
+
# @return [RecordingInstance] Fetched RecordingInstance
|
81
|
+
def fetch
|
82
|
+
payload = @version.fetch('GET', @uri)
|
83
|
+
|
84
|
+
RecordingInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], )
|
85
|
+
end
|
86
|
+
|
87
|
+
##
|
88
|
+
# Update the RecordingInstance
|
89
|
+
# @return [RecordingInstance] Updated RecordingInstance
|
90
|
+
def update
|
91
|
+
payload = @version.update('POST', @uri)
|
92
|
+
|
93
|
+
RecordingInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], )
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Provide a user friendly representation
|
98
|
+
def to_s
|
99
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
100
|
+
"#<Twilio.Trunking.V1.RecordingContext #{context}>"
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Provide a detailed, user friendly representation
|
105
|
+
def inspect
|
106
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
107
|
+
"#<Twilio.Trunking.V1.RecordingContext #{context}>"
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
class RecordingInstance < InstanceResource
|
112
|
+
##
|
113
|
+
# Initialize the RecordingInstance
|
114
|
+
# @param [Version] version Version that contains the resource
|
115
|
+
# @param [Hash] payload payload that contains response from Twilio
|
116
|
+
# @param [String] trunk_sid The trunk_sid
|
117
|
+
# @return [RecordingInstance] RecordingInstance
|
118
|
+
def initialize(version, payload, trunk_sid: nil)
|
119
|
+
super(version)
|
120
|
+
|
121
|
+
# Marshaled Properties
|
122
|
+
@properties = {
|
123
|
+
'mode' => payload['mode'],
|
124
|
+
'trim' => payload['trim'],
|
125
|
+
'url' => payload['url'],
|
126
|
+
'trunk_sid' => payload['trunk_sid'],
|
127
|
+
}
|
128
|
+
|
129
|
+
# Context
|
130
|
+
@instance_context = nil
|
131
|
+
@params = {'trunk_sid' => trunk_sid, }
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Generate an instance context for the instance, the context is capable of
|
136
|
+
# performing various actions. All instance actions are proxied to the context
|
137
|
+
# @return [RecordingContext] RecordingContext for this RecordingInstance
|
138
|
+
def context
|
139
|
+
unless @instance_context
|
140
|
+
@instance_context = RecordingContext.new(@version, @params['trunk_sid'], )
|
141
|
+
end
|
142
|
+
@instance_context
|
143
|
+
end
|
144
|
+
|
145
|
+
##
|
146
|
+
# @return [recording.RecordingMode] The recording mode for the trunk.
|
147
|
+
def mode
|
148
|
+
@properties['mode']
|
149
|
+
end
|
150
|
+
|
151
|
+
##
|
152
|
+
# @return [recording.RecordingTrim] The recording trim setting for the trunk.
|
153
|
+
def trim
|
154
|
+
@properties['trim']
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# @return [String] The url
|
159
|
+
def url
|
160
|
+
@properties['url']
|
161
|
+
end
|
162
|
+
|
163
|
+
##
|
164
|
+
# @return [String] The trunk_sid
|
165
|
+
def trunk_sid
|
166
|
+
@properties['trunk_sid']
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# Fetch the RecordingInstance
|
171
|
+
# @return [RecordingInstance] Fetched RecordingInstance
|
172
|
+
def fetch
|
173
|
+
context.fetch
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# Update the RecordingInstance
|
178
|
+
# @return [RecordingInstance] Updated RecordingInstance
|
179
|
+
def update
|
180
|
+
context.update
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# Provide a user friendly representation
|
185
|
+
def to_s
|
186
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
187
|
+
"<Twilio.Trunking.V1.RecordingInstance #{values}>"
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# Provide a detailed, user friendly representation
|
192
|
+
def inspect
|
193
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
194
|
+
"<Twilio.Trunking.V1.RecordingInstance #{values}>"
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|