twilio-ruby 7.2.1 → 7.3.1
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 +74 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +5 -599
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +200 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +22 -1
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +303 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +626 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +229 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +593 -0
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +264 -0
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +264 -0
- data/lib/twilio-ruby/rest/assistants/v1/session.rb +328 -0
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +549 -0
- data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
- data/lib/twilio-ruby/rest/{preview_iam.rb → assistants.rb} +1 -1
- data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
- data/lib/twilio-ruby/rest/client.rb +8 -3
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +11 -11
- data/lib/twilio-ruby/rest/content/v1/content.rb +167 -4
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +81 -1
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +270 -0
- data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +223 -0
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +177 -0
- data/lib/twilio-ruby/rest/iam/v1.rb +61 -0
- data/lib/twilio-ruby/rest/iam.rb +6 -0
- data/lib/twilio-ruby/rest/{preview_iam_base.rb → iam_base.rb} +10 -5
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +60 -12
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +1 -1
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +16 -3
- data/lib/twilio-ruby/rest/intelligence/v2.rb +1 -1
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +16 -29
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +46 -20
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +199 -0
- data/lib/twilio-ruby/rest/marketplace/v1.rb +7 -1
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +4 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +40 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +10 -10
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +24 -17
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +7 -7
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +96 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +2 -2
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +277 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +8 -5
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/numbers/v2.rb +15 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +12 -3
- data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +2 -1
- metadata +23 -4
@@ -0,0 +1,38 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
8
|
+
# https://openapi-generator.tech
|
9
|
+
# Do not edit the class manually.
|
10
|
+
# frozen_string_literal: true
|
11
|
+
module Twilio
|
12
|
+
module REST
|
13
|
+
class AssistantsBase < Domain
|
14
|
+
##
|
15
|
+
# Initialize assistants domain
|
16
|
+
#
|
17
|
+
# @param twilio - The twilio client
|
18
|
+
#
|
19
|
+
def initialize(twilio)
|
20
|
+
super(twilio)
|
21
|
+
@base_url = "https://assistants.twilio.com"
|
22
|
+
@host = "assistants.twilio.com"
|
23
|
+
@port = 443
|
24
|
+
@v1 = nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def v1
|
28
|
+
@v1 ||= Assistants::V1.new self
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Provide a user friendly representation
|
33
|
+
def to_s
|
34
|
+
'<Twilio::REST::Assistants::V1>';
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -27,6 +27,11 @@ module Twilio
|
|
27
27
|
@api ||= Api.new self
|
28
28
|
end
|
29
29
|
##
|
30
|
+
# Access the Assistants Twilio Domain
|
31
|
+
def assistants
|
32
|
+
@assistants ||= Assistants.new self
|
33
|
+
end
|
34
|
+
##
|
30
35
|
# Access the Bulkexports Twilio Domain
|
31
36
|
def bulkexports
|
32
37
|
@bulkexports ||= Bulkexports.new self
|
@@ -62,9 +67,9 @@ module Twilio
|
|
62
67
|
@frontline_api ||= FrontlineApi.new self
|
63
68
|
end
|
64
69
|
##
|
65
|
-
# Access the
|
66
|
-
def
|
67
|
-
@
|
70
|
+
# Access the Iam Twilio Domain
|
71
|
+
def iam
|
72
|
+
@iam ||= Iam.new self
|
68
73
|
end
|
69
74
|
##
|
70
75
|
# Access the Insights Twilio Domain
|
@@ -25,10 +25,10 @@ module Twilio
|
|
25
25
|
# Initialize the ApprovalFetchList
|
26
26
|
# @param [Version] version Version that contains the resource
|
27
27
|
# @return [ApprovalFetchList] ApprovalFetchList
|
28
|
-
def initialize(version,
|
28
|
+
def initialize(version, sid: nil)
|
29
29
|
super(version)
|
30
30
|
# Path Solution
|
31
|
-
@solution = {
|
31
|
+
@solution = { sid: sid }
|
32
32
|
|
33
33
|
|
34
34
|
end
|
@@ -46,14 +46,14 @@ module Twilio
|
|
46
46
|
##
|
47
47
|
# Initialize the ApprovalFetchContext
|
48
48
|
# @param [Version] version Version that contains the resource
|
49
|
-
# @param [String]
|
49
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.
|
50
50
|
# @return [ApprovalFetchContext] ApprovalFetchContext
|
51
|
-
def initialize(version,
|
51
|
+
def initialize(version, sid)
|
52
52
|
super(version)
|
53
53
|
|
54
54
|
# Path Solution
|
55
|
-
@solution = {
|
56
|
-
@uri = "/Content/#{@solution[:
|
55
|
+
@solution = { sid: sid, }
|
56
|
+
@uri = "/Content/#{@solution[:sid]}/ApprovalRequests"
|
57
57
|
|
58
58
|
|
59
59
|
end
|
@@ -68,7 +68,7 @@ module Twilio
|
|
68
68
|
ApprovalFetchInstance.new(
|
69
69
|
@version,
|
70
70
|
payload,
|
71
|
-
|
71
|
+
sid: @solution[:sid],
|
72
72
|
)
|
73
73
|
end
|
74
74
|
|
@@ -107,7 +107,7 @@ module Twilio
|
|
107
107
|
# @param [Hash] payload Payload response from the API
|
108
108
|
# @return [ApprovalFetchInstance] ApprovalFetchInstance
|
109
109
|
def get_instance(payload)
|
110
|
-
ApprovalFetchInstance.new(@version, payload,
|
110
|
+
ApprovalFetchInstance.new(@version, payload, sid: @solution[:sid])
|
111
111
|
end
|
112
112
|
|
113
113
|
##
|
@@ -126,7 +126,7 @@ module Twilio
|
|
126
126
|
# resource.
|
127
127
|
# @param [String] sid The SID of the Call resource to fetch.
|
128
128
|
# @return [ApprovalFetchInstance] ApprovalFetchInstance
|
129
|
-
def initialize(version, payload ,
|
129
|
+
def initialize(version, payload , sid: nil)
|
130
130
|
super(version)
|
131
131
|
|
132
132
|
# Marshaled Properties
|
@@ -139,7 +139,7 @@ module Twilio
|
|
139
139
|
|
140
140
|
# Context
|
141
141
|
@instance_context = nil
|
142
|
-
@params = { '
|
142
|
+
@params = { 'sid' => sid || @properties['sid'] , }
|
143
143
|
end
|
144
144
|
|
145
145
|
##
|
@@ -148,7 +148,7 @@ module Twilio
|
|
148
148
|
# @return [ApprovalFetchContext] CallContext for this CallInstance
|
149
149
|
def context
|
150
150
|
unless @instance_context
|
151
|
-
@instance_context = ApprovalFetchContext.new(@version , @params['
|
151
|
+
@instance_context = ApprovalFetchContext.new(@version , @params['sid'])
|
152
152
|
end
|
153
153
|
@instance_context
|
154
154
|
end
|
@@ -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
|
-
|
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
|
64
|
-
# @param [type]: [
|
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
|
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
|