twilio-ruby 7.4.5 → 7.6.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/.dockerignore +1 -1
- data/.github/workflows/test-and-deploy.yml +2 -2
- data/CHANGES.md +88 -0
- data/Dockerfile +2 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/http/client_token_manager.rb +2 -2
- data/lib/twilio-ruby/http/org_token_manager.rb +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +3 -0
- data/lib/twilio-ruby/rest/client.rb +5 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +11 -2
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +3 -19
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +50 -1
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +0 -39
- data/lib/twilio-ruby/rest/iam/v1/{key.rb → new_api_key.rb} +20 -20
- data/lib/twilio-ruby/rest/iam/v1/token.rb +186 -0
- data/lib/twilio-ruby/rest/iam/v1.rb +10 -4
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +232 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +213 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +617 -0
- data/lib/twilio-ruby/rest/knowledge/v1.rb +49 -0
- data/lib/twilio-ruby/rest/knowledge.rb +6 -0
- data/lib/twilio-ruby/rest/knowledge_base.rb +38 -0
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +2 -2
- data/lib/twilio-ruby/rest/{preview/sync/service.rb → messaging/v2/channels_sender.rb} +189 -226
- data/lib/twilio-ruby/rest/{preview/sync.rb → messaging/v2.rb} +13 -13
- data/lib/twilio-ruby/rest/messaging_base.rb +6 -1
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +3 -3
- data/lib/twilio-ruby/rest/preview_base.rb +0 -5
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +7 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room.rb +6 -0
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +24 -14
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +0 -2
- metadata +12 -41
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -407
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -472
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -467
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -407
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -444
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -470
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -407
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -444
@@ -35,17 +35,20 @@ module Twilio
|
|
35
35
|
# @param [Object] channel The Interaction's channel.
|
36
36
|
# @param [Object] routing The Interaction's routing logic.
|
37
37
|
# @param [String] interaction_context_sid The Interaction context sid is used for adding a context lookup sid
|
38
|
+
# @param [String] webhook_ttid The unique identifier for Interaction level webhook
|
38
39
|
# @return [InteractionInstance] Created InteractionInstance
|
39
40
|
def create(
|
40
41
|
channel: nil,
|
41
42
|
routing: :unset,
|
42
|
-
interaction_context_sid: :unset
|
43
|
+
interaction_context_sid: :unset,
|
44
|
+
webhook_ttid: :unset
|
43
45
|
)
|
44
46
|
|
45
47
|
data = Twilio::Values.of({
|
46
48
|
'Channel' => Twilio.serialize_object(channel),
|
47
49
|
'Routing' => Twilio.serialize_object(routing),
|
48
50
|
'InteractionContextSid' => interaction_context_sid,
|
51
|
+
'WebhookTtid' => webhook_ttid,
|
49
52
|
})
|
50
53
|
|
51
54
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
@@ -106,6 +109,32 @@ module Twilio
|
|
106
109
|
)
|
107
110
|
end
|
108
111
|
|
112
|
+
##
|
113
|
+
# Update the InteractionInstance
|
114
|
+
# @param [String] webhook_ttid The unique identifier for Interaction level webhook
|
115
|
+
# @return [InteractionInstance] Updated InteractionInstance
|
116
|
+
def update(
|
117
|
+
webhook_ttid: :unset
|
118
|
+
)
|
119
|
+
|
120
|
+
data = Twilio::Values.of({
|
121
|
+
'WebhookTtid' => webhook_ttid,
|
122
|
+
})
|
123
|
+
|
124
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
131
|
+
InteractionInstance.new(
|
132
|
+
@version,
|
133
|
+
payload,
|
134
|
+
sid: @solution[:sid],
|
135
|
+
)
|
136
|
+
end
|
137
|
+
|
109
138
|
##
|
110
139
|
# Access the channels
|
111
140
|
# @return [InteractionChannelList]
|
@@ -190,6 +219,7 @@ module Twilio
|
|
190
219
|
'url' => payload['url'],
|
191
220
|
'links' => payload['links'],
|
192
221
|
'interaction_context_sid' => payload['interaction_context_sid'],
|
222
|
+
'webhook_ttid' => payload['webhook_ttid'],
|
193
223
|
}
|
194
224
|
|
195
225
|
# Context
|
@@ -244,6 +274,12 @@ module Twilio
|
|
244
274
|
@properties['interaction_context_sid']
|
245
275
|
end
|
246
276
|
|
277
|
+
##
|
278
|
+
# @return [String]
|
279
|
+
def webhook_ttid
|
280
|
+
@properties['webhook_ttid']
|
281
|
+
end
|
282
|
+
|
247
283
|
##
|
248
284
|
# Fetch the InteractionInstance
|
249
285
|
# @return [InteractionInstance] Fetched InteractionInstance
|
@@ -252,6 +288,19 @@ module Twilio
|
|
252
288
|
context.fetch
|
253
289
|
end
|
254
290
|
|
291
|
+
##
|
292
|
+
# Update the InteractionInstance
|
293
|
+
# @param [String] webhook_ttid The unique identifier for Interaction level webhook
|
294
|
+
# @return [InteractionInstance] Updated InteractionInstance
|
295
|
+
def update(
|
296
|
+
webhook_ttid: :unset
|
297
|
+
)
|
298
|
+
|
299
|
+
context.update(
|
300
|
+
webhook_ttid: webhook_ttid,
|
301
|
+
)
|
302
|
+
end
|
303
|
+
|
255
304
|
##
|
256
305
|
# Access the channels
|
257
306
|
# @return [channels] channels
|
@@ -78,27 +78,18 @@ module Twilio
|
|
78
78
|
|
79
79
|
##
|
80
80
|
# Update the FlexUserInstance
|
81
|
-
# @param [String] first_name First name of the User.
|
82
|
-
# @param [String] last_name Last name of the User.
|
83
81
|
# @param [String] email Email of the User.
|
84
|
-
# @param [String] friendly_name Friendly name of the User.
|
85
82
|
# @param [String] user_sid The unique SID identifier of the Twilio Unified User.
|
86
83
|
# @param [String] locale The locale preference of the user.
|
87
84
|
# @return [FlexUserInstance] Updated FlexUserInstance
|
88
85
|
def update(
|
89
|
-
first_name: :unset,
|
90
|
-
last_name: :unset,
|
91
86
|
email: :unset,
|
92
|
-
friendly_name: :unset,
|
93
87
|
user_sid: :unset,
|
94
88
|
locale: :unset
|
95
89
|
)
|
96
90
|
|
97
91
|
data = Twilio::Values.of({
|
98
|
-
'FirstName' => first_name,
|
99
|
-
'LastName' => last_name,
|
100
92
|
'Email' => email,
|
101
|
-
'FriendlyName' => friendly_name,
|
102
93
|
'UserSid' => user_sid,
|
103
94
|
'Locale' => locale,
|
104
95
|
})
|
@@ -184,11 +175,8 @@ module Twilio
|
|
184
175
|
'worker_sid' => payload['worker_sid'],
|
185
176
|
'workspace_sid' => payload['workspace_sid'],
|
186
177
|
'flex_team_sid' => payload['flex_team_sid'],
|
187
|
-
'first_name' => payload['first_name'],
|
188
|
-
'last_name' => payload['last_name'],
|
189
178
|
'username' => payload['username'],
|
190
179
|
'email' => payload['email'],
|
191
|
-
'friendly_name' => payload['friendly_name'],
|
192
180
|
'locale' => payload['locale'],
|
193
181
|
'roles' => payload['roles'],
|
194
182
|
'created_date' => Twilio.deserialize_iso8601_datetime(payload['created_date']),
|
@@ -255,18 +243,6 @@ module Twilio
|
|
255
243
|
@properties['flex_team_sid']
|
256
244
|
end
|
257
245
|
|
258
|
-
##
|
259
|
-
# @return [String] First name of the User.
|
260
|
-
def first_name
|
261
|
-
@properties['first_name']
|
262
|
-
end
|
263
|
-
|
264
|
-
##
|
265
|
-
# @return [String] Last name of the User.
|
266
|
-
def last_name
|
267
|
-
@properties['last_name']
|
268
|
-
end
|
269
|
-
|
270
246
|
##
|
271
247
|
# @return [String] Username of the User.
|
272
248
|
def username
|
@@ -279,12 +255,6 @@ module Twilio
|
|
279
255
|
@properties['email']
|
280
256
|
end
|
281
257
|
|
282
|
-
##
|
283
|
-
# @return [String] Friendly name of the User.
|
284
|
-
def friendly_name
|
285
|
-
@properties['friendly_name']
|
286
|
-
end
|
287
|
-
|
288
258
|
##
|
289
259
|
# @return [String] The locale preference of the user.
|
290
260
|
def locale
|
@@ -331,27 +301,18 @@ module Twilio
|
|
331
301
|
|
332
302
|
##
|
333
303
|
# Update the FlexUserInstance
|
334
|
-
# @param [String] first_name First name of the User.
|
335
|
-
# @param [String] last_name Last name of the User.
|
336
304
|
# @param [String] email Email of the User.
|
337
|
-
# @param [String] friendly_name Friendly name of the User.
|
338
305
|
# @param [String] user_sid The unique SID identifier of the Twilio Unified User.
|
339
306
|
# @param [String] locale The locale preference of the user.
|
340
307
|
# @return [FlexUserInstance] Updated FlexUserInstance
|
341
308
|
def update(
|
342
|
-
first_name: :unset,
|
343
|
-
last_name: :unset,
|
344
309
|
email: :unset,
|
345
|
-
friendly_name: :unset,
|
346
310
|
user_sid: :unset,
|
347
311
|
locale: :unset
|
348
312
|
)
|
349
313
|
|
350
314
|
context.update(
|
351
|
-
first_name: first_name,
|
352
|
-
last_name: last_name,
|
353
315
|
email: email,
|
354
|
-
friendly_name: friendly_name,
|
355
316
|
user_sid: user_sid,
|
356
317
|
locale: locale,
|
357
318
|
)
|
@@ -17,12 +17,12 @@ module Twilio
|
|
17
17
|
module REST
|
18
18
|
class Iam < IamBase
|
19
19
|
class V1 < Version
|
20
|
-
class
|
20
|
+
class NewApiKeyList < ListResource
|
21
21
|
|
22
22
|
##
|
23
|
-
# Initialize the
|
23
|
+
# Initialize the NewApiKeyList
|
24
24
|
# @param [Version] version Version that contains the resource
|
25
|
-
# @return [
|
25
|
+
# @return [NewApiKeyList] NewApiKeyList
|
26
26
|
def initialize(version)
|
27
27
|
super(version)
|
28
28
|
# Path Solution
|
@@ -31,12 +31,12 @@ module Twilio
|
|
31
31
|
|
32
32
|
end
|
33
33
|
##
|
34
|
-
# Create the
|
34
|
+
# Create the NewApiKeyInstance
|
35
35
|
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
36
36
|
# @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
|
37
37
|
# @param [Keytype] key_type
|
38
38
|
# @param [Object] policy The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
|
39
|
-
# @return [
|
39
|
+
# @return [NewApiKeyInstance] Created NewApiKeyInstance
|
40
40
|
def create(
|
41
41
|
account_sid: nil,
|
42
42
|
friendly_name: :unset,
|
@@ -58,7 +58,7 @@ module Twilio
|
|
58
58
|
|
59
59
|
|
60
60
|
payload = @version.create('POST', @uri, data: data, headers: headers)
|
61
|
-
|
61
|
+
NewApiKeyInstance.new(
|
62
62
|
@version,
|
63
63
|
payload,
|
64
64
|
)
|
@@ -69,17 +69,17 @@ module Twilio
|
|
69
69
|
|
70
70
|
# Provide a user friendly representation
|
71
71
|
def to_s
|
72
|
-
'#<Twilio.Iam.V1.
|
72
|
+
'#<Twilio.Iam.V1.NewApiKeyList>'
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
class
|
76
|
+
class NewApiKeyPage < Page
|
77
77
|
##
|
78
|
-
# Initialize the
|
78
|
+
# Initialize the NewApiKeyPage
|
79
79
|
# @param [Version] version Version that contains the resource
|
80
80
|
# @param [Response] response Response from the API
|
81
81
|
# @param [Hash] solution Path solution for the resource
|
82
|
-
# @return [
|
82
|
+
# @return [NewApiKeyPage] NewApiKeyPage
|
83
83
|
def initialize(version, response, solution)
|
84
84
|
super(version, response)
|
85
85
|
|
@@ -88,29 +88,29 @@ module Twilio
|
|
88
88
|
end
|
89
89
|
|
90
90
|
##
|
91
|
-
# Build an instance of
|
91
|
+
# Build an instance of NewApiKeyInstance
|
92
92
|
# @param [Hash] payload Payload response from the API
|
93
|
-
# @return [
|
93
|
+
# @return [NewApiKeyInstance] NewApiKeyInstance
|
94
94
|
def get_instance(payload)
|
95
|
-
|
95
|
+
NewApiKeyInstance.new(@version, payload)
|
96
96
|
end
|
97
97
|
|
98
98
|
##
|
99
99
|
# Provide a user friendly representation
|
100
100
|
def to_s
|
101
|
-
'<Twilio.Iam.V1.
|
101
|
+
'<Twilio.Iam.V1.NewApiKeyPage>'
|
102
102
|
end
|
103
103
|
end
|
104
|
-
class
|
104
|
+
class NewApiKeyInstance < InstanceResource
|
105
105
|
##
|
106
|
-
# Initialize the
|
106
|
+
# Initialize the NewApiKeyInstance
|
107
107
|
# @param [Version] version Version that contains the resource
|
108
108
|
# @param [Hash] payload payload that contains response from Twilio
|
109
109
|
# @param [String] account_sid The SID of the
|
110
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this
|
110
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this NewApiKey
|
111
111
|
# resource.
|
112
112
|
# @param [String] sid The SID of the Call resource to fetch.
|
113
|
-
# @return [
|
113
|
+
# @return [NewApiKeyInstance] NewApiKeyInstance
|
114
114
|
def initialize(version, payload )
|
115
115
|
super(version)
|
116
116
|
|
@@ -165,13 +165,13 @@ module Twilio
|
|
165
165
|
##
|
166
166
|
# Provide a user friendly representation
|
167
167
|
def to_s
|
168
|
-
"<Twilio.Iam.V1.
|
168
|
+
"<Twilio.Iam.V1.NewApiKeyInstance>"
|
169
169
|
end
|
170
170
|
|
171
171
|
##
|
172
172
|
# Provide a detailed, user friendly representation
|
173
173
|
def inspect
|
174
|
-
"<Twilio.Iam.V1.
|
174
|
+
"<Twilio.Iam.V1.NewApiKeyInstance>"
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
@@ -0,0 +1,186 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Iam
|
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 Iam < IamBase
|
19
|
+
class V1 < Version
|
20
|
+
class TokenList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the TokenList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [TokenList] TokenList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/token"
|
31
|
+
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Create the TokenInstance
|
35
|
+
# @param [String] grant_type Grant type is a credential representing resource owner's authorization which can be used by client to obtain access token.
|
36
|
+
# @param [String] client_id A 34 character string that uniquely identifies this OAuth App.
|
37
|
+
# @param [String] client_secret The credential for confidential OAuth App.
|
38
|
+
# @param [String] code JWT token related to the authorization code grant type.
|
39
|
+
# @param [String] redirect_uri The redirect uri
|
40
|
+
# @param [String] audience The targeted audience uri
|
41
|
+
# @param [String] refresh_token JWT token related to refresh access token.
|
42
|
+
# @param [String] scope The scope of token
|
43
|
+
# @return [TokenInstance] Created TokenInstance
|
44
|
+
def create(
|
45
|
+
grant_type: nil,
|
46
|
+
client_id: nil,
|
47
|
+
client_secret: :unset,
|
48
|
+
code: :unset,
|
49
|
+
redirect_uri: :unset,
|
50
|
+
audience: :unset,
|
51
|
+
refresh_token: :unset,
|
52
|
+
scope: :unset
|
53
|
+
)
|
54
|
+
|
55
|
+
data = Twilio::Values.of({
|
56
|
+
'grant_type' => grant_type,
|
57
|
+
'client_id' => client_id,
|
58
|
+
'client_secret' => client_secret,
|
59
|
+
'code' => code,
|
60
|
+
'redirect_uri' => redirect_uri,
|
61
|
+
'audience' => audience,
|
62
|
+
'refresh_token' => refresh_token,
|
63
|
+
'scope' => scope,
|
64
|
+
})
|
65
|
+
|
66
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
73
|
+
TokenInstance.new(
|
74
|
+
@version,
|
75
|
+
payload,
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
# Provide a user friendly representation
|
83
|
+
def to_s
|
84
|
+
'#<Twilio.Iam.V1.TokenList>'
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
class TokenPage < Page
|
89
|
+
##
|
90
|
+
# Initialize the TokenPage
|
91
|
+
# @param [Version] version Version that contains the resource
|
92
|
+
# @param [Response] response Response from the API
|
93
|
+
# @param [Hash] solution Path solution for the resource
|
94
|
+
# @return [TokenPage] TokenPage
|
95
|
+
def initialize(version, response, solution)
|
96
|
+
super(version, response)
|
97
|
+
|
98
|
+
# Path Solution
|
99
|
+
@solution = solution
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# Build an instance of TokenInstance
|
104
|
+
# @param [Hash] payload Payload response from the API
|
105
|
+
# @return [TokenInstance] TokenInstance
|
106
|
+
def get_instance(payload)
|
107
|
+
TokenInstance.new(@version, payload)
|
108
|
+
end
|
109
|
+
|
110
|
+
##
|
111
|
+
# Provide a user friendly representation
|
112
|
+
def to_s
|
113
|
+
'<Twilio.Iam.V1.TokenPage>'
|
114
|
+
end
|
115
|
+
end
|
116
|
+
class TokenInstance < InstanceResource
|
117
|
+
##
|
118
|
+
# Initialize the TokenInstance
|
119
|
+
# @param [Version] version Version that contains the resource
|
120
|
+
# @param [Hash] payload payload that contains response from Twilio
|
121
|
+
# @param [String] account_sid The SID of the
|
122
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Token
|
123
|
+
# resource.
|
124
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
125
|
+
# @return [TokenInstance] TokenInstance
|
126
|
+
def initialize(version, payload )
|
127
|
+
super(version)
|
128
|
+
|
129
|
+
# Marshaled Properties
|
130
|
+
@properties = {
|
131
|
+
'access_token' => payload['access_token'],
|
132
|
+
'refresh_token' => payload['refresh_token'],
|
133
|
+
'id_token' => payload['id_token'],
|
134
|
+
'token_type' => payload['token_type'],
|
135
|
+
'expires_in' => payload['expires_in'],
|
136
|
+
}
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
##
|
141
|
+
# @return [String] Token which carries the necessary information to access a Twilio resource directly.
|
142
|
+
def access_token
|
143
|
+
@properties['access_token']
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# @return [String] Token which carries the information necessary to get a new access token.
|
148
|
+
def refresh_token
|
149
|
+
@properties['refresh_token']
|
150
|
+
end
|
151
|
+
|
152
|
+
##
|
153
|
+
# @return [String] Token which carries the information necessary of user profile.
|
154
|
+
def id_token
|
155
|
+
@properties['id_token']
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# @return [String] Token type
|
160
|
+
def token_type
|
161
|
+
@properties['token_type']
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# @return [String]
|
166
|
+
def expires_in
|
167
|
+
@properties['expires_in']
|
168
|
+
end
|
169
|
+
|
170
|
+
##
|
171
|
+
# Provide a user friendly representation
|
172
|
+
def to_s
|
173
|
+
"<Twilio.Iam.V1.TokenInstance>"
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# Provide a detailed, user friendly representation
|
178
|
+
def inspect
|
179
|
+
"<Twilio.Iam.V1.TokenInstance>"
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
@@ -23,7 +23,8 @@ module Twilio
|
|
23
23
|
@version = 'v1'
|
24
24
|
@api_key = nil
|
25
25
|
@get_api_keys = nil
|
26
|
-
@
|
26
|
+
@new_api_key = nil
|
27
|
+
@token = nil
|
27
28
|
end
|
28
29
|
|
29
30
|
##
|
@@ -46,9 +47,14 @@ module Twilio
|
|
46
47
|
@get_api_keys ||= GetApiKeysList.new self
|
47
48
|
end
|
48
49
|
##
|
49
|
-
# @return [Twilio::REST::Iam::V1::
|
50
|
-
def
|
51
|
-
@
|
50
|
+
# @return [Twilio::REST::Iam::V1::NewApiKeyList]
|
51
|
+
def new_api_key
|
52
|
+
@new_api_key ||= NewApiKeyList.new self
|
53
|
+
end
|
54
|
+
##
|
55
|
+
# @return [Twilio::REST::Iam::V1::TokenList]
|
56
|
+
def token
|
57
|
+
@token ||= TokenList.new self
|
52
58
|
end
|
53
59
|
##
|
54
60
|
# Provide a user friendly representation
|