twilio-ruby 7.2.3 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +53 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +5 -599
  5. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
  6. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +200 -0
  7. data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +22 -1
  8. data/lib/twilio-ruby/rest/client.rb +3 -3
  9. data/lib/twilio-ruby/rest/content/v1/content.rb +167 -4
  10. data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +81 -1
  11. data/lib/twilio-ruby/rest/iam/v1/api_key.rb +270 -0
  12. data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +223 -0
  13. data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +177 -0
  14. data/lib/twilio-ruby/rest/iam/v1.rb +61 -0
  15. data/lib/twilio-ruby/rest/{preview_iam.rb → iam.rb} +1 -1
  16. data/lib/twilio-ruby/rest/{preview_iam_base.rb → iam_base.rb} +10 -5
  17. data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +60 -12
  18. data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +1 -1
  19. data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +16 -3
  20. data/lib/twilio-ruby/rest/intelligence/v2.rb +1 -1
  21. data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +8 -8
  22. data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +22 -9
  23. data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +199 -0
  24. data/lib/twilio-ruby/rest/marketplace/v1.rb +7 -1
  25. data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +4 -1
  26. data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +40 -0
  27. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +10 -10
  28. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +24 -17
  29. data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +7 -7
  30. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +3 -3
  31. data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +1 -1
  32. data/lib/twilio-ruby/rest/numbers/v1/{webhook.rb → porting_webhook_configuration_fetch.rb} +23 -23
  33. data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +96 -0
  34. data/lib/twilio-ruby/rest/numbers/v1.rb +8 -8
  35. data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +277 -0
  36. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +4 -1
  37. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
  38. data/lib/twilio-ruby/rest/numbers/v2.rb +15 -0
  39. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +2 -2
  40. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
  41. data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +12 -3
  42. data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
  43. data/lib/twilio-ruby/version.rb +1 -1
  44. metadata +12 -5
@@ -0,0 +1,200 @@
1
+ ##
2
+ # This code was generated by
3
+ # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
+ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
+ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
+ #
7
+ # Twilio - Api
8
+ # This is the public Twilio REST API.
9
+ #
10
+ # NOTE: This class is auto generated by OpenAPI Generator.
11
+ # https://openapi-generator.tech
12
+ # Do not edit the class manually.
13
+ #
14
+
15
+
16
+ module Twilio
17
+ module REST
18
+ class Api < ApiBase
19
+ class V2010 < Version
20
+ class AccountContext < InstanceContext
21
+ class RecordingContext < InstanceContext
22
+ class AddOnResultContext < InstanceContext
23
+ class PayloadContext < InstanceContext
24
+
25
+ class DataList < ListResource
26
+
27
+ ##
28
+ # Initialize the DataList
29
+ # @param [Version] version Version that contains the resource
30
+ # @return [DataList] DataList
31
+ def initialize(version, account_sid: nil, reference_sid: nil, add_on_result_sid: nil, payload_sid: nil)
32
+ super(version)
33
+ # Path Solution
34
+ @solution = { account_sid: account_sid, reference_sid: reference_sid, add_on_result_sid: add_on_result_sid, payload_sid: payload_sid }
35
+
36
+
37
+ end
38
+
39
+
40
+
41
+ # Provide a user friendly representation
42
+ def to_s
43
+ '#<Twilio.Api.V2010.DataList>'
44
+ end
45
+ end
46
+
47
+
48
+ class DataContext < InstanceContext
49
+ ##
50
+ # Initialize the DataContext
51
+ # @param [Version] version Version that contains the resource
52
+ # @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch.
53
+ # @param [String] reference_sid The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs.
54
+ # @param [String] add_on_result_sid The SID of the AddOnResult to which the payload to fetch belongs.
55
+ # @param [String] payload_sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch.
56
+ # @return [DataContext] DataContext
57
+ def initialize(version, account_sid, reference_sid, add_on_result_sid, payload_sid)
58
+ super(version)
59
+
60
+ # Path Solution
61
+ @solution = { account_sid: account_sid, reference_sid: reference_sid, add_on_result_sid: add_on_result_sid, payload_sid: payload_sid, }
62
+ @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:add_on_result_sid]}/Payloads/#{@solution[:payload_sid]}/Data.json"
63
+
64
+
65
+ end
66
+ ##
67
+ # Fetch the DataInstance
68
+ # @return [DataInstance] Fetched DataInstance
69
+ def fetch
70
+
71
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
72
+
73
+ payload = @version.fetch('GET', @uri, headers: headers)
74
+ DataInstance.new(
75
+ @version,
76
+ payload,
77
+ account_sid: @solution[:account_sid],
78
+ reference_sid: @solution[:reference_sid],
79
+ add_on_result_sid: @solution[:add_on_result_sid],
80
+ payload_sid: @solution[:payload_sid],
81
+ )
82
+ end
83
+
84
+
85
+ ##
86
+ # Provide a user friendly representation
87
+ def to_s
88
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
89
+ "#<Twilio.Api.V2010.DataContext #{context}>"
90
+ end
91
+
92
+ ##
93
+ # Provide a detailed, user friendly representation
94
+ def inspect
95
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
96
+ "#<Twilio.Api.V2010.DataContext #{context}>"
97
+ end
98
+ end
99
+
100
+ class DataPage < Page
101
+ ##
102
+ # Initialize the DataPage
103
+ # @param [Version] version Version that contains the resource
104
+ # @param [Response] response Response from the API
105
+ # @param [Hash] solution Path solution for the resource
106
+ # @return [DataPage] DataPage
107
+ def initialize(version, response, solution)
108
+ super(version, response)
109
+
110
+ # Path Solution
111
+ @solution = solution
112
+ end
113
+
114
+ ##
115
+ # Build an instance of DataInstance
116
+ # @param [Hash] payload Payload response from the API
117
+ # @return [DataInstance] DataInstance
118
+ def get_instance(payload)
119
+ DataInstance.new(@version, payload, account_sid: @solution[:account_sid], reference_sid: @solution[:reference_sid], add_on_result_sid: @solution[:add_on_result_sid], payload_sid: @solution[:payload_sid])
120
+ end
121
+
122
+ ##
123
+ # Provide a user friendly representation
124
+ def to_s
125
+ '<Twilio.Api.V2010.DataPage>'
126
+ end
127
+ end
128
+ class DataInstance < InstanceResource
129
+ ##
130
+ # Initialize the DataInstance
131
+ # @param [Version] version Version that contains the resource
132
+ # @param [Hash] payload payload that contains response from Twilio
133
+ # @param [String] account_sid The SID of the
134
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Data
135
+ # resource.
136
+ # @param [String] sid The SID of the Call resource to fetch.
137
+ # @return [DataInstance] DataInstance
138
+ def initialize(version, payload , account_sid: nil, reference_sid: nil, add_on_result_sid: nil, payload_sid: nil)
139
+ super(version)
140
+
141
+ # Marshaled Properties
142
+ @properties = {
143
+ 'redirect_to' => payload['redirect_to'],
144
+ }
145
+
146
+ # Context
147
+ @instance_context = nil
148
+ @params = { 'account_sid' => account_sid ,'reference_sid' => reference_sid || @properties['reference_sid'] ,'add_on_result_sid' => add_on_result_sid || @properties['add_on_result_sid'] ,'payload_sid' => payload_sid || @properties['payload_sid'] , }
149
+ end
150
+
151
+ ##
152
+ # Generate an instance context for the instance, the context is capable of
153
+ # performing various actions. All instance actions are proxied to the context
154
+ # @return [DataContext] CallContext for this CallInstance
155
+ def context
156
+ unless @instance_context
157
+ @instance_context = DataContext.new(@version , @params['account_sid'], @params['reference_sid'], @params['add_on_result_sid'], @params['payload_sid'])
158
+ end
159
+ @instance_context
160
+ end
161
+
162
+ ##
163
+ # @return [String] The URL to redirect to to get the data returned by the AddOn that was previously stored.
164
+ def redirect_to
165
+ @properties['redirect_to']
166
+ end
167
+
168
+ ##
169
+ # Fetch the DataInstance
170
+ # @return [DataInstance] Fetched DataInstance
171
+ def fetch
172
+
173
+ context.fetch
174
+ end
175
+
176
+ ##
177
+ # Provide a user friendly representation
178
+ def to_s
179
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
180
+ "<Twilio.Api.V2010.DataInstance #{values}>"
181
+ end
182
+
183
+ ##
184
+ # Provide a detailed, user friendly representation
185
+ def inspect
186
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
187
+ "<Twilio.Api.V2010.DataInstance #{values}>"
188
+ end
189
+ end
190
+
191
+ end
192
+ end
193
+ end
194
+ end
195
+ end
196
+ end
197
+ end
198
+ end
199
+
200
+
@@ -144,7 +144,8 @@ module Twilio
144
144
  @solution = { account_sid: account_sid, reference_sid: reference_sid, add_on_result_sid: add_on_result_sid, sid: sid, }
145
145
  @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:add_on_result_sid]}/Payloads/#{@solution[:sid]}.json"
146
146
 
147
-
147
+ # Dependents
148
+ @data = nil
148
149
  end
149
150
  ##
150
151
  # Delete the PayloadInstance
@@ -174,6 +175,19 @@ module Twilio
174
175
  )
175
176
  end
176
177
 
178
+ ##
179
+ # Access the data
180
+ # @return [DataList]
181
+ # @return [DataContext]
182
+ def data
183
+ DataContext.new(
184
+ @version,
185
+ @solution[:account_sid],
186
+ @solution[:reference_sid],
187
+ @solution[:add_on_result_sid],
188
+ @solution[:sid]
189
+ )
190
+ end
177
191
 
178
192
  ##
179
193
  # Provide a user friendly representation
@@ -344,6 +358,13 @@ module Twilio
344
358
  context.fetch
345
359
  end
346
360
 
361
+ ##
362
+ # Access the data
363
+ # @return [data] data
364
+ def data
365
+ context.data
366
+ end
367
+
347
368
  ##
348
369
  # Provide a user friendly representation
349
370
  def to_s
@@ -62,9 +62,9 @@ module Twilio
62
62
  @frontline_api ||= FrontlineApi.new self
63
63
  end
64
64
  ##
65
- # Access the PreviewIam Twilio Domain
66
- def preview_iam
67
- @preview_iam ||= PreviewIam.new self
65
+ # Access the Iam Twilio Domain
66
+ def iam
67
+ @iam ||= Iam.new self
68
68
  end
69
69
  ##
70
70
  # Access the Insights Twilio Domain
@@ -40,14 +40,41 @@ module Twilio
40
40
  # @param [title]: [String]
41
41
  # @param [url]: [String]
42
42
  # @param [phone]: [String]
43
+ # @param [code]: [String]
44
+ attr_accessor :type, :title, :url, :phone, :code
45
+ def initialize(payload)
46
+ @type = payload["type"]
47
+ @title = payload["title"]
48
+ @url = payload["url"]
49
+ @phone = payload["phone"]
50
+ @code = payload["code"]
51
+ end
52
+ def to_json(options = {})
53
+ {
54
+ type: @type,
55
+ title: @title,
56
+ url: @url,
57
+ phone: @phone,
58
+ code: @code,
59
+ }.to_json(options)
60
+ end
61
+ end
62
+
63
+ class CardAction
64
+ # @param [type]: [CardActionType]
65
+ # @param [title]: [String]
66
+ # @param [url]: [String]
67
+ # @param [phone]: [String]
43
68
  # @param [id]: [String]
44
- attr_accessor :type, :title, :url, :phone, :id
69
+ # @param [code]: [String]
70
+ attr_accessor :type, :title, :url, :phone, :id, :code
45
71
  def initialize(payload)
46
72
  @type = payload["type"]
47
73
  @title = payload["title"]
48
74
  @url = payload["url"]
49
75
  @phone = payload["phone"]
50
76
  @id = payload["id"]
77
+ @code = payload["code"]
51
78
  end
52
79
  def to_json(options = {})
53
80
  {
@@ -56,12 +83,13 @@ module Twilio
56
83
  url: @url,
57
84
  phone: @phone,
58
85
  id: @id,
86
+ code: @code,
59
87
  }.to_json(options)
60
88
  end
61
89
  end
62
90
 
63
- class CardAction
64
- # @param [type]: [CardActionType]
91
+ class CarouselAction
92
+ # @param [type]: [CarouselActionType]
65
93
  # @param [title]: [String]
66
94
  # @param [url]: [String]
67
95
  # @param [phone]: [String]
@@ -85,6 +113,28 @@ module Twilio
85
113
  end
86
114
  end
87
115
 
116
+ class CarouselCard
117
+ # @param [title]: [String]
118
+ # @param [body]: [String]
119
+ # @param [media]: [String]
120
+ # @param [actions]: [Array<ContentList.CarouselAction>]
121
+ attr_accessor :title, :body, :media, :actions
122
+ def initialize(payload)
123
+ @title = payload["title"]
124
+ @body = payload["body"]
125
+ @media = payload["media"]
126
+ @actions = payload["actions"]
127
+ end
128
+ def to_json(options = {})
129
+ {
130
+ title: @title,
131
+ body: @body,
132
+ media: @media,
133
+ actions: @actions,
134
+ }.to_json(options)
135
+ end
136
+ end
137
+
88
138
  class CatalogItem
89
139
  # @param [id]: [String]
90
140
  # @param [section_title]: [String]
@@ -135,6 +185,69 @@ module Twilio
135
185
  end
136
186
  end
137
187
 
188
+ class FlowsPage
189
+ # @param [id]: [String]
190
+ # @param [next_page_id]: [String]
191
+ # @param [title]: [String]
192
+ # @param [subtitle]: [String]
193
+ # @param [layout]: [Array<ContentList.FlowsPageComponent>]
194
+ attr_accessor :id, :next_page_id, :title, :subtitle, :layout
195
+ def initialize(payload)
196
+ @id = payload["id"]
197
+ @next_page_id = payload["next_page_id"]
198
+ @title = payload["title"]
199
+ @subtitle = payload["subtitle"]
200
+ @layout = payload["layout"]
201
+ end
202
+ def to_json(options = {})
203
+ {
204
+ id: @id,
205
+ next_page_id: @next_page_id,
206
+ title: @title,
207
+ subtitle: @subtitle,
208
+ layout: @layout,
209
+ }.to_json(options)
210
+ end
211
+ end
212
+
213
+ class FlowsPageComponent
214
+ # @param [label]: [String]
215
+ # @param [type]: [String]
216
+ # @param [text]: [String]
217
+ # @param [options]: [Array<ContentList.FlowsPageComponentSelectItem>]
218
+ attr_accessor :label, :type, :text, :options
219
+ def initialize(payload)
220
+ @label = payload["label"]
221
+ @type = payload["type"]
222
+ @text = payload["text"]
223
+ @options = payload["options"]
224
+ end
225
+ def to_json(options = {})
226
+ {
227
+ label: @label,
228
+ type: @type,
229
+ text: @text,
230
+ options: @options,
231
+ }.to_json(options)
232
+ end
233
+ end
234
+
235
+ class FlowsPageComponentSelectItem
236
+ # @param [id]: [String]
237
+ # @param [title]: [String]
238
+ attr_accessor :id, :title
239
+ def initialize(payload)
240
+ @id = payload["id"]
241
+ @title = payload["title"]
242
+ end
243
+ def to_json(options = {})
244
+ {
245
+ id: @id,
246
+ title: @title,
247
+ }.to_json(options)
248
+ end
249
+ end
250
+
138
251
  class ListItem
139
252
  # @param [id]: [String]
140
253
  # @param [item]: [String]
@@ -211,6 +324,22 @@ module Twilio
211
324
  end
212
325
  end
213
326
 
327
+ class TwilioCarousel
328
+ # @param [body]: [String]
329
+ # @param [cards]: [Array<ContentList.CarouselCard>]
330
+ attr_accessor :body, :cards
331
+ def initialize(payload)
332
+ @body = payload["body"]
333
+ @cards = payload["cards"]
334
+ end
335
+ def to_json(options = {})
336
+ {
337
+ body: @body,
338
+ cards: @cards,
339
+ }.to_json(options)
340
+ end
341
+ end
342
+
214
343
  class TwilioCatalog
215
344
  # @param [title]: [String]
216
345
  # @param [body]: [String]
@@ -239,6 +368,34 @@ module Twilio
239
368
  end
240
369
  end
241
370
 
371
+ class TwilioFlows
372
+ # @param [body]: [String]
373
+ # @param [button_text]: [String]
374
+ # @param [subtitle]: [String]
375
+ # @param [media_url]: [String]
376
+ # @param [pages]: [Array<ContentList.FlowsPage>]
377
+ # @param [type]: [String]
378
+ attr_accessor :body, :button_text, :subtitle, :media_url, :pages, :type
379
+ def initialize(payload)
380
+ @body = payload["body"]
381
+ @button_text = payload["button_text"]
382
+ @subtitle = payload["subtitle"]
383
+ @media_url = payload["media_url"]
384
+ @pages = payload["pages"]
385
+ @type = payload["type"]
386
+ end
387
+ def to_json(options = {})
388
+ {
389
+ body: @body,
390
+ button_text: @button_text,
391
+ subtitle: @subtitle,
392
+ media_url: @media_url,
393
+ pages: @pages,
394
+ type: @type,
395
+ }.to_json(options)
396
+ end
397
+ end
398
+
242
399
  class TwilioListPicker
243
400
  # @param [body]: [String]
244
401
  # @param [button]: [String]
@@ -331,9 +488,11 @@ module Twilio
331
488
  # @param [twilio_quick_reply]: [ContentList.TwilioQuickReply]
332
489
  # @param [twilio_card]: [ContentList.TwilioCard]
333
490
  # @param [twilio_catalog]: [ContentList.TwilioCatalog]
491
+ # @param [twilio_carousel]: [ContentList.TwilioCarousel]
492
+ # @param [twilio_flows]: [ContentList.TwilioFlows]
334
493
  # @param [whatsapp_card]: [ContentList.WhatsappCard]
335
494
  # @param [whatsapp_authentication]: [ContentList.WhatsappAuthentication]
336
- attr_accessor :twilio_text, :twilio_media, :twilio_location, :twilio_list_picker, :twilio_call_to_action, :twilio_quick_reply, :twilio_card, :twilio_catalog, :whatsapp_card, :whatsapp_authentication
495
+ attr_accessor :twilio_text, :twilio_media, :twilio_location, :twilio_list_picker, :twilio_call_to_action, :twilio_quick_reply, :twilio_card, :twilio_catalog, :twilio_carousel, :twilio_flows, :whatsapp_card, :whatsapp_authentication
337
496
  def initialize(payload)
338
497
  @twilio_text = payload["twilio_text"]
339
498
  @twilio_media = payload["twilio_media"]
@@ -343,6 +502,8 @@ module Twilio
343
502
  @twilio_quick_reply = payload["twilio_quick_reply"]
344
503
  @twilio_card = payload["twilio_card"]
345
504
  @twilio_catalog = payload["twilio_catalog"]
505
+ @twilio_carousel = payload["twilio_carousel"]
506
+ @twilio_flows = payload["twilio_flows"]
346
507
  @whatsapp_card = payload["whatsapp_card"]
347
508
  @whatsapp_authentication = payload["whatsapp_authentication"]
348
509
  end
@@ -356,6 +517,8 @@ module Twilio
356
517
  twilio_quick_reply: @twilio_quick_reply,
357
518
  twilio_card: @twilio_card,
358
519
  twilio_catalog: @twilio_catalog,
520
+ twilio_carousel: @twilio_carousel,
521
+ twilio_flows: @twilio_flows,
359
522
  whatsapp_card: @whatsapp_card,
360
523
  whatsapp_authentication: @whatsapp_authentication,
361
524
  }.to_json(options)
@@ -45,7 +45,7 @@ module Twilio
45
45
  # Initialize the FlexUserContext
46
46
  # @param [Version] version Version that contains the resource
47
47
  # @param [String] instance_sid The unique ID created by Twilio to identify a Flex instance.
48
- # @param [String] flex_user_sid The unique id for the flex user to be retrieved.
48
+ # @param [String] flex_user_sid The unique id for the flex user.
49
49
  # @return [FlexUserContext] FlexUserContext
50
50
  def initialize(version, instance_sid, flex_user_sid)
51
51
  super(version)
@@ -72,6 +72,44 @@ module Twilio
72
72
  )
73
73
  end
74
74
 
75
+ ##
76
+ # Update the FlexUserInstance
77
+ # @param [String] first_name First name of the User.
78
+ # @param [String] last_name Last name of the User.
79
+ # @param [String] email Email of the User.
80
+ # @param [String] friendly_name Friendly name of the User.
81
+ # @param [String] user_sid The unique SID identifier of the Twilio Unified User.
82
+ # @param [String] locale The locale preference of the user.
83
+ # @return [FlexUserInstance] Updated FlexUserInstance
84
+ def update(
85
+ first_name: :unset,
86
+ last_name: :unset,
87
+ email: :unset,
88
+ friendly_name: :unset,
89
+ user_sid: :unset,
90
+ locale: :unset
91
+ )
92
+
93
+ data = Twilio::Values.of({
94
+ 'FirstName' => first_name,
95
+ 'LastName' => last_name,
96
+ 'Email' => email,
97
+ 'FriendlyName' => friendly_name,
98
+ 'UserSid' => user_sid,
99
+ 'Locale' => locale,
100
+ })
101
+
102
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
103
+
104
+ payload = @version.update('POST', @uri, data: data, headers: headers)
105
+ FlexUserInstance.new(
106
+ @version,
107
+ payload,
108
+ instance_sid: @solution[:instance_sid],
109
+ flex_user_sid: @solution[:flex_user_sid],
110
+ )
111
+ end
112
+
75
113
 
76
114
  ##
77
115
  # Provide a user friendly representation
@@ -143,6 +181,8 @@ module Twilio
143
181
  'username' => payload['username'],
144
182
  'email' => payload['email'],
145
183
  'friendly_name' => payload['friendly_name'],
184
+ 'locale' => payload['locale'],
185
+ 'roles' => payload['roles'],
146
186
  'created_date' => Twilio.deserialize_iso8601_datetime(payload['created_date']),
147
187
  'updated_date' => Twilio.deserialize_iso8601_datetime(payload['updated_date']),
148
188
  'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
@@ -237,6 +277,18 @@ module Twilio
237
277
  @properties['friendly_name']
238
278
  end
239
279
 
280
+ ##
281
+ # @return [String] The locale preference of the user.
282
+ def locale
283
+ @properties['locale']
284
+ end
285
+
286
+ ##
287
+ # @return [Array<String>] The roles of the user.
288
+ def roles
289
+ @properties['roles']
290
+ end
291
+
240
292
  ##
241
293
  # @return [Time] The date that this user was created, given in ISO 8601 format.
242
294
  def created_date
@@ -269,6 +321,34 @@ module Twilio
269
321
  context.fetch
270
322
  end
271
323
 
324
+ ##
325
+ # Update the FlexUserInstance
326
+ # @param [String] first_name First name of the User.
327
+ # @param [String] last_name Last name of the User.
328
+ # @param [String] email Email of the User.
329
+ # @param [String] friendly_name Friendly name of the User.
330
+ # @param [String] user_sid The unique SID identifier of the Twilio Unified User.
331
+ # @param [String] locale The locale preference of the user.
332
+ # @return [FlexUserInstance] Updated FlexUserInstance
333
+ def update(
334
+ first_name: :unset,
335
+ last_name: :unset,
336
+ email: :unset,
337
+ friendly_name: :unset,
338
+ user_sid: :unset,
339
+ locale: :unset
340
+ )
341
+
342
+ context.update(
343
+ first_name: first_name,
344
+ last_name: last_name,
345
+ email: email,
346
+ friendly_name: friendly_name,
347
+ user_sid: user_sid,
348
+ locale: locale,
349
+ )
350
+ end
351
+
272
352
  ##
273
353
  # Provide a user friendly representation
274
354
  def to_s