twilio-ruby 5.63.0 → 5.63.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 582f6e6561bd6ee40a9aadaefc0e2550df5d565f
4
- data.tar.gz: 8ec0f4c692bd66e1da3a7ea99d58f4ddaa8b6d0c
3
+ metadata.gz: 713fb3456ac1cc81c84708c98ab9182982c87e9e
4
+ data.tar.gz: 19b87b511ac9133faca93426a3ba61faadfbd7d3
5
5
  SHA512:
6
- metadata.gz: 5864ca88585ee5e2f4952218d1c85180caac3e0b0c4361836e8cc850c2e1fc716f20d0fcd931df29e03e05e54ad4c5bb9c93d46eda5e6e94f8d3aee5a6aa0e64
7
- data.tar.gz: 26560b4c09aa1161baac7ba7ac3c83bebe154b4a923e71e550e03742614c1d51e4ef086b747e83645c27f2092eb05a8c811f23f0f7636f0b8f6e191407513fa0
6
+ metadata.gz: '08a2bb565a77837293ad33f4d80c6a2ba1b7f6d853097ce420576aab813651e84887244f8618e79a638e33c8a52d97c5450028bf1be9de1d08a62777e521d923'
7
+ data.tar.gz: 34bc361cb1f619c6cad3d89bfe6022518c72dd73ba2f7a17884784a317520adc1e0c0adccba6dab264da3d747ccedd1b5beec0e3ddf46911a7696c711535e5c0
@@ -18,10 +18,11 @@ jobs:
18
18
  strategy:
19
19
  matrix:
20
20
  ruby: [ 2.4, 2.5, 2.6, 2.7, '3.0', ruby-head, jruby-9.2 ]
21
- continue-on-error: ${{ matrix.ruby == 'ruby-head' }}
22
21
  steps:
23
22
  - name: Checkout twilio-ruby
24
23
  uses: actions/checkout@v2
24
+ with:
25
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
25
26
 
26
27
  - name: Set up Ruby
27
28
  uses: ruby/setup-ruby@v1
@@ -29,11 +30,34 @@ jobs:
29
30
  ruby-version: ${{ matrix.ruby }}
30
31
  bundler-cache: true
31
32
 
33
+ # Excludes incompatible versions of ruby
34
+ - name: Set up linter
35
+ run: bundle add rubocop --version "~> 1.24.1" --group "development" --skip-install
36
+ if: ${{ matrix.ruby != '2.4' }}
37
+
32
38
  - run: bundle install --with development
33
39
  - run: bundle exec rake install
40
+
41
+ - name: Run linter
42
+ run: bundle exec rubocop -d --cache true --parallel
43
+ if: ${{ matrix.ruby != '2.4' }}
44
+
34
45
  - name: Run Unit Tests
35
46
  run: make test
36
47
 
48
+ - name: Fix code coverage paths
49
+ if: ${{ (github.event_name == 'pull_request' || github.ref_type == 'branch') && matrix.ruby == '3.0' && !github.event.pull_request.head.repo.fork }}
50
+ working-directory: ./coverage
51
+ run: |
52
+ sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.json
53
+
54
+ - name: SonarCloud Scan
55
+ if: ${{ (github.event_name == 'pull_request' || github.ref_type == 'branch') && matrix.ruby == '3.0' && !github.event.pull_request.head.repo.fork }}
56
+ uses: SonarSource/sonarcloud-github-action@master
57
+ env:
58
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
59
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
60
+
37
61
  deploy:
38
62
  name: Deploy
39
63
  if: success() && github.ref_type == 'tag'
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.4
4
+ TargetRubyVersion: 2.5
5
5
  Exclude:
6
6
  - 'lib/twilio-ruby/rest/**/*'
7
7
  - 'spec/integration/**/*'
data/.rubocop_todo.yml CHANGED
@@ -1,14 +1,14 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-04-29 14:57:47 -0500 using RuboCop version 0.82.0.
3
+ # on 2022-01-13 21:45:15 UTC using RuboCop version 1.24.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 1
9
+ # Offense count: 2
10
10
  # Cop supports --auto-correct.
11
- # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
12
  # Include: **/*.gemspec
13
13
  Gemspec/OrderedDependencies:
14
14
  Exclude:
@@ -28,13 +28,6 @@ Layout/EmptyLineAfterGuardClause:
28
28
  - 'lib/rack/twilio_webhook_authentication.rb'
29
29
  - 'lib/twilio-ruby/framework/serialize.rb'
30
30
 
31
- # Offense count: 1
32
- # Cop supports --auto-correct.
33
- # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
34
- Layout/ExtraSpacing:
35
- Exclude:
36
- - 'twilio-ruby.gemspec'
37
-
38
31
  # Offense count: 2
39
32
  # Cop supports --auto-correct.
40
33
  # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
@@ -53,6 +46,24 @@ Layout/SpaceInsideHashLiteralBraces:
53
46
  - 'spec/jwt/access_token_spec.rb'
54
47
  - 'spec/jwt/client_capability_spec.rb'
55
48
 
49
+ # Offense count: 3
50
+ # Configuration parameters: AllowedMethods.
51
+ # AllowedMethods: enums
52
+ Lint/ConstantDefinitionInBlock:
53
+ Exclude:
54
+ - 'spec/jwt/client_capability_spec.rb'
55
+ - 'spec/rest/client_spec.rb'
56
+
57
+ # Offense count: 1
58
+ Lint/MissingSuper:
59
+ Exclude:
60
+ - 'lib/twilio-ruby/framework/rest/error.rb'
61
+
62
+ # Offense count: 1
63
+ Lint/SelfAssignment:
64
+ Exclude:
65
+ - 'lib/twilio-ruby/framework/rest/version.rb'
66
+
56
67
  # Offense count: 1
57
68
  # Cop supports --auto-correct.
58
69
  # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
@@ -70,6 +81,7 @@ Lint/UnusedMethodArgument:
70
81
  - 'spec/holodeck/holodeck.rb'
71
82
 
72
83
  # Offense count: 1
84
+ # Cop supports --auto-correct.
73
85
  # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
74
86
  Lint/UselessAccessModifier:
75
87
  Exclude:
@@ -80,8 +92,14 @@ Lint/UselessAssignment:
80
92
  Exclude:
81
93
  - 'spec/rack/twilio_webhook_authentication_spec.rb'
82
94
 
95
+ # Offense count: 6
96
+ # Configuration parameters: Max, CountKeywordArgs.
97
+ Metrics/ParameterLists:
98
+ MaxOptionalParameters: 6
99
+
83
100
  # Offense count: 1
84
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
101
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
102
+ # CheckDefinitionPathHierarchyRoots: lib, spec, test, src
85
103
  # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
86
104
  Naming/FileName:
87
105
  Exclude:
@@ -89,20 +107,28 @@ Naming/FileName:
89
107
 
90
108
  # Offense count: 2
91
109
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
92
- # AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
110
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
93
111
  Naming/MethodParameterName:
94
112
  Exclude:
95
113
  - 'lib/twilio-ruby/security/request_validator.rb'
96
114
 
97
115
  # Offense count: 19
98
- # Configuration parameters: EnforcedStyle.
116
+ # Configuration parameters: EnforcedStyle, AllowedIdentifiers.
99
117
  # SupportedStyles: snake_case, camelCase
100
118
  Naming/VariableName:
101
119
  Exclude:
102
120
  - 'spec/jwt/client_capability_spec.rb'
103
121
  - 'spec/jwt/task_router_spec.rb'
104
122
 
105
- # Offense count: 39
123
+ # Offense count: 3
124
+ # Cop supports --auto-correct.
125
+ Style/CaseLikeIf:
126
+ Exclude:
127
+ - 'lib/twilio-ruby/framework/serialize.rb'
128
+ - 'lib/twilio-ruby/jwt/task_router.rb'
129
+
130
+ # Offense count: 40
131
+ # Configuration parameters: AllowedConstants.
106
132
  Style/Documentation:
107
133
  Enabled: false
108
134
 
@@ -119,28 +145,36 @@ Style/ExpandPathArguments:
119
145
  - 'spec/spec_helper.rb'
120
146
  - 'twilio-ruby.gemspec'
121
147
 
122
- # Offense count: 23
148
+ # Offense count: 24
123
149
  # Cop supports --auto-correct.
124
150
  # Configuration parameters: EnforcedStyle.
125
151
  # SupportedStyles: always, always_true, never
126
152
  Style/FrozenStringLiteralComment:
127
153
  Enabled: false
128
154
 
155
+ # Offense count: 1
156
+ # Cop supports --auto-correct.
157
+ Style/GlobalStdStream:
158
+ Exclude:
159
+ - 'spec/rest/client_spec.rb'
160
+
129
161
  # Offense count: 3
130
162
  # Configuration parameters: MinBodyLength.
131
163
  Style/GuardClause:
132
164
  Exclude:
133
165
  - 'lib/twilio-ruby/framework/rest/page.rb'
134
166
 
135
- # Offense count: 1
167
+ # Offense count: 2
136
168
  # Cop supports --auto-correct.
137
- # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
169
+ # Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
138
170
  # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
171
+ # SupportedShorthandSyntax: always, never
139
172
  Style/HashSyntax:
140
173
  Exclude:
174
+ - 'Gemfile'
141
175
  - 'spec/jwt/access_token_spec.rb'
142
176
 
143
- # Offense count: 12
177
+ # Offense count: 13
144
178
  # Cop supports --auto-correct.
145
179
  Style/IfUnlessModifier:
146
180
  Exclude:
@@ -150,6 +184,20 @@ Style/IfUnlessModifier:
150
184
  - 'lib/twilio-ruby/jwt/client_capability.rb'
151
185
  - 'lib/twilio-ruby/jwt/jwt.rb'
152
186
 
187
+ # Offense count: 3
188
+ # Cop supports --auto-correct.
189
+ Style/RedundantAssignment:
190
+ Exclude:
191
+ - 'lib/twilio-ruby/jwt/access_token.rb'
192
+ - 'lib/twilio-ruby/jwt/client_capability.rb'
193
+ - 'lib/twilio-ruby/jwt/task_router.rb'
194
+
195
+ # Offense count: 2
196
+ # Cop supports --auto-correct.
197
+ Style/RedundantFileExtensionInRequire:
198
+ Exclude:
199
+ - 'spec/spec_helper.rb'
200
+
153
201
  # Offense count: 4
154
202
  # Cop supports --auto-correct.
155
203
  Style/RedundantFreeze:
@@ -173,15 +221,30 @@ Style/RegexpLiteral:
173
221
  - 'lib/twilio-ruby/framework/rest/version.rb'
174
222
  - 'spec/rack/twilio_webhook_authentication_spec.rb'
175
223
 
176
- # Offense count: 5
224
+ # Offense count: 12
225
+ # Cop supports --auto-correct.
226
+ # Configuration parameters: Mode.
227
+ Style/StringConcatenation:
228
+ Exclude:
229
+ - 'examples/print_call_log.rb'
230
+ - 'lib/twilio-ruby/framework/request.rb'
231
+ - 'lib/twilio-ruby/framework/rest/error.rb'
232
+ - 'lib/twilio-ruby/framework/serialize.rb'
233
+ - 'lib/twilio-ruby/http/http_client.rb'
234
+ - 'lib/twilio-ruby/jwt/client_capability.rb'
235
+ - 'spec/framework/request_spec.rb'
236
+ - 'spec/spec_helper.rb'
237
+
238
+ # Offense count: 7
177
239
  # Cop supports --auto-correct.
178
240
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
179
241
  # SupportedStyles: single_quotes, double_quotes
180
242
  Style/StringLiterals:
181
243
  Exclude:
244
+ - 'Gemfile'
182
245
  - 'spec/framework/serialize_spec.rb'
183
246
 
184
- # Offense count: 14
247
+ # Offense count: 15
185
248
  # Cop supports --auto-correct.
186
249
  # Configuration parameters: AllowNamedUnderscoreVariables.
187
250
  Style/TrailingUnderscoreVariable:
@@ -190,7 +253,7 @@ Style/TrailingUnderscoreVariable:
190
253
  - 'spec/jwt/client_capability_spec.rb'
191
254
  - 'spec/jwt/task_router_spec.rb'
192
255
 
193
- # Offense count: 15
256
+ # Offense count: 16
194
257
  # Cop supports --auto-correct.
195
258
  # Configuration parameters: MinSize, WordRegex.
196
259
  # SupportedStyles: percent, brackets
data/CHANGES.md CHANGED
@@ -1,6 +1,27 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2022-01-26] Version 5.63.1
5
+ ---------------------------
6
+ **Library - Fix**
7
+ - [PR #590](https://github.com/twilio/twilio-ruby/pull/590): Validate signatures in Rack middleware for non-form-data payloads. Thanks to [@gabrielg](https://github.com/gabrielg)!
8
+
9
+ **Library - Chore**
10
+ - [PR #589](https://github.com/twilio/twilio-ruby/pull/589): Add sonarcloud analysis. Thanks to [@BrimmingDev](https://github.com/BrimmingDev)!
11
+ - [PR #588](https://github.com/twilio/twilio-ruby/pull/588): support for rubocop linting on ruby-head. Thanks to [@Hunga1](https://github.com/Hunga1)!
12
+
13
+ **Insights**
14
+ - Added new endpoint to fetch Conference Participant Summary
15
+ - Added new endpoint to fetch Conference Summary
16
+
17
+ **Messaging**
18
+ - Add government_entity parameter to brand apis
19
+
20
+ **Verify**
21
+ - Add Access Token fetch endpoint to retrieve a previously created token.
22
+ - Add Access Token payload to the Access Token creation endpoint, including a unique Sid, so it's addressable while it's TTL is valid.
23
+
24
+
4
25
  [2022-01-12] Version 5.63.0
5
26
  ---------------------------
6
27
  **Library - Feature**
data/Makefile CHANGED
@@ -6,12 +6,9 @@ githooks:
6
6
  install:
7
7
  bundle install --with development; bundle exec rake install
8
8
 
9
- test: lint
9
+ test:
10
10
  bundle exec rake spec
11
11
 
12
- lint:
13
- bundle exec rubocop -d --cache true --parallel
14
-
15
12
  docs:
16
13
  bundle exec yard doc --output-dir ./doc
17
14
 
data/README.md CHANGED
@@ -35,13 +35,13 @@ This library supports the following Ruby implementations:
35
35
  To install using [Bundler][bundler] grab the latest stable version:
36
36
 
37
37
  ```ruby
38
- gem 'twilio-ruby', '~> 5.63.0'
38
+ gem 'twilio-ruby', '~> 5.63.1'
39
39
  ```
40
40
 
41
41
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
42
42
 
43
43
  ```bash
44
- gem install twilio-ruby -v 5.63.0
44
+ gem install twilio-ruby -v 5.63.1
45
45
  ```
46
46
 
47
47
  To build and install the development branch yourself from the latest source:
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'rack/media_type'
4
+
3
5
  module Rack
4
6
  # Middleware that authenticates webhooks from Twilio using the request
5
7
  # validator.
@@ -19,6 +21,10 @@ module Rack
19
21
  # doesn't validate then the middleware responds immediately with a 403 status.
20
22
 
21
23
  class TwilioWebhookAuthentication
24
+ # Rack's FORM_DATA_MEDIA_TYPES can be modified to taste, so we're slightly
25
+ # more conservative in what we consider form data.
26
+ FORM_URLENCODED_MEDIA_TYPE = Rack::MediaType.type('application/x-www-form-urlencoded')
27
+
22
28
  def initialize(app, auth_token, *paths, &auth_token_lookup)
23
29
  @app = app
24
30
  @auth_token = auth_token
@@ -30,7 +36,7 @@ module Rack
30
36
  return @app.call(env) unless env['PATH_INFO'].match(@path_regex)
31
37
  request = Rack::Request.new(env)
32
38
  original_url = request.url
33
- params = request.post? ? request.POST : {}
39
+ params = extract_params!(request)
34
40
  auth_token = @auth_token || get_auth_token(params['AccountSid'])
35
41
  validator = Twilio::Security::RequestValidator.new(auth_token)
36
42
  signature = env['HTTP_X_TWILIO_SIGNATURE'] || ''
@@ -44,5 +50,23 @@ module Rack
44
50
  ]
45
51
  end
46
52
  end
53
+
54
+ # Extract the params from the the request that we can use to determine the
55
+ # signature. This _may_ modify the passed in request since it may read/rewind
56
+ # the body.
57
+ def extract_params!(request)
58
+ return {} unless request.post?
59
+
60
+ if request.media_type == FORM_URLENCODED_MEDIA_TYPE
61
+ request.POST
62
+ else
63
+ request.body.rewind
64
+ body = request.body.read
65
+ request.body.rewind
66
+ body
67
+ end
68
+ end
69
+
70
+ private :extract_params!
47
71
  end
48
72
  end
@@ -115,8 +115,13 @@ module Twilio
115
115
  # @param [String] friendly_name A descriptive string that you create to describe
116
116
  # the Flex Flow resource.
117
117
  # @param [String] chat_service_sid The SID of the chat service.
118
- # @param [flex_flow.ChannelType] channel_type The channel type. Can be: `web`,
119
- # `facebook`, `sms`, `whatsapp`, `line` or `custom`.
118
+ # @param [flex_flow.ChannelType] channel_type The channel type. One of `web`,
119
+ # `facebook`, `sms`, `whatsapp`, `line` or `custom`. By default, Studio’s Send to
120
+ # Flex widget passes it on to the Task attributes for Tasks created based on this
121
+ # Flex Flow. The Task attributes will be used by the Flex UI to render the
122
+ # respective Task as appropriate (applying channel-specific design and length
123
+ # limits). If `channelType` is `facebook`, `whatsapp` or `line`, the Send to Flex
124
+ # widget should set the Task Channel to Programmable Chat.
120
125
  # @param [String] contact_identity The channel contact's Identity.
121
126
  # @param [Boolean] enabled Whether the new Flex Flow is enabled.
122
127
  # @param [flex_flow.IntegrationType] integration_type The software that will
@@ -151,10 +156,10 @@ module Twilio
151
156
  # @param [Boolean] janitor_enabled When enabled, the Messaging Channel Janitor
152
157
  # will remove active Proxy sessions if the associated Task is deleted outside of
153
158
  # the Flex UI. Defaults to `false`.
154
- # @param [String] integration_retry_count The number of times to retry the webhook
155
- # if the first attempt fails. Can be an integer between 0 and 3 (inclusive),
156
- # default is 3. Optional when `integrationType` is `external`, not applicable
157
- # otherwise.
159
+ # @param [String] integration_retry_count The number of times to retry the Studio
160
+ # Flow or webhook in case of failure. Takes integer values from 0 to 3 with the
161
+ # default being 3. Optional when `integrationType` is `studio` or `external`, not
162
+ # applicable otherwise.
158
163
  # @return [FlexFlowInstance] Created FlexFlowInstance
159
164
  def create(friendly_name: nil, chat_service_sid: nil, channel_type: nil, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
160
165
  data = Twilio::Values.of({
@@ -246,8 +251,13 @@ module Twilio
246
251
  # @param [String] friendly_name A descriptive string that you create to describe
247
252
  # the Flex Flow resource.
248
253
  # @param [String] chat_service_sid The SID of the chat service.
249
- # @param [flex_flow.ChannelType] channel_type The channel type. Can be: `web`,
250
- # `facebook`, `sms`, `whatsapp`, `line` or `custom`.
254
+ # @param [flex_flow.ChannelType] channel_type The channel type. One of `web`,
255
+ # `facebook`, `sms`, `whatsapp`, `line` or `custom`. By default, Studio’s Send to
256
+ # Flex widget passes it on to the Task attributes for Tasks created based on this
257
+ # Flex Flow. The Task attributes will be used by the Flex UI to render the
258
+ # respective Task as appropriate (applying channel-specific design and length
259
+ # limits). If `channelType` is `facebook`, `whatsapp` or `line`, the Send to Flex
260
+ # widget should set the Task Channel to Programmable Chat.
251
261
  # @param [String] contact_identity The channel contact's Identity.
252
262
  # @param [Boolean] enabled Whether the new Flex Flow is enabled.
253
263
  # @param [flex_flow.IntegrationType] integration_type The software that will
@@ -282,10 +292,10 @@ module Twilio
282
292
  # @param [Boolean] janitor_enabled When enabled, the Messaging Channel Janitor
283
293
  # will remove active Proxy sessions if the associated Task is deleted outside of
284
294
  # the Flex UI. Defaults to `false`.
285
- # @param [String] integration_retry_count The number of times to retry the webhook
286
- # if the first attempt fails. Can be an integer between 0 and 3 (inclusive),
287
- # default is 3. Optional when `integrationType` is `external`, not applicable
288
- # otherwise.
295
+ # @param [String] integration_retry_count The number of times to retry the Studio
296
+ # Flow or webhook in case of failure. Takes integer values from 0 to 3 with the
297
+ # default being 3. Optional when `integrationType` is `studio` or `external`, not
298
+ # applicable otherwise.
289
299
  # @return [FlexFlowInstance] Updated FlexFlowInstance
290
300
  def update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
291
301
  data = Twilio::Values.of({
@@ -475,8 +485,13 @@ module Twilio
475
485
  # @param [String] friendly_name A descriptive string that you create to describe
476
486
  # the Flex Flow resource.
477
487
  # @param [String] chat_service_sid The SID of the chat service.
478
- # @param [flex_flow.ChannelType] channel_type The channel type. Can be: `web`,
479
- # `facebook`, `sms`, `whatsapp`, `line` or `custom`.
488
+ # @param [flex_flow.ChannelType] channel_type The channel type. One of `web`,
489
+ # `facebook`, `sms`, `whatsapp`, `line` or `custom`. By default, Studio’s Send to
490
+ # Flex widget passes it on to the Task attributes for Tasks created based on this
491
+ # Flex Flow. The Task attributes will be used by the Flex UI to render the
492
+ # respective Task as appropriate (applying channel-specific design and length
493
+ # limits). If `channelType` is `facebook`, `whatsapp` or `line`, the Send to Flex
494
+ # widget should set the Task Channel to Programmable Chat.
480
495
  # @param [String] contact_identity The channel contact's Identity.
481
496
  # @param [Boolean] enabled Whether the new Flex Flow is enabled.
482
497
  # @param [flex_flow.IntegrationType] integration_type The software that will
@@ -511,10 +526,10 @@ module Twilio
511
526
  # @param [Boolean] janitor_enabled When enabled, the Messaging Channel Janitor
512
527
  # will remove active Proxy sessions if the associated Task is deleted outside of
513
528
  # the Flex UI. Defaults to `false`.
514
- # @param [String] integration_retry_count The number of times to retry the webhook
515
- # if the first attempt fails. Can be an integer between 0 and 3 (inclusive),
516
- # default is 3. Optional when `integrationType` is `external`, not applicable
517
- # otherwise.
529
+ # @param [String] integration_retry_count The number of times to retry the Studio
530
+ # Flow or webhook in case of failure. Takes integer values from 0 to 3 with the
531
+ # default being 3. Optional when `integrationType` is `studio` or `external`, not
532
+ # applicable otherwise.
518
533
  # @return [FlexFlowInstance] Updated FlexFlowInstance
519
534
  def update(friendly_name: :unset, chat_service_sid: :unset, channel_type: :unset, contact_identity: :unset, enabled: :unset, integration_type: :unset, integration_flow_sid: :unset, integration_url: :unset, integration_workspace_sid: :unset, integration_workflow_sid: :unset, integration_channel: :unset, integration_timeout: :unset, integration_priority: :unset, integration_creation_on_message: :unset, long_lived: :unset, janitor_enabled: :unset, integration_retry_count: :unset)
520
535
  context.update(