twilio-ruby 5.21.1 → 5.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +13 -0
- data/README.md +7 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +14 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +6 -4
- data/lib/twilio-ruby/rest/chat.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2.rb +4 -2
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +50 -45
- data/lib/twilio-ruby/rest/chat/v2/service.rb +197 -146
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +43 -30
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +85 -77
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +48 -46
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +117 -113
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +98 -96
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +90 -36
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +38 -25
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +49 -51
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +42 -34
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +37 -31
- data/lib/twilio-ruby/rest/flex_api.rb +8 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +15 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +515 -0
- data/lib/twilio-ruby/rest/ip_messaging.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +4 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +50 -45
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +197 -146
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +43 -30
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +85 -77
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +48 -46
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +117 -113
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +98 -96
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +90 -36
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +38 -25
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +49 -51
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +42 -34
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +37 -31
- data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +1 -4
- data/lib/twilio-ruby/rest/voice/v1/voice_permission/settings.rb +207 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/flex_api/v1/flex_flow_spec.rb +255 -0
- data/spec/integration/voice/v1/voice_permission/settings_spec.rb +77 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad3aa9bdc412dd96cc0b81e055d21cebb066bd4cd373e8d6e81073a5b190abc2
|
|
4
|
+
data.tar.gz: 1e613a2b3905866dd111eab5f637b199f0ecac111870ff8b57abe9fcbc1568a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 141bc5a13272f67e640c5c70a46ab38d8e37f5bcca2d0c092a034841250e442c7ea0bca7cb159d6eada054f6a562eab34a1223f6944e022e30751daf24c72a63
|
|
7
|
+
data.tar.gz: 4c5a19b25aea870391e9b7baddfd7088b0ae3acdbde5ac3b6217a6162ba2995d169bb97a585164bae3fae4bbadbe636ab9f7b7f27febb6542acdad113746f1ad
|
data/CHANGES.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
twilio-ruby changelog
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
|
+
[2019-03-15] Version 5.21.2
|
|
5
|
+
----------------------------
|
|
6
|
+
**Library**
|
|
7
|
+
- PR #444: Add Help Center and Support Ticket links to the README. Thanks to @childish-sambino!
|
|
8
|
+
|
|
9
|
+
**Api**
|
|
10
|
+
- Add `machine_detection_speech_threshold`, `machine_detection_speech_end_threshold`, `machine_detection_silence_timeout` optional params to Call create request
|
|
11
|
+
|
|
12
|
+
**Flex**
|
|
13
|
+
- Adding Flex Channel Orchestration
|
|
14
|
+
- Adding Flex Flow
|
|
15
|
+
|
|
16
|
+
|
|
4
17
|
[2019-03-06] Version 5.21.1
|
|
5
18
|
----------------------------
|
|
6
19
|
**Twiml**
|
data/README.md
CHANGED
|
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
|
|
|
27
27
|
To install using [Bundler][bundler] grab the latest stable version:
|
|
28
28
|
|
|
29
29
|
```ruby
|
|
30
|
-
gem 'twilio-ruby', '~> 5.21.
|
|
30
|
+
gem 'twilio-ruby', '~> 5.21.2'
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
gem install twilio-ruby -v 5.21.
|
|
36
|
+
gem install twilio-ruby -v 5.21.2
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
|
@@ -53,8 +53,11 @@ make install
|
|
|
53
53
|
## Docker Image
|
|
54
54
|
The `Dockerfile` present in this repository and its respective `twilio/twilio-ruby` Docker image are currently used by Twilio for testing purposes only.
|
|
55
55
|
|
|
56
|
-
##
|
|
57
|
-
|
|
56
|
+
## Getting help
|
|
57
|
+
|
|
58
|
+
If you need help installing or using the library, please check the [Twilio Support Help Center](https://support.twilio.com) first, and [file a support ticket](https://twilio.com/help/contact) if you don't find an answer to your question.
|
|
59
|
+
|
|
60
|
+
If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!
|
|
58
61
|
|
|
59
62
|
## Getting Started
|
|
60
63
|
|
|
@@ -120,6 +120,16 @@ module Twilio
|
|
|
120
120
|
# that made this call. Phone numbers are in [E.164
|
|
121
121
|
# format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212).
|
|
122
122
|
# SIP addresses are formatted as `name@company.com`.
|
|
123
|
+
# @param [String] machine_detection_speech_threshold The number of milliseconds
|
|
124
|
+
# that is used as the measuring stick for the length of the speech activity, where
|
|
125
|
+
# durations lower than this value will be interpreted as a human and longer than
|
|
126
|
+
# this value as a machine. Possible Values: 1000-6000. Default: 2400.
|
|
127
|
+
# @param [String] machine_detection_speech_end_threshold The number of
|
|
128
|
+
# milliseconds of silence after speech activity at which point the speech activity
|
|
129
|
+
# is considered complete. Possible Values: 500-5000. Default: 1200.
|
|
130
|
+
# @param [String] machine_detection_silence_timeout The number of milliseconds of
|
|
131
|
+
# initial silence after which an ‘unknown’ AnsweredBy result will be returned.
|
|
132
|
+
# Possible Values: 2000-10000. Default: 5000.
|
|
123
133
|
# @param [String] url The absolute URL that returns the TwiML instructions for the
|
|
124
134
|
# call. We will call this URL using the `method` when the call connects. For more
|
|
125
135
|
# information, see the [Url
|
|
@@ -128,7 +138,7 @@ module Twilio
|
|
|
128
138
|
# @param [String] application_sid The SID of the Application resource that will
|
|
129
139
|
# handle the call, if the call will be handled by an application.
|
|
130
140
|
# @return [CallInstance] Newly created CallInstance
|
|
131
|
-
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, if_machine: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, url: :unset, application_sid: :unset)
|
|
141
|
+
def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, if_machine: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, url: :unset, application_sid: :unset)
|
|
132
142
|
data = Twilio::Values.of({
|
|
133
143
|
'To' => to,
|
|
134
144
|
'From' => from,
|
|
@@ -154,6 +164,9 @@ module Twilio
|
|
|
154
164
|
'RecordingStatusCallbackEvent' => Twilio.serialize_list(recording_status_callback_event) { |e| e },
|
|
155
165
|
'Trim' => trim,
|
|
156
166
|
'CallerId' => caller_id,
|
|
167
|
+
'MachineDetectionSpeechThreshold' => machine_detection_speech_threshold,
|
|
168
|
+
'MachineDetectionSpeechEndThreshold' => machine_detection_speech_end_threshold,
|
|
169
|
+
'MachineDetectionSilenceTimeout' => machine_detection_silence_timeout,
|
|
157
170
|
})
|
|
158
171
|
|
|
159
172
|
payload = @version.create(
|
|
@@ -96,7 +96,7 @@ module Twilio
|
|
|
96
96
|
# @param [feedback.Issues] issue A list of one or more issues experienced during
|
|
97
97
|
# the call. Issues can be: `imperfect-audio`, `dropped-call`,
|
|
98
98
|
# `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`,
|
|
99
|
-
# `audio-latency`, or `one-way-audio`.
|
|
99
|
+
# `audio-latency`, `unsolicited-call`, or `one-way-audio`.
|
|
100
100
|
# @return [FeedbackInstance] Newly created FeedbackInstance
|
|
101
101
|
def create(quality_score: nil, issue: :unset)
|
|
102
102
|
data = Twilio::Values.of({
|
|
@@ -145,7 +145,8 @@ module Twilio
|
|
|
145
145
|
# call.
|
|
146
146
|
# @param [feedback.Issues] issue One or more issues experienced during the call.
|
|
147
147
|
# The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`,
|
|
148
|
-
# `post-dial-delay`, `digits-not-captured`, `audio-latency`,
|
|
148
|
+
# `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`,
|
|
149
|
+
# or `one-way-audio`.
|
|
149
150
|
# @return [FeedbackInstance] Updated FeedbackInstance
|
|
150
151
|
def update(quality_score: nil, issue: :unset)
|
|
151
152
|
data = Twilio::Values.of({
|
|
@@ -267,7 +268,7 @@ module Twilio
|
|
|
267
268
|
# @param [feedback.Issues] issue A list of one or more issues experienced during
|
|
268
269
|
# the call. Issues can be: `imperfect-audio`, `dropped-call`,
|
|
269
270
|
# `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`,
|
|
270
|
-
# `audio-latency`, or `one-way-audio`.
|
|
271
|
+
# `audio-latency`, `unsolicited-call`, or `one-way-audio`.
|
|
271
272
|
# @return [FeedbackInstance] Newly created FeedbackInstance
|
|
272
273
|
def create(quality_score: nil, issue: :unset)
|
|
273
274
|
context.create(quality_score: quality_score, issue: issue, )
|
|
@@ -287,7 +288,8 @@ module Twilio
|
|
|
287
288
|
# call.
|
|
288
289
|
# @param [feedback.Issues] issue One or more issues experienced during the call.
|
|
289
290
|
# The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`,
|
|
290
|
-
# `post-dial-delay`, `digits-not-captured`, `audio-latency`,
|
|
291
|
+
# `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`,
|
|
292
|
+
# or `one-way-audio`.
|
|
291
293
|
# @return [FeedbackInstance] Updated FeedbackInstance
|
|
292
294
|
def update(quality_score: nil, issue: :unset)
|
|
293
295
|
context.update(quality_score: quality_score, issue: issue, )
|
|
@@ -36,7 +36,7 @@ module Twilio
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
##
|
|
39
|
-
# @param [String] sid
|
|
39
|
+
# @param [String] sid The unique string that we created to identify the Credential
|
|
40
40
|
# resource.
|
|
41
41
|
# @return [Twilio::REST::Chat::V2::CredentialInstance] if sid was passed.
|
|
42
42
|
# @return [Twilio::REST::Chat::V2::CredentialList]
|
|
@@ -45,7 +45,7 @@ module Twilio
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
##
|
|
48
|
-
# @param [String] sid
|
|
48
|
+
# @param [String] sid The unique string that we created to identify the Service
|
|
49
49
|
# resource.
|
|
50
50
|
# @return [Twilio::REST::Chat::V2::ServiceInstance] if sid was passed.
|
|
51
51
|
# @return [Twilio::REST::Chat::V2::ServiceList]
|
|
@@ -20,7 +20,8 @@ module Twilio
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
##
|
|
23
|
-
# @param [String] sid The
|
|
23
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
|
24
|
+
# Credential resource to fetch.
|
|
24
25
|
# @return [Twilio::REST::Chat::V2::CredentialContext] if sid was passed.
|
|
25
26
|
# @return [Twilio::REST::Chat::V2::CredentialList]
|
|
26
27
|
def credentials(sid=:unset)
|
|
@@ -34,7 +35,8 @@ module Twilio
|
|
|
34
35
|
end
|
|
35
36
|
|
|
36
37
|
##
|
|
37
|
-
# @param [String] sid The
|
|
38
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
|
39
|
+
# Service resource to fetch.
|
|
38
40
|
# @return [Twilio::REST::Chat::V2::ServiceContext] if sid was passed.
|
|
39
41
|
# @return [Twilio::REST::Chat::V2::ServiceList]
|
|
40
42
|
def services(sid=:unset)
|
|
@@ -108,25 +108,26 @@ module Twilio
|
|
|
108
108
|
##
|
|
109
109
|
# Retrieve a single page of CredentialInstance records from the API.
|
|
110
110
|
# Request is executed immediately.
|
|
111
|
-
# @param [credential.PushService] type
|
|
112
|
-
#
|
|
113
|
-
# @param [String] friendly_name
|
|
114
|
-
#
|
|
115
|
-
#
|
|
111
|
+
# @param [credential.PushService] type The type of push-notification service the
|
|
112
|
+
# credential is for. Can be: `gcm`, `fcm`, or `apn`.
|
|
113
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
114
|
+
# the new resource. It can be up to 64 characters long.
|
|
115
|
+
# @param [String] certificate [APN only] The URL encoded representation of the
|
|
116
|
+
# certificate. For example,
|
|
116
117
|
# `-----BEGIN CERTIFICATE-----
|
|
117
118
|
# MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
|
|
118
119
|
# -----END CERTIFICATE-----`
|
|
119
|
-
# @param [String] private_key [APN only] URL encoded representation of the
|
|
120
|
-
# key,
|
|
120
|
+
# @param [String] private_key [APN only] The URL encoded representation of the
|
|
121
|
+
# private key. For example,
|
|
121
122
|
# `-----BEGIN RSA PRIVATE KEY-----
|
|
122
123
|
# MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
|
|
123
124
|
# -----END RSA PRIVATE KEY-----`
|
|
124
|
-
# @param [Boolean] sandbox [APN only]
|
|
125
|
-
#
|
|
126
|
-
# @param [String] api_key [GCM only]
|
|
127
|
-
# Developer console for your GCM Service application credential
|
|
128
|
-
# @param [String] secret [FCM only]
|
|
129
|
-
# Firebase console under Settings / Cloud messaging.
|
|
125
|
+
# @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
|
|
126
|
+
# APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
|
|
127
|
+
# @param [String] api_key [GCM only] The API key for the project that was obtained
|
|
128
|
+
# from the Google Developer console for your GCM Service application credential.
|
|
129
|
+
# @param [String] secret [FCM only] The **Server key** of your project from the
|
|
130
|
+
# Firebase console, found under Settings / Cloud messaging.
|
|
130
131
|
# @return [CredentialInstance] Newly created CredentialInstance
|
|
131
132
|
def create(type: nil, friendly_name: :unset, certificate: :unset, private_key: :unset, sandbox: :unset, api_key: :unset, secret: :unset)
|
|
132
133
|
data = Twilio::Values.of({
|
|
@@ -188,7 +189,8 @@ module Twilio
|
|
|
188
189
|
##
|
|
189
190
|
# Initialize the CredentialContext
|
|
190
191
|
# @param [Version] version Version that contains the resource
|
|
191
|
-
# @param [String] sid The
|
|
192
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
|
193
|
+
# Credential resource to fetch.
|
|
192
194
|
# @return [CredentialContext] CredentialContext
|
|
193
195
|
def initialize(version, sid)
|
|
194
196
|
super(version)
|
|
@@ -215,23 +217,24 @@ module Twilio
|
|
|
215
217
|
|
|
216
218
|
##
|
|
217
219
|
# Update the CredentialInstance
|
|
218
|
-
# @param [String] friendly_name
|
|
219
|
-
#
|
|
220
|
-
#
|
|
220
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
221
|
+
# the resource. It can be up to 64 characters long.
|
|
222
|
+
# @param [String] certificate [APN only] The URL encoded representation of the
|
|
223
|
+
# certificate. For example,
|
|
221
224
|
# `-----BEGIN CERTIFICATE-----
|
|
222
225
|
# MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
|
|
223
226
|
# -----END CERTIFICATE-----`
|
|
224
|
-
# @param [String] private_key [APN only] URL encoded representation of the
|
|
225
|
-
# key,
|
|
227
|
+
# @param [String] private_key [APN only] The URL encoded representation of the
|
|
228
|
+
# private key. For example,
|
|
226
229
|
# `-----BEGIN RSA PRIVATE KEY-----
|
|
227
230
|
# MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
|
|
228
231
|
# -----END RSA PRIVATE KEY-----`
|
|
229
|
-
# @param [Boolean] sandbox [APN only]
|
|
230
|
-
#
|
|
231
|
-
# @param [String] api_key [GCM only]
|
|
232
|
-
# Developer console for your GCM Service application credential
|
|
233
|
-
# @param [String] secret [FCM only]
|
|
234
|
-
# Firebase console under Settings / Cloud messaging.
|
|
232
|
+
# @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
|
|
233
|
+
# APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
|
|
234
|
+
# @param [String] api_key [GCM only] The API key for the project that was obtained
|
|
235
|
+
# from the Google Developer console for your GCM Service application credential.
|
|
236
|
+
# @param [String] secret [FCM only] The **Server key** of your project from the
|
|
237
|
+
# Firebase console, found under Settings / Cloud messaging.
|
|
235
238
|
# @return [CredentialInstance] Updated CredentialInstance
|
|
236
239
|
def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sandbox: :unset, api_key: :unset, secret: :unset)
|
|
237
240
|
data = Twilio::Values.of({
|
|
@@ -279,7 +282,8 @@ module Twilio
|
|
|
279
282
|
# Initialize the CredentialInstance
|
|
280
283
|
# @param [Version] version Version that contains the resource
|
|
281
284
|
# @param [Hash] payload payload that contains response from Twilio
|
|
282
|
-
# @param [String] sid The
|
|
285
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
|
286
|
+
# Credential resource to fetch.
|
|
283
287
|
# @return [CredentialInstance] CredentialInstance
|
|
284
288
|
def initialize(version, payload, sid: nil)
|
|
285
289
|
super(version)
|
|
@@ -313,49 +317,49 @@ module Twilio
|
|
|
313
317
|
end
|
|
314
318
|
|
|
315
319
|
##
|
|
316
|
-
# @return [String]
|
|
320
|
+
# @return [String] The unique string that identifies the resource
|
|
317
321
|
def sid
|
|
318
322
|
@properties['sid']
|
|
319
323
|
end
|
|
320
324
|
|
|
321
325
|
##
|
|
322
|
-
# @return [String] The
|
|
326
|
+
# @return [String] The SID of the Account that created the resource
|
|
323
327
|
def account_sid
|
|
324
328
|
@properties['account_sid']
|
|
325
329
|
end
|
|
326
330
|
|
|
327
331
|
##
|
|
328
|
-
# @return [String] The
|
|
332
|
+
# @return [String] The string that you assigned to describe the resource
|
|
329
333
|
def friendly_name
|
|
330
334
|
@properties['friendly_name']
|
|
331
335
|
end
|
|
332
336
|
|
|
333
337
|
##
|
|
334
|
-
# @return [credential.PushService]
|
|
338
|
+
# @return [credential.PushService] The type of push-notification service the credential is for
|
|
335
339
|
def type
|
|
336
340
|
@properties['type']
|
|
337
341
|
end
|
|
338
342
|
|
|
339
343
|
##
|
|
340
|
-
# @return [String] [APN only]
|
|
344
|
+
# @return [String] [APN only] Whether to send the credential to sandbox APNs
|
|
341
345
|
def sandbox
|
|
342
346
|
@properties['sandbox']
|
|
343
347
|
end
|
|
344
348
|
|
|
345
349
|
##
|
|
346
|
-
# @return [Time] The date
|
|
350
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
|
347
351
|
def date_created
|
|
348
352
|
@properties['date_created']
|
|
349
353
|
end
|
|
350
354
|
|
|
351
355
|
##
|
|
352
|
-
# @return [Time] The date
|
|
356
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
|
353
357
|
def date_updated
|
|
354
358
|
@properties['date_updated']
|
|
355
359
|
end
|
|
356
360
|
|
|
357
361
|
##
|
|
358
|
-
# @return [String]
|
|
362
|
+
# @return [String] The absolute URL of the Credential resource
|
|
359
363
|
def url
|
|
360
364
|
@properties['url']
|
|
361
365
|
end
|
|
@@ -369,23 +373,24 @@ module Twilio
|
|
|
369
373
|
|
|
370
374
|
##
|
|
371
375
|
# Update the CredentialInstance
|
|
372
|
-
# @param [String] friendly_name
|
|
373
|
-
#
|
|
374
|
-
#
|
|
376
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
377
|
+
# the resource. It can be up to 64 characters long.
|
|
378
|
+
# @param [String] certificate [APN only] The URL encoded representation of the
|
|
379
|
+
# certificate. For example,
|
|
375
380
|
# `-----BEGIN CERTIFICATE-----
|
|
376
381
|
# MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
|
|
377
382
|
# -----END CERTIFICATE-----`
|
|
378
|
-
# @param [String] private_key [APN only] URL encoded representation of the
|
|
379
|
-
# key,
|
|
383
|
+
# @param [String] private_key [APN only] The URL encoded representation of the
|
|
384
|
+
# private key. For example,
|
|
380
385
|
# `-----BEGIN RSA PRIVATE KEY-----
|
|
381
386
|
# MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
|
|
382
387
|
# -----END RSA PRIVATE KEY-----`
|
|
383
|
-
# @param [Boolean] sandbox [APN only]
|
|
384
|
-
#
|
|
385
|
-
# @param [String] api_key [GCM only]
|
|
386
|
-
# Developer console for your GCM Service application credential
|
|
387
|
-
# @param [String] secret [FCM only]
|
|
388
|
-
# Firebase console under Settings / Cloud messaging.
|
|
388
|
+
# @param [Boolean] sandbox [APN only] Whether to send the credential to sandbox
|
|
389
|
+
# APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
|
|
390
|
+
# @param [String] api_key [GCM only] The API key for the project that was obtained
|
|
391
|
+
# from the Google Developer console for your GCM Service application credential.
|
|
392
|
+
# @param [String] secret [FCM only] The **Server key** of your project from the
|
|
393
|
+
# Firebase console, found under Settings / Cloud messaging.
|
|
389
394
|
# @return [CredentialInstance] Updated CredentialInstance
|
|
390
395
|
def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sandbox: :unset, api_key: :unset, secret: :unset)
|
|
391
396
|
context.update(
|
|
@@ -26,7 +26,8 @@ module Twilio
|
|
|
26
26
|
##
|
|
27
27
|
# Retrieve a single page of ServiceInstance records from the API.
|
|
28
28
|
# Request is executed immediately.
|
|
29
|
-
# @param [String] friendly_name
|
|
29
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
30
|
+
# the new resource.
|
|
30
31
|
# @return [ServiceInstance] Newly created ServiceInstance
|
|
31
32
|
def create(friendly_name: nil)
|
|
32
33
|
data = Twilio::Values.of({'FriendlyName' => friendly_name, })
|
|
@@ -162,7 +163,8 @@ module Twilio
|
|
|
162
163
|
##
|
|
163
164
|
# Initialize the ServiceContext
|
|
164
165
|
# @param [Version] version Version that contains the resource
|
|
165
|
-
# @param [String] sid The
|
|
166
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
|
167
|
+
# Service resource to fetch.
|
|
166
168
|
# @return [ServiceContext] ServiceContext
|
|
167
169
|
def initialize(version, sid)
|
|
168
170
|
super(version)
|
|
@@ -202,71 +204,95 @@ module Twilio
|
|
|
202
204
|
|
|
203
205
|
##
|
|
204
206
|
# Update the ServiceInstance
|
|
205
|
-
# @param [String] friendly_name
|
|
206
|
-
#
|
|
207
|
-
# @param [String]
|
|
208
|
-
#
|
|
209
|
-
# details
|
|
210
|
-
# @param [String]
|
|
211
|
-
#
|
|
212
|
-
#
|
|
213
|
-
#
|
|
214
|
-
#
|
|
215
|
-
#
|
|
216
|
-
# @param [
|
|
217
|
-
#
|
|
218
|
-
#
|
|
219
|
-
# @param [
|
|
220
|
-
#
|
|
221
|
-
#
|
|
222
|
-
# @param [String]
|
|
223
|
-
#
|
|
224
|
-
#
|
|
225
|
-
#
|
|
226
|
-
#
|
|
227
|
-
#
|
|
228
|
-
#
|
|
229
|
-
#
|
|
230
|
-
# @param [String]
|
|
231
|
-
#
|
|
232
|
-
#
|
|
233
|
-
#
|
|
234
|
-
#
|
|
235
|
-
#
|
|
236
|
-
# @param [
|
|
237
|
-
#
|
|
238
|
-
# @param [
|
|
239
|
-
#
|
|
240
|
-
#
|
|
241
|
-
#
|
|
242
|
-
#
|
|
243
|
-
# notifications.
|
|
244
|
-
# @param [String]
|
|
245
|
-
#
|
|
246
|
-
#
|
|
247
|
-
#
|
|
248
|
-
#
|
|
249
|
-
#
|
|
250
|
-
#
|
|
251
|
-
#
|
|
252
|
-
#
|
|
253
|
-
#
|
|
254
|
-
#
|
|
207
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
208
|
+
# the resource.
|
|
209
|
+
# @param [String] default_service_role_sid The service role assigned to users when
|
|
210
|
+
# they are added to the service. See the [Roles
|
|
211
|
+
# endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
|
|
212
|
+
# @param [String] default_channel_role_sid The channel role assigned to users when
|
|
213
|
+
# they are added to a channel. See the [Roles
|
|
214
|
+
# endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
|
|
215
|
+
# @param [String] default_channel_creator_role_sid The channel role assigned to a
|
|
216
|
+
# channel creator when they join a new channel. See the [Roles
|
|
217
|
+
# endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
|
|
218
|
+
# @param [Boolean] read_status_enabled Whether to enable the [Message Consumption
|
|
219
|
+
# Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The
|
|
220
|
+
# default is `true`.
|
|
221
|
+
# @param [Boolean] reachability_enabled Whether to enable the [Reachability
|
|
222
|
+
# Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this
|
|
223
|
+
# Service instance. The default is `false`.
|
|
224
|
+
# @param [String] typing_indicator_timeout How long in seconds after a `started
|
|
225
|
+
# typing` event until clients should assume that user is no longer typing, even if
|
|
226
|
+
# no `ended typing` message was received. The default is 5 seconds.
|
|
227
|
+
# @param [String] consumption_report_interval DEPRECATED. The interval in seconds
|
|
228
|
+
# between consumption reports submission batches from client endpoints.
|
|
229
|
+
# @param [Boolean] notifications_new_message_enabled Whether to send a
|
|
230
|
+
# notification when a new message is added to a channel. Can be: `true` or `false`
|
|
231
|
+
# and the default is `false`.
|
|
232
|
+
# @param [String] notifications_new_message_template The template to use to create
|
|
233
|
+
# the notification text displayed when a new message is added to a channel and
|
|
234
|
+
# `notifications.new_message.enabled` is `true`.
|
|
235
|
+
# @param [String] notifications_new_message_sound The name of the sound to play
|
|
236
|
+
# when a new message is added to a channel and `notifications.new_message.enabled`
|
|
237
|
+
# is `true`.
|
|
238
|
+
# @param [Boolean] notifications_new_message_badge_count_enabled Whether the new
|
|
239
|
+
# message badge is enabled. Can be: `true` or `false` and the default is `false`.
|
|
240
|
+
# @param [Boolean] notifications_added_to_channel_enabled Whether to send a
|
|
241
|
+
# notification when a member is added to a channel. Can be: `true` or `false` and
|
|
242
|
+
# the default is `false`.
|
|
243
|
+
# @param [String] notifications_added_to_channel_template The template to use to
|
|
244
|
+
# create the notification text displayed when a member is added to a channel and
|
|
245
|
+
# `notifications.added_to_channel.enabled` is `true`.
|
|
246
|
+
# @param [String] notifications_added_to_channel_sound The name of the sound to
|
|
247
|
+
# play when a member is added to a channel and
|
|
248
|
+
# `notifications.added_to_channel.enabled` is `true`.
|
|
249
|
+
# @param [Boolean] notifications_removed_from_channel_enabled Whether to send a
|
|
250
|
+
# notification to a user when they are removed from a channel. Can be: `true` or
|
|
251
|
+
# `false` and the default is `false`.
|
|
252
|
+
# @param [String] notifications_removed_from_channel_template The template to use
|
|
253
|
+
# to create the notification text displayed to a user when they are removed from a
|
|
254
|
+
# channel and `notifications.removed_from_channel.enabled` is `true`.
|
|
255
|
+
# @param [String] notifications_removed_from_channel_sound The name of the sound
|
|
256
|
+
# to play to a user when they are removed from a channel and
|
|
257
|
+
# `notifications.removed_from_channel.enabled` is `true`.
|
|
258
|
+
# @param [Boolean] notifications_invited_to_channel_enabled Whether to send a
|
|
259
|
+
# notification when a user is invited to a channel. Can be: `true` or `false` and
|
|
260
|
+
# the default is `false`.
|
|
261
|
+
# @param [String] notifications_invited_to_channel_template The template to use to
|
|
262
|
+
# create the notification text displayed when a user is invited to a channel and
|
|
263
|
+
# `notifications.invited_to_channel.enabled` is `true`.
|
|
264
|
+
# @param [String] notifications_invited_to_channel_sound The name of the sound to
|
|
265
|
+
# play when a user is invited to a channel and
|
|
266
|
+
# `notifications.invited_to_channel.enabled` is `true`.
|
|
267
|
+
# @param [String] pre_webhook_url The URL for pre-event webhooks, which are called
|
|
268
|
+
# by using the `webhook_method`. See [Webhook
|
|
269
|
+
# Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
|
|
270
|
+
# @param [String] post_webhook_url The URL for post-event webhooks, which are
|
|
271
|
+
# called by using the `webhook_method`. See [Webhook
|
|
272
|
+
# Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
|
|
273
|
+
# @param [String] webhook_method The HTTP method to use for calls to the
|
|
274
|
+
# `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and
|
|
275
|
+
# the default is `POST`. See [Webhook
|
|
276
|
+
# Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
|
|
255
277
|
# @param [String] webhook_filters The list of WebHook events that are enabled for
|
|
256
278
|
# this Service instance. See [Webhook
|
|
257
279
|
# Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
|
|
258
280
|
# @param [String] limits_channel_members The maximum number of Members that can be
|
|
259
|
-
# added to Channels within this Service.
|
|
281
|
+
# added to Channels within this Service. Can be up to 1,000.
|
|
260
282
|
# @param [String] limits_user_channels The maximum number of Channels Users can be
|
|
261
|
-
# a Member of within this Service.
|
|
262
|
-
# @param [String] media_compatibility_message The media
|
|
263
|
-
#
|
|
264
|
-
#
|
|
265
|
-
#
|
|
266
|
-
#
|
|
267
|
-
#
|
|
268
|
-
#
|
|
269
|
-
#
|
|
283
|
+
# a Member of within this Service. Can be up to 1,000.
|
|
284
|
+
# @param [String] media_compatibility_message The message to send when a media
|
|
285
|
+
# message has no text. Can be used as placeholder message.
|
|
286
|
+
# @param [String] pre_webhook_retry_count The number of times to retry a call to
|
|
287
|
+
# the `pre_webhook_url` if the request times out (after 5 seconds) or it receives
|
|
288
|
+
# a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means
|
|
289
|
+
# the call won't be retried.
|
|
290
|
+
# @param [String] post_webhook_retry_count The number of times to retry a call to
|
|
291
|
+
# the `post_webhook_url` if the request times out (after 5 seconds) or it receives
|
|
292
|
+
# a 429, 503, or 504 HTTP response. The default is 0, which means the call won't
|
|
293
|
+
# be retried.
|
|
294
|
+
# @param [Boolean] notifications_log_enabled Whether to log notifications. Can be:
|
|
295
|
+
# `true` or `false` and the default is `false`.
|
|
270
296
|
# @return [ServiceInstance] Updated ServiceInstance
|
|
271
297
|
def update(friendly_name: :unset, default_service_role_sid: :unset, default_channel_role_sid: :unset, default_channel_creator_role_sid: :unset, read_status_enabled: :unset, reachability_enabled: :unset, typing_indicator_timeout: :unset, consumption_report_interval: :unset, notifications_new_message_enabled: :unset, notifications_new_message_template: :unset, notifications_new_message_sound: :unset, notifications_new_message_badge_count_enabled: :unset, notifications_added_to_channel_enabled: :unset, notifications_added_to_channel_template: :unset, notifications_added_to_channel_sound: :unset, notifications_removed_from_channel_enabled: :unset, notifications_removed_from_channel_template: :unset, notifications_removed_from_channel_sound: :unset, notifications_invited_to_channel_enabled: :unset, notifications_invited_to_channel_template: :unset, notifications_invited_to_channel_sound: :unset, pre_webhook_url: :unset, post_webhook_url: :unset, webhook_method: :unset, webhook_filters: :unset, limits_channel_members: :unset, limits_user_channels: :unset, media_compatibility_message: :unset, pre_webhook_retry_count: :unset, post_webhook_retry_count: :unset, notifications_log_enabled: :unset)
|
|
272
298
|
data = Twilio::Values.of({
|
|
@@ -404,7 +430,8 @@ module Twilio
|
|
|
404
430
|
# Initialize the ServiceInstance
|
|
405
431
|
# @param [Version] version Version that contains the resource
|
|
406
432
|
# @param [Hash] payload payload that contains response from Twilio
|
|
407
|
-
# @param [String] sid The
|
|
433
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
|
434
|
+
# Service resource to fetch.
|
|
408
435
|
# @return [ServiceInstance] ServiceInstance
|
|
409
436
|
def initialize(version, payload, sid: nil)
|
|
410
437
|
super(version)
|
|
@@ -453,139 +480,139 @@ module Twilio
|
|
|
453
480
|
end
|
|
454
481
|
|
|
455
482
|
##
|
|
456
|
-
# @return [String]
|
|
483
|
+
# @return [String] The unique string that identifies the resource
|
|
457
484
|
def sid
|
|
458
485
|
@properties['sid']
|
|
459
486
|
end
|
|
460
487
|
|
|
461
488
|
##
|
|
462
|
-
# @return [String] The
|
|
489
|
+
# @return [String] The SID of the Account that created the resource
|
|
463
490
|
def account_sid
|
|
464
491
|
@properties['account_sid']
|
|
465
492
|
end
|
|
466
493
|
|
|
467
494
|
##
|
|
468
|
-
# @return [String] The
|
|
495
|
+
# @return [String] The string that you assigned to describe the resource
|
|
469
496
|
def friendly_name
|
|
470
497
|
@properties['friendly_name']
|
|
471
498
|
end
|
|
472
499
|
|
|
473
500
|
##
|
|
474
|
-
# @return [Time] The date
|
|
501
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
|
475
502
|
def date_created
|
|
476
503
|
@properties['date_created']
|
|
477
504
|
end
|
|
478
505
|
|
|
479
506
|
##
|
|
480
|
-
# @return [Time] The date
|
|
507
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
|
481
508
|
def date_updated
|
|
482
509
|
@properties['date_updated']
|
|
483
510
|
end
|
|
484
511
|
|
|
485
512
|
##
|
|
486
|
-
# @return [String] The service role assigned to users when they are added to the service
|
|
513
|
+
# @return [String] The service role assigned to users when they are added to the service
|
|
487
514
|
def default_service_role_sid
|
|
488
515
|
@properties['default_service_role_sid']
|
|
489
516
|
end
|
|
490
517
|
|
|
491
518
|
##
|
|
492
|
-
# @return [String] The channel role assigned to users when they are added to a channel
|
|
519
|
+
# @return [String] The channel role assigned to users when they are added to a channel
|
|
493
520
|
def default_channel_role_sid
|
|
494
521
|
@properties['default_channel_role_sid']
|
|
495
522
|
end
|
|
496
523
|
|
|
497
524
|
##
|
|
498
|
-
# @return [String] The channel role assigned to a channel creator when
|
|
525
|
+
# @return [String] The channel role assigned to a channel creator when they join a new channel
|
|
499
526
|
def default_channel_creator_role_sid
|
|
500
527
|
@properties['default_channel_creator_role_sid']
|
|
501
528
|
end
|
|
502
529
|
|
|
503
530
|
##
|
|
504
|
-
# @return [Boolean]
|
|
531
|
+
# @return [Boolean] Whether the Message Consumption Horizon feature is enabled
|
|
505
532
|
def read_status_enabled
|
|
506
533
|
@properties['read_status_enabled']
|
|
507
534
|
end
|
|
508
535
|
|
|
509
536
|
##
|
|
510
|
-
# @return [Boolean]
|
|
537
|
+
# @return [Boolean] Whether the Reachability Indicator feature is enabled for this Service instance
|
|
511
538
|
def reachability_enabled
|
|
512
539
|
@properties['reachability_enabled']
|
|
513
540
|
end
|
|
514
541
|
|
|
515
542
|
##
|
|
516
|
-
# @return [String]
|
|
543
|
+
# @return [String] How long in seconds to wait before assuming the user is no longer typing
|
|
517
544
|
def typing_indicator_timeout
|
|
518
545
|
@properties['typing_indicator_timeout']
|
|
519
546
|
end
|
|
520
547
|
|
|
521
548
|
##
|
|
522
|
-
# @return [String] DEPRECATED
|
|
549
|
+
# @return [String] DEPRECATED
|
|
523
550
|
def consumption_report_interval
|
|
524
551
|
@properties['consumption_report_interval']
|
|
525
552
|
end
|
|
526
553
|
|
|
527
554
|
##
|
|
528
|
-
# @return [Hash]
|
|
555
|
+
# @return [Hash] An object that describes the limits of the service instance
|
|
529
556
|
def limits
|
|
530
557
|
@properties['limits']
|
|
531
558
|
end
|
|
532
559
|
|
|
533
560
|
##
|
|
534
|
-
# @return [String] The webhook URL for
|
|
561
|
+
# @return [String] The webhook URL for pre-event webhooks
|
|
535
562
|
def pre_webhook_url
|
|
536
563
|
@properties['pre_webhook_url']
|
|
537
564
|
end
|
|
538
565
|
|
|
539
566
|
##
|
|
540
|
-
# @return [String] The
|
|
567
|
+
# @return [String] The URL for post-event webhooks
|
|
541
568
|
def post_webhook_url
|
|
542
569
|
@properties['post_webhook_url']
|
|
543
570
|
end
|
|
544
571
|
|
|
545
572
|
##
|
|
546
|
-
# @return [String] The
|
|
573
|
+
# @return [String] The HTTP method to use for both PRE and POST webhooks
|
|
547
574
|
def webhook_method
|
|
548
575
|
@properties['webhook_method']
|
|
549
576
|
end
|
|
550
577
|
|
|
551
578
|
##
|
|
552
|
-
# @return [String] The list of WebHook events that are enabled for this Service instance
|
|
579
|
+
# @return [String] The list of WebHook events that are enabled for this Service instance
|
|
553
580
|
def webhook_filters
|
|
554
581
|
@properties['webhook_filters']
|
|
555
582
|
end
|
|
556
583
|
|
|
557
584
|
##
|
|
558
|
-
# @return [String] Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses
|
|
585
|
+
# @return [String] Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses
|
|
559
586
|
def pre_webhook_retry_count
|
|
560
587
|
@properties['pre_webhook_retry_count']
|
|
561
588
|
end
|
|
562
589
|
|
|
563
590
|
##
|
|
564
|
-
# @return [String]
|
|
591
|
+
# @return [String] The number of times calls to the `post_webhook_url` will be retried
|
|
565
592
|
def post_webhook_retry_count
|
|
566
593
|
@properties['post_webhook_retry_count']
|
|
567
594
|
end
|
|
568
595
|
|
|
569
596
|
##
|
|
570
|
-
# @return [Hash]
|
|
597
|
+
# @return [Hash] The notification configuration for the Service instance
|
|
571
598
|
def notifications
|
|
572
599
|
@properties['notifications']
|
|
573
600
|
end
|
|
574
601
|
|
|
575
602
|
##
|
|
576
|
-
# @return [Hash] The media
|
|
603
|
+
# @return [Hash] The properties of the media that the service supports
|
|
577
604
|
def media
|
|
578
605
|
@properties['media']
|
|
579
606
|
end
|
|
580
607
|
|
|
581
608
|
##
|
|
582
|
-
# @return [String]
|
|
609
|
+
# @return [String] The absolute URL of the Service resource
|
|
583
610
|
def url
|
|
584
611
|
@properties['url']
|
|
585
612
|
end
|
|
586
613
|
|
|
587
614
|
##
|
|
588
|
-
# @return [String] URLs
|
|
615
|
+
# @return [String] The absolute URLs of the Service's Channels, Roles, and Users
|
|
589
616
|
def links
|
|
590
617
|
@properties['links']
|
|
591
618
|
end
|
|
@@ -606,71 +633,95 @@ module Twilio
|
|
|
606
633
|
|
|
607
634
|
##
|
|
608
635
|
# Update the ServiceInstance
|
|
609
|
-
# @param [String] friendly_name
|
|
610
|
-
#
|
|
611
|
-
# @param [String]
|
|
612
|
-
#
|
|
613
|
-
# details
|
|
614
|
-
# @param [String]
|
|
615
|
-
#
|
|
616
|
-
#
|
|
617
|
-
#
|
|
618
|
-
#
|
|
619
|
-
#
|
|
620
|
-
# @param [
|
|
621
|
-
#
|
|
622
|
-
#
|
|
623
|
-
# @param [
|
|
624
|
-
#
|
|
625
|
-
#
|
|
626
|
-
# @param [String]
|
|
627
|
-
#
|
|
628
|
-
#
|
|
629
|
-
#
|
|
630
|
-
#
|
|
631
|
-
#
|
|
632
|
-
#
|
|
633
|
-
#
|
|
634
|
-
# @param [String]
|
|
635
|
-
#
|
|
636
|
-
#
|
|
637
|
-
#
|
|
638
|
-
#
|
|
639
|
-
#
|
|
640
|
-
# @param [
|
|
641
|
-
#
|
|
642
|
-
# @param [
|
|
643
|
-
#
|
|
644
|
-
#
|
|
645
|
-
#
|
|
646
|
-
#
|
|
647
|
-
# notifications.
|
|
648
|
-
# @param [String]
|
|
649
|
-
#
|
|
650
|
-
#
|
|
651
|
-
#
|
|
652
|
-
#
|
|
653
|
-
#
|
|
654
|
-
#
|
|
655
|
-
#
|
|
656
|
-
#
|
|
657
|
-
#
|
|
658
|
-
#
|
|
636
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
|
637
|
+
# the resource.
|
|
638
|
+
# @param [String] default_service_role_sid The service role assigned to users when
|
|
639
|
+
# they are added to the service. See the [Roles
|
|
640
|
+
# endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
|
|
641
|
+
# @param [String] default_channel_role_sid The channel role assigned to users when
|
|
642
|
+
# they are added to a channel. See the [Roles
|
|
643
|
+
# endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
|
|
644
|
+
# @param [String] default_channel_creator_role_sid The channel role assigned to a
|
|
645
|
+
# channel creator when they join a new channel. See the [Roles
|
|
646
|
+
# endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
|
|
647
|
+
# @param [Boolean] read_status_enabled Whether to enable the [Message Consumption
|
|
648
|
+
# Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The
|
|
649
|
+
# default is `true`.
|
|
650
|
+
# @param [Boolean] reachability_enabled Whether to enable the [Reachability
|
|
651
|
+
# Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this
|
|
652
|
+
# Service instance. The default is `false`.
|
|
653
|
+
# @param [String] typing_indicator_timeout How long in seconds after a `started
|
|
654
|
+
# typing` event until clients should assume that user is no longer typing, even if
|
|
655
|
+
# no `ended typing` message was received. The default is 5 seconds.
|
|
656
|
+
# @param [String] consumption_report_interval DEPRECATED. The interval in seconds
|
|
657
|
+
# between consumption reports submission batches from client endpoints.
|
|
658
|
+
# @param [Boolean] notifications_new_message_enabled Whether to send a
|
|
659
|
+
# notification when a new message is added to a channel. Can be: `true` or `false`
|
|
660
|
+
# and the default is `false`.
|
|
661
|
+
# @param [String] notifications_new_message_template The template to use to create
|
|
662
|
+
# the notification text displayed when a new message is added to a channel and
|
|
663
|
+
# `notifications.new_message.enabled` is `true`.
|
|
664
|
+
# @param [String] notifications_new_message_sound The name of the sound to play
|
|
665
|
+
# when a new message is added to a channel and `notifications.new_message.enabled`
|
|
666
|
+
# is `true`.
|
|
667
|
+
# @param [Boolean] notifications_new_message_badge_count_enabled Whether the new
|
|
668
|
+
# message badge is enabled. Can be: `true` or `false` and the default is `false`.
|
|
669
|
+
# @param [Boolean] notifications_added_to_channel_enabled Whether to send a
|
|
670
|
+
# notification when a member is added to a channel. Can be: `true` or `false` and
|
|
671
|
+
# the default is `false`.
|
|
672
|
+
# @param [String] notifications_added_to_channel_template The template to use to
|
|
673
|
+
# create the notification text displayed when a member is added to a channel and
|
|
674
|
+
# `notifications.added_to_channel.enabled` is `true`.
|
|
675
|
+
# @param [String] notifications_added_to_channel_sound The name of the sound to
|
|
676
|
+
# play when a member is added to a channel and
|
|
677
|
+
# `notifications.added_to_channel.enabled` is `true`.
|
|
678
|
+
# @param [Boolean] notifications_removed_from_channel_enabled Whether to send a
|
|
679
|
+
# notification to a user when they are removed from a channel. Can be: `true` or
|
|
680
|
+
# `false` and the default is `false`.
|
|
681
|
+
# @param [String] notifications_removed_from_channel_template The template to use
|
|
682
|
+
# to create the notification text displayed to a user when they are removed from a
|
|
683
|
+
# channel and `notifications.removed_from_channel.enabled` is `true`.
|
|
684
|
+
# @param [String] notifications_removed_from_channel_sound The name of the sound
|
|
685
|
+
# to play to a user when they are removed from a channel and
|
|
686
|
+
# `notifications.removed_from_channel.enabled` is `true`.
|
|
687
|
+
# @param [Boolean] notifications_invited_to_channel_enabled Whether to send a
|
|
688
|
+
# notification when a user is invited to a channel. Can be: `true` or `false` and
|
|
689
|
+
# the default is `false`.
|
|
690
|
+
# @param [String] notifications_invited_to_channel_template The template to use to
|
|
691
|
+
# create the notification text displayed when a user is invited to a channel and
|
|
692
|
+
# `notifications.invited_to_channel.enabled` is `true`.
|
|
693
|
+
# @param [String] notifications_invited_to_channel_sound The name of the sound to
|
|
694
|
+
# play when a user is invited to a channel and
|
|
695
|
+
# `notifications.invited_to_channel.enabled` is `true`.
|
|
696
|
+
# @param [String] pre_webhook_url The URL for pre-event webhooks, which are called
|
|
697
|
+
# by using the `webhook_method`. See [Webhook
|
|
698
|
+
# Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
|
|
699
|
+
# @param [String] post_webhook_url The URL for post-event webhooks, which are
|
|
700
|
+
# called by using the `webhook_method`. See [Webhook
|
|
701
|
+
# Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
|
|
702
|
+
# @param [String] webhook_method The HTTP method to use for calls to the
|
|
703
|
+
# `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and
|
|
704
|
+
# the default is `POST`. See [Webhook
|
|
705
|
+
# Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
|
|
659
706
|
# @param [String] webhook_filters The list of WebHook events that are enabled for
|
|
660
707
|
# this Service instance. See [Webhook
|
|
661
708
|
# Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
|
|
662
709
|
# @param [String] limits_channel_members The maximum number of Members that can be
|
|
663
|
-
# added to Channels within this Service.
|
|
710
|
+
# added to Channels within this Service. Can be up to 1,000.
|
|
664
711
|
# @param [String] limits_user_channels The maximum number of Channels Users can be
|
|
665
|
-
# a Member of within this Service.
|
|
666
|
-
# @param [String] media_compatibility_message The media
|
|
667
|
-
#
|
|
668
|
-
#
|
|
669
|
-
#
|
|
670
|
-
#
|
|
671
|
-
#
|
|
672
|
-
#
|
|
673
|
-
#
|
|
712
|
+
# a Member of within this Service. Can be up to 1,000.
|
|
713
|
+
# @param [String] media_compatibility_message The message to send when a media
|
|
714
|
+
# message has no text. Can be used as placeholder message.
|
|
715
|
+
# @param [String] pre_webhook_retry_count The number of times to retry a call to
|
|
716
|
+
# the `pre_webhook_url` if the request times out (after 5 seconds) or it receives
|
|
717
|
+
# a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means
|
|
718
|
+
# the call won't be retried.
|
|
719
|
+
# @param [String] post_webhook_retry_count The number of times to retry a call to
|
|
720
|
+
# the `post_webhook_url` if the request times out (after 5 seconds) or it receives
|
|
721
|
+
# a 429, 503, or 504 HTTP response. The default is 0, which means the call won't
|
|
722
|
+
# be retried.
|
|
723
|
+
# @param [Boolean] notifications_log_enabled Whether to log notifications. Can be:
|
|
724
|
+
# `true` or `false` and the default is `false`.
|
|
674
725
|
# @return [ServiceInstance] Updated ServiceInstance
|
|
675
726
|
def update(friendly_name: :unset, default_service_role_sid: :unset, default_channel_role_sid: :unset, default_channel_creator_role_sid: :unset, read_status_enabled: :unset, reachability_enabled: :unset, typing_indicator_timeout: :unset, consumption_report_interval: :unset, notifications_new_message_enabled: :unset, notifications_new_message_template: :unset, notifications_new_message_sound: :unset, notifications_new_message_badge_count_enabled: :unset, notifications_added_to_channel_enabled: :unset, notifications_added_to_channel_template: :unset, notifications_added_to_channel_sound: :unset, notifications_removed_from_channel_enabled: :unset, notifications_removed_from_channel_template: :unset, notifications_removed_from_channel_sound: :unset, notifications_invited_to_channel_enabled: :unset, notifications_invited_to_channel_template: :unset, notifications_invited_to_channel_sound: :unset, pre_webhook_url: :unset, post_webhook_url: :unset, webhook_method: :unset, webhook_filters: :unset, limits_channel_members: :unset, limits_user_channels: :unset, media_compatibility_message: :unset, pre_webhook_retry_count: :unset, post_webhook_retry_count: :unset, notifications_log_enabled: :unset)
|
|
676
727
|
context.update(
|