twilio-ruby 5.59.0 → 5.61.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/deploy.yml +65 -0
- data/.github/workflows/test.yml +52 -0
- data/.gitignore +3 -1
- data/.rubocop.yml +1 -1
- data/CHANGES.md +91 -0
- data/Makefile +3 -4
- data/README.md +4 -4
- data/lib/twilio-ruby/jwt/access_token.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +7 -0
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +269 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +8 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +31 -6
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +384 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +390 -0
- data/lib/twilio-ruby/rest/media/v1.rb +60 -0
- data/lib/twilio-ruby/rest/media.rb +56 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +353 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +43 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +29 -3
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +416 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +16 -0
- data/lib/twilio-ruby/rest/supersim.rb +9 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +8 -2
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +8 -2
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +16 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +5 -5
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +9 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -3
- data/lib/twilio-ruby/rest/video/v1/room.rb +23 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +16 -26
- data/lib/twilio-ruby/twiml/voice_response.rb +613 -36
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +14 -4
- data/.travis.yml +0 -57
@@ -0,0 +1,416 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Supersim < Domain
|
12
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
15
|
+
class IpCommandList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the IpCommandList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [IpCommandList] IpCommandList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/IpCommands"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Create the IpCommandInstance
|
30
|
+
# @param [String] sim The `sid` or `unique_name` of the {Super
|
31
|
+
# SIM}[https://www.twilio.com/docs/iot/supersim/api/sim-resource] to send the IP
|
32
|
+
# Command to.
|
33
|
+
# @param [String] payload The payload to be delivered to the device.
|
34
|
+
# @param [String] device_port The device port to which the IP Command will be
|
35
|
+
# sent.
|
36
|
+
# @param [ip_command.PayloadType] payload_type Indicates how the payload is
|
37
|
+
# encoded. Either `text` or `binary`. Defaults to `text`.
|
38
|
+
# @param [String] callback_url The URL we should call using the `callback_method`
|
39
|
+
# after we have sent the IP Command.
|
40
|
+
# @param [String] callback_method The HTTP method we should use to call
|
41
|
+
# `callback_url`. Can be `GET` or `POST`, and the default is `POST`.
|
42
|
+
# @return [IpCommandInstance] Created IpCommandInstance
|
43
|
+
def create(sim: nil, payload: nil, device_port: nil, payload_type: :unset, callback_url: :unset, callback_method: :unset)
|
44
|
+
data = Twilio::Values.of({
|
45
|
+
'Sim' => sim,
|
46
|
+
'Payload' => payload,
|
47
|
+
'DevicePort' => device_port,
|
48
|
+
'PayloadType' => payload_type,
|
49
|
+
'CallbackUrl' => callback_url,
|
50
|
+
'CallbackMethod' => callback_method,
|
51
|
+
})
|
52
|
+
|
53
|
+
payload = @version.create('POST', @uri, data: data)
|
54
|
+
|
55
|
+
IpCommandInstance.new(@version, payload, )
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# Lists IpCommandInstance records from the API as a list.
|
60
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
61
|
+
# memory before returning.
|
62
|
+
# @param [String] sim The SID or unique name of the Sim resource that IP Command
|
63
|
+
# was sent to or from.
|
64
|
+
# @param [String] sim_iccid The ICCID of the Sim resource that IP Command was sent
|
65
|
+
# to or from.
|
66
|
+
# @param [ip_command.Status] status The status of the IP Command. Can be:
|
67
|
+
# `queued`, `sent`, `received` or `failed`. See the {IP Command Status
|
68
|
+
# Values}[https://www.twilio.com/docs/wireless/api/ipcommand-resource#status-values]
|
69
|
+
# for a description of each.
|
70
|
+
# @param [ip_command.Direction] direction The direction of the IP Command. Can be
|
71
|
+
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
72
|
+
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
73
|
+
# originated`.
|
74
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
75
|
+
# guarantees to never return more than limit. Default is no limit
|
76
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
77
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
78
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
79
|
+
# efficient page size, i.e. min(limit, 1000)
|
80
|
+
# @return [Array] Array of up to limit results
|
81
|
+
def list(sim: :unset, sim_iccid: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
82
|
+
self.stream(
|
83
|
+
sim: sim,
|
84
|
+
sim_iccid: sim_iccid,
|
85
|
+
status: status,
|
86
|
+
direction: direction,
|
87
|
+
limit: limit,
|
88
|
+
page_size: page_size
|
89
|
+
).entries
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# Streams IpCommandInstance records from the API as an Enumerable.
|
94
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
95
|
+
# is reached.
|
96
|
+
# @param [String] sim The SID or unique name of the Sim resource that IP Command
|
97
|
+
# was sent to or from.
|
98
|
+
# @param [String] sim_iccid The ICCID of the Sim resource that IP Command was sent
|
99
|
+
# to or from.
|
100
|
+
# @param [ip_command.Status] status The status of the IP Command. Can be:
|
101
|
+
# `queued`, `sent`, `received` or `failed`. See the {IP Command Status
|
102
|
+
# Values}[https://www.twilio.com/docs/wireless/api/ipcommand-resource#status-values]
|
103
|
+
# for a description of each.
|
104
|
+
# @param [ip_command.Direction] direction The direction of the IP Command. Can be
|
105
|
+
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
106
|
+
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
107
|
+
# originated`.
|
108
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
109
|
+
# guarantees to never return more than limit. Default is no limit.
|
110
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
111
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
112
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
113
|
+
# efficient page size, i.e. min(limit, 1000)
|
114
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
115
|
+
def stream(sim: :unset, sim_iccid: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
|
116
|
+
limits = @version.read_limits(limit, page_size)
|
117
|
+
|
118
|
+
page = self.page(
|
119
|
+
sim: sim,
|
120
|
+
sim_iccid: sim_iccid,
|
121
|
+
status: status,
|
122
|
+
direction: direction,
|
123
|
+
page_size: limits[:page_size],
|
124
|
+
)
|
125
|
+
|
126
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# When passed a block, yields IpCommandInstance records from the API.
|
131
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
132
|
+
# is reached.
|
133
|
+
def each
|
134
|
+
limits = @version.read_limits
|
135
|
+
|
136
|
+
page = self.page(page_size: limits[:page_size], )
|
137
|
+
|
138
|
+
@version.stream(page,
|
139
|
+
limit: limits[:limit],
|
140
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
141
|
+
end
|
142
|
+
|
143
|
+
##
|
144
|
+
# Retrieve a single page of IpCommandInstance records from the API.
|
145
|
+
# Request is executed immediately.
|
146
|
+
# @param [String] sim The SID or unique name of the Sim resource that IP Command
|
147
|
+
# was sent to or from.
|
148
|
+
# @param [String] sim_iccid The ICCID of the Sim resource that IP Command was sent
|
149
|
+
# to or from.
|
150
|
+
# @param [ip_command.Status] status The status of the IP Command. Can be:
|
151
|
+
# `queued`, `sent`, `received` or `failed`. See the {IP Command Status
|
152
|
+
# Values}[https://www.twilio.com/docs/wireless/api/ipcommand-resource#status-values]
|
153
|
+
# for a description of each.
|
154
|
+
# @param [ip_command.Direction] direction The direction of the IP Command. Can be
|
155
|
+
# `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
|
156
|
+
# `mobile terminated`, and `from_sim` is synonymous with the term `mobile
|
157
|
+
# originated`.
|
158
|
+
# @param [String] page_token PageToken provided by the API
|
159
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
160
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
161
|
+
# @return [Page] Page of IpCommandInstance
|
162
|
+
def page(sim: :unset, sim_iccid: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
163
|
+
params = Twilio::Values.of({
|
164
|
+
'Sim' => sim,
|
165
|
+
'SimIccid' => sim_iccid,
|
166
|
+
'Status' => status,
|
167
|
+
'Direction' => direction,
|
168
|
+
'PageToken' => page_token,
|
169
|
+
'Page' => page_number,
|
170
|
+
'PageSize' => page_size,
|
171
|
+
})
|
172
|
+
|
173
|
+
response = @version.page('GET', @uri, params: params)
|
174
|
+
|
175
|
+
IpCommandPage.new(@version, response, @solution)
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# Retrieve a single page of IpCommandInstance records from the API.
|
180
|
+
# Request is executed immediately.
|
181
|
+
# @param [String] target_url API-generated URL for the requested results page
|
182
|
+
# @return [Page] Page of IpCommandInstance
|
183
|
+
def get_page(target_url)
|
184
|
+
response = @version.domain.request(
|
185
|
+
'GET',
|
186
|
+
target_url
|
187
|
+
)
|
188
|
+
IpCommandPage.new(@version, response, @solution)
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# Provide a user friendly representation
|
193
|
+
def to_s
|
194
|
+
'#<Twilio.Supersim.V1.IpCommandList>'
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
200
|
+
class IpCommandPage < Page
|
201
|
+
##
|
202
|
+
# Initialize the IpCommandPage
|
203
|
+
# @param [Version] version Version that contains the resource
|
204
|
+
# @param [Response] response Response from the API
|
205
|
+
# @param [Hash] solution Path solution for the resource
|
206
|
+
# @return [IpCommandPage] IpCommandPage
|
207
|
+
def initialize(version, response, solution)
|
208
|
+
super(version, response)
|
209
|
+
|
210
|
+
# Path Solution
|
211
|
+
@solution = solution
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# Build an instance of IpCommandInstance
|
216
|
+
# @param [Hash] payload Payload response from the API
|
217
|
+
# @return [IpCommandInstance] IpCommandInstance
|
218
|
+
def get_instance(payload)
|
219
|
+
IpCommandInstance.new(@version, payload, )
|
220
|
+
end
|
221
|
+
|
222
|
+
##
|
223
|
+
# Provide a user friendly representation
|
224
|
+
def to_s
|
225
|
+
'<Twilio.Supersim.V1.IpCommandPage>'
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
##
|
230
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
231
|
+
class IpCommandContext < InstanceContext
|
232
|
+
##
|
233
|
+
# Initialize the IpCommandContext
|
234
|
+
# @param [Version] version Version that contains the resource
|
235
|
+
# @param [String] sid The SID of the IP Command resource to fetch.
|
236
|
+
# @return [IpCommandContext] IpCommandContext
|
237
|
+
def initialize(version, sid)
|
238
|
+
super(version)
|
239
|
+
|
240
|
+
# Path Solution
|
241
|
+
@solution = {sid: sid, }
|
242
|
+
@uri = "/IpCommands/#{@solution[:sid]}"
|
243
|
+
end
|
244
|
+
|
245
|
+
##
|
246
|
+
# Fetch the IpCommandInstance
|
247
|
+
# @return [IpCommandInstance] Fetched IpCommandInstance
|
248
|
+
def fetch
|
249
|
+
payload = @version.fetch('GET', @uri)
|
250
|
+
|
251
|
+
IpCommandInstance.new(@version, payload, sid: @solution[:sid], )
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# Provide a user friendly representation
|
256
|
+
def to_s
|
257
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
258
|
+
"#<Twilio.Supersim.V1.IpCommandContext #{context}>"
|
259
|
+
end
|
260
|
+
|
261
|
+
##
|
262
|
+
# Provide a detailed, user friendly representation
|
263
|
+
def inspect
|
264
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
265
|
+
"#<Twilio.Supersim.V1.IpCommandContext #{context}>"
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
##
|
270
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
271
|
+
class IpCommandInstance < InstanceResource
|
272
|
+
##
|
273
|
+
# Initialize the IpCommandInstance
|
274
|
+
# @param [Version] version Version that contains the resource
|
275
|
+
# @param [Hash] payload payload that contains response from Twilio
|
276
|
+
# @param [String] sid The SID of the IP Command resource to fetch.
|
277
|
+
# @return [IpCommandInstance] IpCommandInstance
|
278
|
+
def initialize(version, payload, sid: nil)
|
279
|
+
super(version)
|
280
|
+
|
281
|
+
# Marshaled Properties
|
282
|
+
@properties = {
|
283
|
+
'sid' => payload['sid'],
|
284
|
+
'account_sid' => payload['account_sid'],
|
285
|
+
'sim_sid' => payload['sim_sid'],
|
286
|
+
'sim_iccid' => payload['sim_iccid'],
|
287
|
+
'status' => payload['status'],
|
288
|
+
'direction' => payload['direction'],
|
289
|
+
'device_ip' => payload['device_ip'],
|
290
|
+
'device_port' => payload['device_port'].to_i,
|
291
|
+
'payload_type' => payload['payload_type'],
|
292
|
+
'payload' => payload['payload'],
|
293
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
294
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
295
|
+
'url' => payload['url'],
|
296
|
+
}
|
297
|
+
|
298
|
+
# Context
|
299
|
+
@instance_context = nil
|
300
|
+
@params = {'sid' => sid || @properties['sid'], }
|
301
|
+
end
|
302
|
+
|
303
|
+
##
|
304
|
+
# Generate an instance context for the instance, the context is capable of
|
305
|
+
# performing various actions. All instance actions are proxied to the context
|
306
|
+
# @return [IpCommandContext] IpCommandContext for this IpCommandInstance
|
307
|
+
def context
|
308
|
+
unless @instance_context
|
309
|
+
@instance_context = IpCommandContext.new(@version, @params['sid'], )
|
310
|
+
end
|
311
|
+
@instance_context
|
312
|
+
end
|
313
|
+
|
314
|
+
##
|
315
|
+
# @return [String] The unique string that identifies the resource
|
316
|
+
def sid
|
317
|
+
@properties['sid']
|
318
|
+
end
|
319
|
+
|
320
|
+
##
|
321
|
+
# @return [String] The SID of the Account that created the resource
|
322
|
+
def account_sid
|
323
|
+
@properties['account_sid']
|
324
|
+
end
|
325
|
+
|
326
|
+
##
|
327
|
+
# @return [String] The SID of the Super SIM that this IP Command was sent to or from
|
328
|
+
def sim_sid
|
329
|
+
@properties['sim_sid']
|
330
|
+
end
|
331
|
+
|
332
|
+
##
|
333
|
+
# @return [String] The ICCID of the Super SIM that this IP Command was sent to or from
|
334
|
+
def sim_iccid
|
335
|
+
@properties['sim_iccid']
|
336
|
+
end
|
337
|
+
|
338
|
+
##
|
339
|
+
# @return [ip_command.Status] The status of the IP Command
|
340
|
+
def status
|
341
|
+
@properties['status']
|
342
|
+
end
|
343
|
+
|
344
|
+
##
|
345
|
+
# @return [ip_command.Direction] The direction of the IP Command
|
346
|
+
def direction
|
347
|
+
@properties['direction']
|
348
|
+
end
|
349
|
+
|
350
|
+
##
|
351
|
+
# @return [String] The IP address of the device that the IP Command was sent to or received from
|
352
|
+
def device_ip
|
353
|
+
@properties['device_ip']
|
354
|
+
end
|
355
|
+
|
356
|
+
##
|
357
|
+
# @return [String] The port that the IP Command either originated from or was sent to
|
358
|
+
def device_port
|
359
|
+
@properties['device_port']
|
360
|
+
end
|
361
|
+
|
362
|
+
##
|
363
|
+
# @return [ip_command.PayloadType] The payload type of the IP Command
|
364
|
+
def payload_type
|
365
|
+
@properties['payload_type']
|
366
|
+
end
|
367
|
+
|
368
|
+
##
|
369
|
+
# @return [String] The payload of the IP Command sent to or from the Super SIM
|
370
|
+
def payload
|
371
|
+
@properties['payload']
|
372
|
+
end
|
373
|
+
|
374
|
+
##
|
375
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
376
|
+
def date_created
|
377
|
+
@properties['date_created']
|
378
|
+
end
|
379
|
+
|
380
|
+
##
|
381
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
382
|
+
def date_updated
|
383
|
+
@properties['date_updated']
|
384
|
+
end
|
385
|
+
|
386
|
+
##
|
387
|
+
# @return [String] The absolute URL of the IP Command resource
|
388
|
+
def url
|
389
|
+
@properties['url']
|
390
|
+
end
|
391
|
+
|
392
|
+
##
|
393
|
+
# Fetch the IpCommandInstance
|
394
|
+
# @return [IpCommandInstance] Fetched IpCommandInstance
|
395
|
+
def fetch
|
396
|
+
context.fetch
|
397
|
+
end
|
398
|
+
|
399
|
+
##
|
400
|
+
# Provide a user friendly representation
|
401
|
+
def to_s
|
402
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
403
|
+
"<Twilio.Supersim.V1.IpCommandInstance #{values}>"
|
404
|
+
end
|
405
|
+
|
406
|
+
##
|
407
|
+
# Provide a detailed, user friendly representation
|
408
|
+
def inspect
|
409
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
410
|
+
"<Twilio.Supersim.V1.IpCommandInstance #{values}>"
|
411
|
+
end
|
412
|
+
end
|
413
|
+
end
|
414
|
+
end
|
415
|
+
end
|
416
|
+
end
|
@@ -17,6 +17,7 @@ module Twilio
|
|
17
17
|
@version = 'v1'
|
18
18
|
@commands = nil
|
19
19
|
@fleets = nil
|
20
|
+
@ip_commands = nil
|
20
21
|
@networks = nil
|
21
22
|
@network_access_profiles = nil
|
22
23
|
@sims = nil
|
@@ -54,6 +55,21 @@ module Twilio
|
|
54
55
|
end
|
55
56
|
end
|
56
57
|
|
58
|
+
##
|
59
|
+
# @param [String] sid The SID of the IP Command resource to fetch.
|
60
|
+
# @return [Twilio::REST::Supersim::V1::IpCommandContext] if sid was passed.
|
61
|
+
# @return [Twilio::REST::Supersim::V1::IpCommandList]
|
62
|
+
def ip_commands(sid=:unset)
|
63
|
+
if sid.nil?
|
64
|
+
raise ArgumentError, 'sid cannot be nil'
|
65
|
+
end
|
66
|
+
if sid == :unset
|
67
|
+
@ip_commands ||= IpCommandList.new self
|
68
|
+
else
|
69
|
+
IpCommandContext.new(self, sid)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
57
73
|
##
|
58
74
|
# @param [String] sid The SID of the Network resource to fetch.
|
59
75
|
# @return [Twilio::REST::Supersim::V1::NetworkContext] if sid was passed.
|
@@ -46,6 +46,15 @@ module Twilio
|
|
46
46
|
self.v1.fleets(sid)
|
47
47
|
end
|
48
48
|
|
49
|
+
##
|
50
|
+
# @param [String] sid The unique string that we created to identify the IP Command
|
51
|
+
# resource.
|
52
|
+
# @return [Twilio::REST::Supersim::V1::IpCommandInstance] if sid was passed.
|
53
|
+
# @return [Twilio::REST::Supersim::V1::IpCommandList]
|
54
|
+
def ip_commands(sid=:unset)
|
55
|
+
self.v1.ip_commands(sid)
|
56
|
+
end
|
57
|
+
|
49
58
|
##
|
50
59
|
# @param [String] sid The unique string that we created to identify the Network
|
51
60
|
# resource.
|
@@ -119,6 +119,8 @@ module Twilio
|
|
119
119
|
# If provided, the Workspace will publish events to this URL, for example, to
|
120
120
|
# collect data for reporting. See {Workspace
|
121
121
|
# Events}[https://www.twilio.com/docs/taskrouter/api/event] for more information.
|
122
|
+
# This parameter supports Twilio's {Webhooks (HTTP callbacks) Connection
|
123
|
+
# Overrides}[https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides].
|
122
124
|
# @param [String] events_filter The list of Workspace events for which to call
|
123
125
|
# event_callback_url. For example, if `EventsFilter=task.created, task.canceled,
|
124
126
|
# worker.activity.update`, then TaskRouter will call event_callback_url only when
|
@@ -235,7 +237,9 @@ module Twilio
|
|
235
237
|
# when new Workers are created in the Workspace.
|
236
238
|
# @param [String] event_callback_url The URL we should call when an event occurs.
|
237
239
|
# See {Workspace Events}[https://www.twilio.com/docs/taskrouter/api/event] for
|
238
|
-
# more information.
|
240
|
+
# more information. This parameter supports Twilio's {Webhooks (HTTP callbacks)
|
241
|
+
# Connection
|
242
|
+
# Overrides}[https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides].
|
239
243
|
# @param [String] events_filter The list of Workspace events for which to call
|
240
244
|
# event_callback_url. For example if
|
241
245
|
# `EventsFilter=task.created,task.canceled,worker.activity.update`, then
|
@@ -598,7 +602,9 @@ module Twilio
|
|
598
602
|
# when new Workers are created in the Workspace.
|
599
603
|
# @param [String] event_callback_url The URL we should call when an event occurs.
|
600
604
|
# See {Workspace Events}[https://www.twilio.com/docs/taskrouter/api/event] for
|
601
|
-
# more information.
|
605
|
+
# more information. This parameter supports Twilio's {Webhooks (HTTP callbacks)
|
606
|
+
# Connection
|
607
|
+
# Overrides}[https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides].
|
602
608
|
# @param [String] events_filter The list of Workspace events for which to call
|
603
609
|
# event_callback_url. For example if
|
604
610
|
# `EventsFilter=task.created,task.canceled,worker.activity.update`, then
|
@@ -35,9 +35,15 @@ module Twilio
|
|
35
35
|
# external system, such as your user's UUID, GUID, or SID.
|
36
36
|
# @param [access_token.FactorTypes] factor_type The Type of this Factor. Eg.
|
37
37
|
# `push`
|
38
|
+
# @param [String] factor_friendly_name The friendly name of the factor that is
|
39
|
+
# going to be created with this access token
|
38
40
|
# @return [AccessTokenInstance] Created AccessTokenInstance
|
39
|
-
def create(identity: nil, factor_type: nil)
|
40
|
-
data = Twilio::Values.of({
|
41
|
+
def create(identity: nil, factor_type: nil, factor_friendly_name: :unset)
|
42
|
+
data = Twilio::Values.of({
|
43
|
+
'Identity' => identity,
|
44
|
+
'FactorType' => factor_type,
|
45
|
+
'FactorFriendlyName' => factor_friendly_name,
|
46
|
+
})
|
41
47
|
|
42
48
|
payload = @version.create('POST', @uri, data: data)
|
43
49
|
|
@@ -204,8 +204,8 @@ module Twilio
|
|
204
204
|
# for the first time. E.g. for a TOTP, the numeric code.
|
205
205
|
# @param [String] friendly_name The new friendly name of this Factor. It can be up
|
206
206
|
# to 64 characters.
|
207
|
-
# @param [String] config_notification_token For APN, the device token. For FCM
|
208
|
-
# registration token. It used to send the push notifications. Required when
|
207
|
+
# @param [String] config_notification_token For APN, the device token. For FCM,
|
208
|
+
# the registration token. It is used to send the push notifications. Required when
|
209
209
|
# `factor_type` is `push`. If specified, this value must be between 32 and 255
|
210
210
|
# characters long.
|
211
211
|
# @param [String] config_sdk_version The Verify Push SDK version used to configure
|
@@ -219,8 +219,12 @@ module Twilio
|
|
219
219
|
# Must be between 3 and 8, inclusive
|
220
220
|
# @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
|
221
221
|
# codes. Can be `sha1`, `sha256` or `sha512`
|
222
|
+
# @param [String] config_notification_platform The transport technology used to
|
223
|
+
# generate the Notification Token. Can be `apn`, `fcm` or `none`.
|
224
|
+
#
|
225
|
+
# Required when `factor_type` is `push`.
|
222
226
|
# @return [FactorInstance] Updated FactorInstance
|
223
|
-
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset)
|
227
|
+
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, config_notification_platform: :unset)
|
224
228
|
data = Twilio::Values.of({
|
225
229
|
'AuthPayload' => auth_payload,
|
226
230
|
'FriendlyName' => friendly_name,
|
@@ -230,6 +234,7 @@ module Twilio
|
|
230
234
|
'Config.Skew' => config_skew,
|
231
235
|
'Config.CodeLength' => config_code_length,
|
232
236
|
'Config.Alg' => config_alg,
|
237
|
+
'Config.NotificationPlatform' => config_notification_platform,
|
233
238
|
})
|
234
239
|
|
235
240
|
payload = @version.update('POST', @uri, data: data)
|
@@ -404,8 +409,8 @@ module Twilio
|
|
404
409
|
# for the first time. E.g. for a TOTP, the numeric code.
|
405
410
|
# @param [String] friendly_name The new friendly name of this Factor. It can be up
|
406
411
|
# to 64 characters.
|
407
|
-
# @param [String] config_notification_token For APN, the device token. For FCM
|
408
|
-
# registration token. It used to send the push notifications. Required when
|
412
|
+
# @param [String] config_notification_token For APN, the device token. For FCM,
|
413
|
+
# the registration token. It is used to send the push notifications. Required when
|
409
414
|
# `factor_type` is `push`. If specified, this value must be between 32 and 255
|
410
415
|
# characters long.
|
411
416
|
# @param [String] config_sdk_version The Verify Push SDK version used to configure
|
@@ -419,8 +424,12 @@ module Twilio
|
|
419
424
|
# Must be between 3 and 8, inclusive
|
420
425
|
# @param [factor.TotpAlgorithms] config_alg The algorithm used to derive the TOTP
|
421
426
|
# codes. Can be `sha1`, `sha256` or `sha512`
|
427
|
+
# @param [String] config_notification_platform The transport technology used to
|
428
|
+
# generate the Notification Token. Can be `apn`, `fcm` or `none`.
|
429
|
+
#
|
430
|
+
# Required when `factor_type` is `push`.
|
422
431
|
# @return [FactorInstance] Updated FactorInstance
|
423
|
-
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset)
|
432
|
+
def update(auth_payload: :unset, friendly_name: :unset, config_notification_token: :unset, config_sdk_version: :unset, config_time_step: :unset, config_skew: :unset, config_code_length: :unset, config_alg: :unset, config_notification_platform: :unset)
|
424
433
|
context.update(
|
425
434
|
auth_payload: auth_payload,
|
426
435
|
friendly_name: friendly_name,
|
@@ -430,6 +439,7 @@ module Twilio
|
|
430
439
|
config_skew: config_skew,
|
431
440
|
config_code_length: config_code_length,
|
432
441
|
config_alg: config_alg,
|
442
|
+
config_notification_platform: config_notification_platform,
|
433
443
|
)
|
434
444
|
end
|
435
445
|
|
@@ -56,13 +56,13 @@ module Twilio
|
|
56
56
|
#
|
57
57
|
# Required when `factor_type` is `push`.
|
58
58
|
# @param [new_factor.NotificationPlatforms] config_notification_platform The
|
59
|
-
# transport technology used to generate the Notification Token. Can be `apn
|
60
|
-
# `fcm`.
|
59
|
+
# transport technology used to generate the Notification Token. Can be `apn`,
|
60
|
+
# `fcm` or `none`.
|
61
61
|
#
|
62
62
|
# Required when `factor_type` is `push`.
|
63
|
-
# @param [String] config_notification_token For APN, the device token. For FCM
|
64
|
-
# registration token. It used to send the push notifications. Must be
|
65
|
-
# and 255 characters long.
|
63
|
+
# @param [String] config_notification_token For APN, the device token. For FCM,
|
64
|
+
# the registration token. It is used to send the push notifications. Must be
|
65
|
+
# between 32 and 255 characters long.
|
66
66
|
#
|
67
67
|
# Required when `factor_type` is `push`.
|
68
68
|
# @param [String] config_sdk_version The Verify Push SDK version used to configure
|
@@ -66,8 +66,14 @@ module Twilio
|
|
66
66
|
# Hash}[https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string]
|
67
67
|
# to be appended at the end of your verification SMS body. Applies only to SMS.
|
68
68
|
# Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`.
|
69
|
+
# @param [String] template_sid The message
|
70
|
+
# {template}[https://www.twilio.com/docs/verify/api/templates]. If provided, will
|
71
|
+
# override the default template for the Service. SMS channel only.
|
72
|
+
# @param [String] template_custom_substitutions A stringified JSON object in which
|
73
|
+
# the keys are the template's special variables and the values are the variables
|
74
|
+
# substitutions.
|
69
75
|
# @return [VerificationInstance] Created VerificationInstance
|
70
|
-
def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset)
|
76
|
+
def create(to: nil, channel: nil, custom_friendly_name: :unset, custom_message: :unset, send_digits: :unset, locale: :unset, custom_code: :unset, amount: :unset, payee: :unset, rate_limits: :unset, channel_configuration: :unset, app_hash: :unset, template_sid: :unset, template_custom_substitutions: :unset)
|
71
77
|
data = Twilio::Values.of({
|
72
78
|
'To' => to,
|
73
79
|
'Channel' => channel,
|
@@ -81,6 +87,8 @@ module Twilio
|
|
81
87
|
'RateLimits' => Twilio.serialize_object(rate_limits),
|
82
88
|
'ChannelConfiguration' => Twilio.serialize_object(channel_configuration),
|
83
89
|
'AppHash' => app_hash,
|
90
|
+
'TemplateSid' => template_sid,
|
91
|
+
'TemplateCustomSubstitutions' => template_custom_substitutions,
|
84
92
|
})
|
85
93
|
|
86
94
|
payload = @version.create('POST', @uri, data: data)
|