twilio-ruby 7.2.4 → 7.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +10 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/client.rb +5 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +103 -6
- 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/iam_base.rb +38 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +2 -2
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2054814e2215093a15794230fabbebe3567c761
|
4
|
+
data.tar.gz: 751cc2f6cd785951e3e35ba228827eb2e4db8c0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 236d53dc2b5d91cb79f7fdddff50041269cd01d3a0cd598b6bcafe07df1f9b2370d7d79c47885597d46a569458006d3194ef3991f8a8b8696ad3ce9dec23b15a
|
7
|
+
data.tar.gz: 588f2c4e2501fab9055cfb85150c30914ed645da6a8e45504fa0343597e77527d979415f0a17645470c0f5dc21a2e835235a97cb21f1b424c743ce67cc8a170e
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2024-09-05] Version 7.3.0
|
5
|
+
--------------------------
|
6
|
+
**Iam**
|
7
|
+
- updated library_visibility public for new public apikeys
|
8
|
+
|
9
|
+
**Numbers**
|
10
|
+
- Add new field in Error Codes for Regulatory Compliance.
|
11
|
+
- Change typing of Port In Request date_created field to date_time instead of date **(breaking change)**
|
12
|
+
|
13
|
+
|
4
14
|
[2024-08-26] Version 7.2.4
|
5
15
|
--------------------------
|
6
16
|
**Library - Chore**
|
data/README.md
CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
|
|
39
39
|
To install using [Bundler][bundler] grab the latest stable version:
|
40
40
|
|
41
41
|
```ruby
|
42
|
-
gem 'twilio-ruby', '~> 7.
|
42
|
+
gem 'twilio-ruby', '~> 7.3.0'
|
43
43
|
```
|
44
44
|
|
45
45
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
46
46
|
|
47
47
|
```bash
|
48
|
-
gem install twilio-ruby -v 7.
|
48
|
+
gem install twilio-ruby -v 7.3.0
|
49
49
|
```
|
50
50
|
|
51
51
|
To build and install the development branch yourself from the latest source:
|
@@ -40,14 +40,14 @@ module Twilio
|
|
40
40
|
# @param [title]: [String]
|
41
41
|
# @param [url]: [String]
|
42
42
|
# @param [phone]: [String]
|
43
|
-
# @param [
|
44
|
-
attr_accessor :type, :title, :url, :phone, :
|
43
|
+
# @param [code]: [String]
|
44
|
+
attr_accessor :type, :title, :url, :phone, :code
|
45
45
|
def initialize(payload)
|
46
46
|
@type = payload["type"]
|
47
47
|
@title = payload["title"]
|
48
48
|
@url = payload["url"]
|
49
49
|
@phone = payload["phone"]
|
50
|
-
@
|
50
|
+
@code = payload["code"]
|
51
51
|
end
|
52
52
|
def to_json(options = {})
|
53
53
|
{
|
@@ -55,7 +55,7 @@ module Twilio
|
|
55
55
|
title: @title,
|
56
56
|
url: @url,
|
57
57
|
phone: @phone,
|
58
|
-
|
58
|
+
code: @code,
|
59
59
|
}.to_json(options)
|
60
60
|
end
|
61
61
|
end
|
@@ -66,13 +66,15 @@ module Twilio
|
|
66
66
|
# @param [url]: [String]
|
67
67
|
# @param [phone]: [String]
|
68
68
|
# @param [id]: [String]
|
69
|
-
|
69
|
+
# @param [code]: [String]
|
70
|
+
attr_accessor :type, :title, :url, :phone, :id, :code
|
70
71
|
def initialize(payload)
|
71
72
|
@type = payload["type"]
|
72
73
|
@title = payload["title"]
|
73
74
|
@url = payload["url"]
|
74
75
|
@phone = payload["phone"]
|
75
76
|
@id = payload["id"]
|
77
|
+
@code = payload["code"]
|
76
78
|
end
|
77
79
|
def to_json(options = {})
|
78
80
|
{
|
@@ -81,6 +83,7 @@ module Twilio
|
|
81
83
|
url: @url,
|
82
84
|
phone: @phone,
|
83
85
|
id: @id,
|
86
|
+
code: @code,
|
84
87
|
}.to_json(options)
|
85
88
|
end
|
86
89
|
end
|
@@ -182,6 +185,69 @@ module Twilio
|
|
182
185
|
end
|
183
186
|
end
|
184
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
|
+
|
185
251
|
class ListItem
|
186
252
|
# @param [id]: [String]
|
187
253
|
# @param [item]: [String]
|
@@ -302,6 +368,34 @@ module Twilio
|
|
302
368
|
end
|
303
369
|
end
|
304
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
|
+
|
305
399
|
class TwilioListPicker
|
306
400
|
# @param [body]: [String]
|
307
401
|
# @param [button]: [String]
|
@@ -395,9 +489,10 @@ module Twilio
|
|
395
489
|
# @param [twilio_card]: [ContentList.TwilioCard]
|
396
490
|
# @param [twilio_catalog]: [ContentList.TwilioCatalog]
|
397
491
|
# @param [twilio_carousel]: [ContentList.TwilioCarousel]
|
492
|
+
# @param [twilio_flows]: [ContentList.TwilioFlows]
|
398
493
|
# @param [whatsapp_card]: [ContentList.WhatsappCard]
|
399
494
|
# @param [whatsapp_authentication]: [ContentList.WhatsappAuthentication]
|
400
|
-
attr_accessor :twilio_text, :twilio_media, :twilio_location, :twilio_list_picker, :twilio_call_to_action, :twilio_quick_reply, :twilio_card, :twilio_catalog, :twilio_carousel, :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
|
401
496
|
def initialize(payload)
|
402
497
|
@twilio_text = payload["twilio_text"]
|
403
498
|
@twilio_media = payload["twilio_media"]
|
@@ -408,6 +503,7 @@ module Twilio
|
|
408
503
|
@twilio_card = payload["twilio_card"]
|
409
504
|
@twilio_catalog = payload["twilio_catalog"]
|
410
505
|
@twilio_carousel = payload["twilio_carousel"]
|
506
|
+
@twilio_flows = payload["twilio_flows"]
|
411
507
|
@whatsapp_card = payload["whatsapp_card"]
|
412
508
|
@whatsapp_authentication = payload["whatsapp_authentication"]
|
413
509
|
end
|
@@ -422,6 +518,7 @@ module Twilio
|
|
422
518
|
twilio_card: @twilio_card,
|
423
519
|
twilio_catalog: @twilio_catalog,
|
424
520
|
twilio_carousel: @twilio_carousel,
|
521
|
+
twilio_flows: @twilio_flows,
|
425
522
|
whatsapp_card: @whatsapp_card,
|
426
523
|
whatsapp_authentication: @whatsapp_authentication,
|
427
524
|
}.to_json(options)
|
@@ -0,0 +1,270 @@
|
|
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 ApiKeyList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the ApiKeyList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [ApiKeyList] ApiKeyList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
# Provide a user friendly representation
|
37
|
+
def to_s
|
38
|
+
'#<Twilio.Iam.V1.ApiKeyList>'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
class ApiKeyContext < InstanceContext
|
44
|
+
##
|
45
|
+
# Initialize the ApiKeyContext
|
46
|
+
# @param [Version] version Version that contains the resource
|
47
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the Key resource to update.
|
48
|
+
# @return [ApiKeyContext] ApiKeyContext
|
49
|
+
def initialize(version, sid)
|
50
|
+
super(version)
|
51
|
+
|
52
|
+
# Path Solution
|
53
|
+
@solution = { sid: sid, }
|
54
|
+
@uri = "/Keys/#{@solution[:sid]}"
|
55
|
+
|
56
|
+
|
57
|
+
end
|
58
|
+
##
|
59
|
+
# Delete the ApiKeyInstance
|
60
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
61
|
+
def delete
|
62
|
+
|
63
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
64
|
+
|
65
|
+
@version.delete('DELETE', @uri, headers: headers)
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# Fetch the ApiKeyInstance
|
70
|
+
# @return [ApiKeyInstance] Fetched ApiKeyInstance
|
71
|
+
def fetch
|
72
|
+
|
73
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
74
|
+
|
75
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
76
|
+
ApiKeyInstance.new(
|
77
|
+
@version,
|
78
|
+
payload,
|
79
|
+
sid: @solution[:sid],
|
80
|
+
)
|
81
|
+
end
|
82
|
+
|
83
|
+
##
|
84
|
+
# Update the ApiKeyInstance
|
85
|
+
# @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
|
86
|
+
# @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).
|
87
|
+
# @return [ApiKeyInstance] Updated ApiKeyInstance
|
88
|
+
def update(
|
89
|
+
friendly_name: :unset,
|
90
|
+
policy: :unset
|
91
|
+
)
|
92
|
+
|
93
|
+
data = Twilio::Values.of({
|
94
|
+
'FriendlyName' => friendly_name,
|
95
|
+
'Policy' => Twilio.serialize_object(policy),
|
96
|
+
})
|
97
|
+
|
98
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
99
|
+
|
100
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
101
|
+
ApiKeyInstance.new(
|
102
|
+
@version,
|
103
|
+
payload,
|
104
|
+
sid: @solution[:sid],
|
105
|
+
)
|
106
|
+
end
|
107
|
+
|
108
|
+
|
109
|
+
##
|
110
|
+
# Provide a user friendly representation
|
111
|
+
def to_s
|
112
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
113
|
+
"#<Twilio.Iam.V1.ApiKeyContext #{context}>"
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Provide a detailed, user friendly representation
|
118
|
+
def inspect
|
119
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
120
|
+
"#<Twilio.Iam.V1.ApiKeyContext #{context}>"
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
class ApiKeyPage < Page
|
125
|
+
##
|
126
|
+
# Initialize the ApiKeyPage
|
127
|
+
# @param [Version] version Version that contains the resource
|
128
|
+
# @param [Response] response Response from the API
|
129
|
+
# @param [Hash] solution Path solution for the resource
|
130
|
+
# @return [ApiKeyPage] ApiKeyPage
|
131
|
+
def initialize(version, response, solution)
|
132
|
+
super(version, response)
|
133
|
+
|
134
|
+
# Path Solution
|
135
|
+
@solution = solution
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# Build an instance of ApiKeyInstance
|
140
|
+
# @param [Hash] payload Payload response from the API
|
141
|
+
# @return [ApiKeyInstance] ApiKeyInstance
|
142
|
+
def get_instance(payload)
|
143
|
+
ApiKeyInstance.new(@version, payload)
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# Provide a user friendly representation
|
148
|
+
def to_s
|
149
|
+
'<Twilio.Iam.V1.ApiKeyPage>'
|
150
|
+
end
|
151
|
+
end
|
152
|
+
class ApiKeyInstance < InstanceResource
|
153
|
+
##
|
154
|
+
# Initialize the ApiKeyInstance
|
155
|
+
# @param [Version] version Version that contains the resource
|
156
|
+
# @param [Hash] payload payload that contains response from Twilio
|
157
|
+
# @param [String] account_sid The SID of the
|
158
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this ApiKey
|
159
|
+
# resource.
|
160
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
161
|
+
# @return [ApiKeyInstance] ApiKeyInstance
|
162
|
+
def initialize(version, payload , sid: nil)
|
163
|
+
super(version)
|
164
|
+
|
165
|
+
# Marshaled Properties
|
166
|
+
@properties = {
|
167
|
+
'sid' => payload['sid'],
|
168
|
+
'friendly_name' => payload['friendly_name'],
|
169
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
170
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
171
|
+
'policy' => payload['policy'],
|
172
|
+
}
|
173
|
+
|
174
|
+
# Context
|
175
|
+
@instance_context = nil
|
176
|
+
@params = { 'sid' => sid || @properties['sid'] , }
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Generate an instance context for the instance, the context is capable of
|
181
|
+
# performing various actions. All instance actions are proxied to the context
|
182
|
+
# @return [ApiKeyContext] CallContext for this CallInstance
|
183
|
+
def context
|
184
|
+
unless @instance_context
|
185
|
+
@instance_context = ApiKeyContext.new(@version , @params['sid'])
|
186
|
+
end
|
187
|
+
@instance_context
|
188
|
+
end
|
189
|
+
|
190
|
+
##
|
191
|
+
# @return [String] The unique string that we created to identify the Key resource.
|
192
|
+
def sid
|
193
|
+
@properties['sid']
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [String] The string that you assigned to describe the resource.
|
198
|
+
def friendly_name
|
199
|
+
@properties['friendly_name']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
204
|
+
def date_created
|
205
|
+
@properties['date_created']
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
210
|
+
def date_updated
|
211
|
+
@properties['date_updated']
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# @return [Hash] 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).
|
216
|
+
def policy
|
217
|
+
@properties['policy']
|
218
|
+
end
|
219
|
+
|
220
|
+
##
|
221
|
+
# Delete the ApiKeyInstance
|
222
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
223
|
+
def delete
|
224
|
+
|
225
|
+
context.delete
|
226
|
+
end
|
227
|
+
|
228
|
+
##
|
229
|
+
# Fetch the ApiKeyInstance
|
230
|
+
# @return [ApiKeyInstance] Fetched ApiKeyInstance
|
231
|
+
def fetch
|
232
|
+
|
233
|
+
context.fetch
|
234
|
+
end
|
235
|
+
|
236
|
+
##
|
237
|
+
# Update the ApiKeyInstance
|
238
|
+
# @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
|
239
|
+
# @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).
|
240
|
+
# @return [ApiKeyInstance] Updated ApiKeyInstance
|
241
|
+
def update(
|
242
|
+
friendly_name: :unset,
|
243
|
+
policy: :unset
|
244
|
+
)
|
245
|
+
|
246
|
+
context.update(
|
247
|
+
friendly_name: friendly_name,
|
248
|
+
policy: policy,
|
249
|
+
)
|
250
|
+
end
|
251
|
+
|
252
|
+
##
|
253
|
+
# Provide a user friendly representation
|
254
|
+
def to_s
|
255
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
256
|
+
"<Twilio.Iam.V1.ApiKeyInstance #{values}>"
|
257
|
+
end
|
258
|
+
|
259
|
+
##
|
260
|
+
# Provide a detailed, user friendly representation
|
261
|
+
def inspect
|
262
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
263
|
+
"<Twilio.Iam.V1.ApiKeyInstance #{values}>"
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
@@ -0,0 +1,223 @@
|
|
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 GetApiKeysList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the GetApiKeysList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [GetApiKeysList] GetApiKeysList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/Keys"
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Lists GetApiKeysInstance records from the API as a list.
|
36
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
37
|
+
# memory before returning.
|
38
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
39
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
40
|
+
# guarantees to never return more than limit. Default is no limit
|
41
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
42
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
43
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
44
|
+
# efficient page size, i.e. min(limit, 1000)
|
45
|
+
# @return [Array] Array of up to limit results
|
46
|
+
def list(account_sid: nil, limit: nil, page_size: nil)
|
47
|
+
self.stream(
|
48
|
+
account_sid: account_sid,
|
49
|
+
limit: limit,
|
50
|
+
page_size: page_size
|
51
|
+
).entries
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Streams Instance records from the API as an Enumerable.
|
56
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
57
|
+
# is reached.
|
58
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
59
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
60
|
+
# guarantees to never return more than limit. Default is no limit
|
61
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
62
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
63
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
64
|
+
# efficient page size, i.e. min(limit, 1000)
|
65
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
66
|
+
def stream(account_sid: nil, limit: nil, page_size: nil)
|
67
|
+
limits = @version.read_limits(limit, page_size)
|
68
|
+
|
69
|
+
page = self.page(
|
70
|
+
account_sid: account_sid,
|
71
|
+
page_size: limits[:page_size], )
|
72
|
+
|
73
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# When passed a block, yields GetApiKeysInstance records from the API.
|
78
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
79
|
+
# is reached.
|
80
|
+
def each
|
81
|
+
limits = @version.read_limits
|
82
|
+
|
83
|
+
page = self.page(page_size: limits[:page_size], )
|
84
|
+
|
85
|
+
@version.stream(page,
|
86
|
+
limit: limits[:limit],
|
87
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
88
|
+
end
|
89
|
+
|
90
|
+
##
|
91
|
+
# Retrieve a single page of GetApiKeysInstance records from the API.
|
92
|
+
# Request is executed immediately.
|
93
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
94
|
+
# @param [String] page_token PageToken provided by the API
|
95
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
96
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
97
|
+
# @return [Page] Page of GetApiKeysInstance
|
98
|
+
def page(account_sid: nil, page_token: :unset, page_number: :unset, page_size: :unset)
|
99
|
+
params = Twilio::Values.of({
|
100
|
+
'AccountSid' => account_sid,
|
101
|
+
'PageToken' => page_token,
|
102
|
+
'Page' => page_number,
|
103
|
+
'PageSize' => page_size,
|
104
|
+
})
|
105
|
+
|
106
|
+
response = @version.page('GET', @uri, params: params)
|
107
|
+
|
108
|
+
GetApiKeysPage.new(@version, response, @solution)
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# Retrieve a single page of GetApiKeysInstance records from the API.
|
113
|
+
# Request is executed immediately.
|
114
|
+
# @param [String] target_url API-generated URL for the requested results page
|
115
|
+
# @return [Page] Page of GetApiKeysInstance
|
116
|
+
def get_page(target_url)
|
117
|
+
response = @version.domain.request(
|
118
|
+
'GET',
|
119
|
+
target_url
|
120
|
+
)
|
121
|
+
GetApiKeysPage.new(@version, response, @solution)
|
122
|
+
end
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
# Provide a user friendly representation
|
127
|
+
def to_s
|
128
|
+
'#<Twilio.Iam.V1.GetApiKeysList>'
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
class GetApiKeysPage < Page
|
133
|
+
##
|
134
|
+
# Initialize the GetApiKeysPage
|
135
|
+
# @param [Version] version Version that contains the resource
|
136
|
+
# @param [Response] response Response from the API
|
137
|
+
# @param [Hash] solution Path solution for the resource
|
138
|
+
# @return [GetApiKeysPage] GetApiKeysPage
|
139
|
+
def initialize(version, response, solution)
|
140
|
+
super(version, response)
|
141
|
+
|
142
|
+
# Path Solution
|
143
|
+
@solution = solution
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# Build an instance of GetApiKeysInstance
|
148
|
+
# @param [Hash] payload Payload response from the API
|
149
|
+
# @return [GetApiKeysInstance] GetApiKeysInstance
|
150
|
+
def get_instance(payload)
|
151
|
+
GetApiKeysInstance.new(@version, payload)
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Provide a user friendly representation
|
156
|
+
def to_s
|
157
|
+
'<Twilio.Iam.V1.GetApiKeysPage>'
|
158
|
+
end
|
159
|
+
end
|
160
|
+
class GetApiKeysInstance < InstanceResource
|
161
|
+
##
|
162
|
+
# Initialize the GetApiKeysInstance
|
163
|
+
# @param [Version] version Version that contains the resource
|
164
|
+
# @param [Hash] payload payload that contains response from Twilio
|
165
|
+
# @param [String] account_sid The SID of the
|
166
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this GetApiKeys
|
167
|
+
# resource.
|
168
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
169
|
+
# @return [GetApiKeysInstance] GetApiKeysInstance
|
170
|
+
def initialize(version, payload )
|
171
|
+
super(version)
|
172
|
+
|
173
|
+
# Marshaled Properties
|
174
|
+
@properties = {
|
175
|
+
'sid' => payload['sid'],
|
176
|
+
'friendly_name' => payload['friendly_name'],
|
177
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
178
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
179
|
+
}
|
180
|
+
end
|
181
|
+
|
182
|
+
|
183
|
+
##
|
184
|
+
# @return [String] The unique string that we created to identify the Key resource.
|
185
|
+
def sid
|
186
|
+
@properties['sid']
|
187
|
+
end
|
188
|
+
|
189
|
+
##
|
190
|
+
# @return [String] The string that you assigned to describe the resource.
|
191
|
+
def friendly_name
|
192
|
+
@properties['friendly_name']
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
197
|
+
def date_created
|
198
|
+
@properties['date_created']
|
199
|
+
end
|
200
|
+
|
201
|
+
##
|
202
|
+
# @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
203
|
+
def date_updated
|
204
|
+
@properties['date_updated']
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# Provide a user friendly representation
|
209
|
+
def to_s
|
210
|
+
"<Twilio.Iam.V1.GetApiKeysInstance>"
|
211
|
+
end
|
212
|
+
|
213
|
+
##
|
214
|
+
# Provide a detailed, user friendly representation
|
215
|
+
def inspect
|
216
|
+
"<Twilio.Iam.V1.GetApiKeysInstance>"
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
@@ -0,0 +1,177 @@
|
|
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 NewApiKeyList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the NewApiKeyList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [NewApiKeyList] NewApiKeyList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/Keys"
|
31
|
+
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Create the NewApiKeyInstance
|
35
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
|
36
|
+
# @param [String] friendly_name A descriptive string that you create to describe the resource. It can be up to 64 characters long.
|
37
|
+
# @param [Keytype] key_type
|
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 [NewApiKeyInstance] Created NewApiKeyInstance
|
40
|
+
def create(
|
41
|
+
account_sid: nil,
|
42
|
+
friendly_name: :unset,
|
43
|
+
key_type: :unset,
|
44
|
+
policy: :unset
|
45
|
+
)
|
46
|
+
|
47
|
+
data = Twilio::Values.of({
|
48
|
+
'AccountSid' => account_sid,
|
49
|
+
'FriendlyName' => friendly_name,
|
50
|
+
'KeyType' => key_type,
|
51
|
+
'Policy' => Twilio.serialize_object(policy),
|
52
|
+
})
|
53
|
+
|
54
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
55
|
+
|
56
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
57
|
+
NewApiKeyInstance.new(
|
58
|
+
@version,
|
59
|
+
payload,
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
# Provide a user friendly representation
|
67
|
+
def to_s
|
68
|
+
'#<Twilio.Iam.V1.NewApiKeyList>'
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class NewApiKeyPage < Page
|
73
|
+
##
|
74
|
+
# Initialize the NewApiKeyPage
|
75
|
+
# @param [Version] version Version that contains the resource
|
76
|
+
# @param [Response] response Response from the API
|
77
|
+
# @param [Hash] solution Path solution for the resource
|
78
|
+
# @return [NewApiKeyPage] NewApiKeyPage
|
79
|
+
def initialize(version, response, solution)
|
80
|
+
super(version, response)
|
81
|
+
|
82
|
+
# Path Solution
|
83
|
+
@solution = solution
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Build an instance of NewApiKeyInstance
|
88
|
+
# @param [Hash] payload Payload response from the API
|
89
|
+
# @return [NewApiKeyInstance] NewApiKeyInstance
|
90
|
+
def get_instance(payload)
|
91
|
+
NewApiKeyInstance.new(@version, payload)
|
92
|
+
end
|
93
|
+
|
94
|
+
##
|
95
|
+
# Provide a user friendly representation
|
96
|
+
def to_s
|
97
|
+
'<Twilio.Iam.V1.NewApiKeyPage>'
|
98
|
+
end
|
99
|
+
end
|
100
|
+
class NewApiKeyInstance < InstanceResource
|
101
|
+
##
|
102
|
+
# Initialize the NewApiKeyInstance
|
103
|
+
# @param [Version] version Version that contains the resource
|
104
|
+
# @param [Hash] payload payload that contains response from Twilio
|
105
|
+
# @param [String] account_sid The SID of the
|
106
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this NewApiKey
|
107
|
+
# resource.
|
108
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
109
|
+
# @return [NewApiKeyInstance] NewApiKeyInstance
|
110
|
+
def initialize(version, payload )
|
111
|
+
super(version)
|
112
|
+
|
113
|
+
# Marshaled Properties
|
114
|
+
@properties = {
|
115
|
+
'sid' => payload['sid'],
|
116
|
+
'friendly_name' => payload['friendly_name'],
|
117
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
118
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
119
|
+
'secret' => payload['secret'],
|
120
|
+
'policy' => payload['policy'],
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
124
|
+
|
125
|
+
##
|
126
|
+
# @return [String] The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
|
127
|
+
def sid
|
128
|
+
@properties['sid']
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# @return [String] The string that you assigned to describe the resource.
|
133
|
+
def friendly_name
|
134
|
+
@properties['friendly_name']
|
135
|
+
end
|
136
|
+
|
137
|
+
##
|
138
|
+
# @return [Time] The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
139
|
+
def date_created
|
140
|
+
@properties['date_created']
|
141
|
+
end
|
142
|
+
|
143
|
+
##
|
144
|
+
# @return [Time] The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
145
|
+
def date_updated
|
146
|
+
@properties['date_updated']
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# @return [String] The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
|
151
|
+
def secret
|
152
|
+
@properties['secret']
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# @return [Hash] Collection of allow assertions.
|
157
|
+
def policy
|
158
|
+
@properties['policy']
|
159
|
+
end
|
160
|
+
|
161
|
+
##
|
162
|
+
# Provide a user friendly representation
|
163
|
+
def to_s
|
164
|
+
"<Twilio.Iam.V1.NewApiKeyInstance>"
|
165
|
+
end
|
166
|
+
|
167
|
+
##
|
168
|
+
# Provide a detailed, user friendly representation
|
169
|
+
def inspect
|
170
|
+
"<Twilio.Iam.V1.NewApiKeyInstance>"
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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
|
+
module Twilio
|
16
|
+
module REST
|
17
|
+
class Iam
|
18
|
+
class V1 < Version
|
19
|
+
##
|
20
|
+
# Initialize the V1 version of Iam
|
21
|
+
def initialize(domain)
|
22
|
+
super
|
23
|
+
@version = 'v1'
|
24
|
+
@api_key = nil
|
25
|
+
@get_api_keys = nil
|
26
|
+
@new_api_key = nil
|
27
|
+
end
|
28
|
+
|
29
|
+
##
|
30
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the Key resource to fetch.
|
31
|
+
# @return [Twilio::REST::Iam::V1::ApiKeyContext] if sid was passed.
|
32
|
+
# @return [Twilio::REST::Iam::V1::ApiKeyList]
|
33
|
+
def api_key(sid=:unset)
|
34
|
+
if sid.nil?
|
35
|
+
raise ArgumentError, 'sid cannot be nil'
|
36
|
+
end
|
37
|
+
if sid == :unset
|
38
|
+
@api_key ||= ApiKeyList.new self
|
39
|
+
else
|
40
|
+
ApiKeyContext.new(self, sid)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
##
|
44
|
+
# @return [Twilio::REST::Iam::V1::GetApiKeysList]
|
45
|
+
def get_api_keys
|
46
|
+
@get_api_keys ||= GetApiKeysList.new self
|
47
|
+
end
|
48
|
+
##
|
49
|
+
# @return [Twilio::REST::Iam::V1::NewApiKeyList]
|
50
|
+
def new_api_key
|
51
|
+
@new_api_key ||= NewApiKeyList.new self
|
52
|
+
end
|
53
|
+
##
|
54
|
+
# Provide a user friendly representation
|
55
|
+
def to_s
|
56
|
+
'<Twilio::REST::Iam::V1>';
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -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 IamBase < Domain
|
14
|
+
##
|
15
|
+
# Initialize iam domain
|
16
|
+
#
|
17
|
+
# @param twilio - The twilio client
|
18
|
+
#
|
19
|
+
def initialize(twilio)
|
20
|
+
super(twilio)
|
21
|
+
@base_url = "https://iam.twilio.com"
|
22
|
+
@host = "iam.twilio.com"
|
23
|
+
@port = 443
|
24
|
+
@v1 = nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def v1
|
28
|
+
@v1 ||= Iam::V1.new self
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Provide a user friendly representation
|
33
|
+
def to_s
|
34
|
+
'<Twilio::REST::Iam::V1>';
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -166,7 +166,7 @@ module Twilio
|
|
166
166
|
'losing_carrier_information' => payload['losing_carrier_information'],
|
167
167
|
'phone_numbers' => payload['phone_numbers'],
|
168
168
|
'documents' => payload['documents'],
|
169
|
-
'date_created' => Twilio.
|
169
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
170
170
|
}
|
171
171
|
|
172
172
|
# Context
|
@@ -252,7 +252,7 @@ module Twilio
|
|
252
252
|
end
|
253
253
|
|
254
254
|
##
|
255
|
-
# @return [
|
255
|
+
# @return [Time]
|
256
256
|
def date_created
|
257
257
|
@properties['date_created']
|
258
258
|
end
|
@@ -283,6 +283,7 @@ module Twilio
|
|
283
283
|
'mime_type' => payload['mime_type'],
|
284
284
|
'status' => payload['status'],
|
285
285
|
'failure_reason' => payload['failure_reason'],
|
286
|
+
'errors' => payload['errors'],
|
286
287
|
'type' => payload['type'],
|
287
288
|
'attributes' => payload['attributes'],
|
288
289
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
@@ -342,6 +343,12 @@ module Twilio
|
|
342
343
|
@properties['failure_reason']
|
343
344
|
end
|
344
345
|
|
346
|
+
##
|
347
|
+
# @return [Array<Hash>] A list of errors that occurred during the registering RC Bundle
|
348
|
+
def errors
|
349
|
+
@properties['errors']
|
350
|
+
end
|
351
|
+
|
345
352
|
##
|
346
353
|
# @return [String] The type of the Supporting Document.
|
347
354
|
def type
|
data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb
CHANGED
@@ -227,7 +227,7 @@ module Twilio
|
|
227
227
|
end
|
228
228
|
|
229
229
|
##
|
230
|
-
# @return [String] The total number of Workers available
|
230
|
+
# @return [String] The total number of Workers in the TaskQueue with an `available` status. Workers with an `available` status may already have active interactions or may have none.
|
231
231
|
def total_available_workers
|
232
232
|
@properties['total_available_workers']
|
233
233
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -460,6 +460,12 @@ files:
|
|
460
460
|
- lib/twilio-ruby/rest/frontline_api/v1.rb
|
461
461
|
- lib/twilio-ruby/rest/frontline_api/v1/user.rb
|
462
462
|
- lib/twilio-ruby/rest/frontline_api_base.rb
|
463
|
+
- lib/twilio-ruby/rest/iam.rb
|
464
|
+
- lib/twilio-ruby/rest/iam/v1.rb
|
465
|
+
- lib/twilio-ruby/rest/iam/v1/api_key.rb
|
466
|
+
- lib/twilio-ruby/rest/iam/v1/get_api_keys.rb
|
467
|
+
- lib/twilio-ruby/rest/iam/v1/new_api_key.rb
|
468
|
+
- lib/twilio-ruby/rest/iam_base.rb
|
463
469
|
- lib/twilio-ruby/rest/insights.rb
|
464
470
|
- lib/twilio-ruby/rest/insights/v1.rb
|
465
471
|
- lib/twilio-ruby/rest/insights/v1/call.rb
|