twilio-ruby 7.11.2 → 7.12.0
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/.github/workflows/test-and-deploy.yml +13 -1
- data/CHANGES.md +272 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/githooks/pre-commit +11 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/content/v1/content.rb +2 -2
- data/lib/twilio-ruby/rest/conversations/v2/action.rb +9 -2
- data/lib/twilio-ruby/rest/conversations/v2/communication.rb +4 -1
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +133 -12
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb +774 -0
- data/lib/twilio-ruby/rest/{numbers/v1/voice_verification_check.rb → insights/v3/custom_field_mappings_capacity.rb} +44 -48
- data/lib/twilio-ruby/rest/insights/v3.rb +22 -0
- data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +33 -1
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +5 -5
- data/lib/twilio-ruby/rest/memory/v1/data_mapping.rb +3 -3
- data/lib/twilio-ruby/rest/memory/v1/observation.rb +9 -9
- data/lib/twilio-ruby/rest/memory/v1/revision.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/store.rb +3 -3
- data/lib/twilio-ruby/rest/memory/v1/trait_group.rb +3 -3
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +30 -2
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +30 -6
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +30 -6
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +45 -6
- data/lib/twilio-ruby/rest/numbers/v1.rb +0 -6
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +40 -0
- data/lib/twilio-ruby/rest/routes/v3/iso_country_code.rb +402 -0
- data/lib/twilio-ruby/rest/routes/v3.rb +43 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb +547 -0
- data/lib/twilio-ruby/rest/voice/v2.rb +6 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +12 -6
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -3
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
+
#
|
|
7
|
+
# Twilio - Routes
|
|
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 Routes < RoutesBase
|
|
19
|
+
class V3 < Version
|
|
20
|
+
class IsoCountryCodeList < ListResource
|
|
21
|
+
|
|
22
|
+
##
|
|
23
|
+
# Initialize the IsoCountryCodeList
|
|
24
|
+
# @param [Version] version Version that contains the resource
|
|
25
|
+
# @return [IsoCountryCodeList] IsoCountryCodeList
|
|
26
|
+
def initialize(version)
|
|
27
|
+
|
|
28
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
29
|
+
super(apiV1Version)
|
|
30
|
+
# Path Solution
|
|
31
|
+
@solution = { }
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Provide a user friendly representation
|
|
39
|
+
def to_s
|
|
40
|
+
'#<Twilio.Routes.V3.IsoCountryCodeList>'
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class IsoCountryCodeContext < InstanceContext
|
|
46
|
+
##
|
|
47
|
+
# Initialize the IsoCountryCodeContext
|
|
48
|
+
# @param [Version] version Version that contains the resource
|
|
49
|
+
# @param [String] iso_country_code The ISO country code of the short code
|
|
50
|
+
# @param [String] short_code The short code
|
|
51
|
+
# @return [IsoCountryCodeContext] IsoCountryCodeContext
|
|
52
|
+
def initialize(version, iso_country_code, short_code)
|
|
53
|
+
|
|
54
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
55
|
+
super(apiV1Version)
|
|
56
|
+
|
|
57
|
+
# Path Solution
|
|
58
|
+
@solution = { iso_country_code: iso_country_code, short_code: short_code, }
|
|
59
|
+
@uri = "/ShortCodes/#{@solution[:iso_country_code]}/#{@solution[:short_code]}"
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
##
|
|
64
|
+
# Fetch the IsoCountryCodeInstance
|
|
65
|
+
# @return [IsoCountryCodeInstance] Fetched IsoCountryCodeInstance
|
|
66
|
+
def fetch
|
|
67
|
+
|
|
68
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
|
75
|
+
IsoCountryCodeInstance.new(
|
|
76
|
+
@version,
|
|
77
|
+
payload,
|
|
78
|
+
iso_country_code: @solution[:iso_country_code],
|
|
79
|
+
short_code: @solution[:short_code],
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
##
|
|
84
|
+
# Fetch the IsoCountryCodeInstanceMetadata
|
|
85
|
+
# @return [IsoCountryCodeInstance] Fetched IsoCountryCodeInstance
|
|
86
|
+
def fetch_with_metadata
|
|
87
|
+
|
|
88
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
response = @version.fetch_with_metadata('GET', @uri, headers: headers)
|
|
95
|
+
iso_country_code_instance = IsoCountryCodeInstance.new(
|
|
96
|
+
@version,
|
|
97
|
+
response.body,
|
|
98
|
+
iso_country_code: @solution[:iso_country_code],
|
|
99
|
+
short_code: @solution[:short_code],
|
|
100
|
+
)
|
|
101
|
+
IsoCountryCodeInstanceMetadata.new(
|
|
102
|
+
@version,
|
|
103
|
+
iso_country_code_instance,
|
|
104
|
+
response.headers,
|
|
105
|
+
response.status_code
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
##
|
|
110
|
+
# Update the IsoCountryCodeInstance
|
|
111
|
+
# @param [String] messaging_region The Processing Region used for this short code for messaging
|
|
112
|
+
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
|
113
|
+
# @return [IsoCountryCodeInstance] Updated IsoCountryCodeInstance
|
|
114
|
+
def update(
|
|
115
|
+
messaging_region: :unset,
|
|
116
|
+
friendly_name: :unset
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
data = Twilio::Values.of({
|
|
120
|
+
'messagingRegion' => messaging_region,
|
|
121
|
+
'friendlyName' => friendly_name,
|
|
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
|
+
IsoCountryCodeInstance.new(
|
|
132
|
+
@version,
|
|
133
|
+
payload,
|
|
134
|
+
iso_country_code: @solution[:iso_country_code],
|
|
135
|
+
short_code: @solution[:short_code],
|
|
136
|
+
)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
##
|
|
140
|
+
# Update the IsoCountryCodeInstanceMetadata
|
|
141
|
+
# @param [String] messaging_region The Processing Region used for this short code for messaging
|
|
142
|
+
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
|
143
|
+
# @return [IsoCountryCodeInstance] Updated IsoCountryCodeInstance
|
|
144
|
+
def update_with_metadata(
|
|
145
|
+
messaging_region: :unset,
|
|
146
|
+
friendly_name: :unset
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
data = Twilio::Values.of({
|
|
150
|
+
'messagingRegion' => messaging_region,
|
|
151
|
+
'friendlyName' => friendly_name,
|
|
152
|
+
})
|
|
153
|
+
|
|
154
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
response = @version.update_with_metadata('POST', @uri, data: data, headers: headers)
|
|
161
|
+
iso_country_code_instance = IsoCountryCodeInstance.new(
|
|
162
|
+
@version,
|
|
163
|
+
response.body,
|
|
164
|
+
iso_country_code: @solution[:iso_country_code],
|
|
165
|
+
short_code: @solution[:short_code],
|
|
166
|
+
)
|
|
167
|
+
IsoCountryCodeInstanceMetadata.new(
|
|
168
|
+
@version,
|
|
169
|
+
iso_country_code_instance,
|
|
170
|
+
response.headers,
|
|
171
|
+
response.status_code
|
|
172
|
+
)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
##
|
|
177
|
+
# Provide a user friendly representation
|
|
178
|
+
def to_s
|
|
179
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
180
|
+
"#<Twilio.Routes.V3.IsoCountryCodeContext #{context}>"
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
##
|
|
184
|
+
# Provide a detailed, user friendly representation
|
|
185
|
+
def inspect
|
|
186
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
187
|
+
"#<Twilio.Routes.V3.IsoCountryCodeContext #{context}>"
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
class IsoCountryCodeInstanceMetadata < InstanceResourceMetadata
|
|
192
|
+
##
|
|
193
|
+
# Initializes a new IsoCountryCodeInstanceMetadata.
|
|
194
|
+
# @param [Version] version Version that contains the resource
|
|
195
|
+
# @param [}IsoCountryCodeInstance] iso_country_code_instance The instance associated with the metadata.
|
|
196
|
+
# @param [Hash] headers Header object with response headers.
|
|
197
|
+
# @param [Integer] status_code The HTTP status code of the response.
|
|
198
|
+
# @return [IsoCountryCodeInstanceMetadata] The initialized instance with metadata.
|
|
199
|
+
def initialize(version, iso_country_code_instance, headers, status_code)
|
|
200
|
+
super(version, headers, status_code)
|
|
201
|
+
@iso_country_code_instance = iso_country_code_instance
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
def iso_country_code
|
|
205
|
+
@iso_country_code_instance
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
def headers
|
|
209
|
+
@headers
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
def status_code
|
|
213
|
+
@status_code
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
def to_s
|
|
217
|
+
"<Twilio.Api.V2010.IsoCountryCodeInstanceMetadata status=#{@status_code}>"
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
class IsoCountryCodeListResponse < InstanceListResource
|
|
222
|
+
# @param [Array<IsoCountryCodeInstance>] instance
|
|
223
|
+
# @param [Hash{String => Object}] headers
|
|
224
|
+
# @param [Integer] status_code
|
|
225
|
+
def initialize(version, payload, key)
|
|
226
|
+
@iso_country_code_instance = payload.body[key].map do |data|
|
|
227
|
+
IsoCountryCodeInstance.new(version, data)
|
|
228
|
+
end
|
|
229
|
+
@headers = payload.headers
|
|
230
|
+
@status_code = payload.status_code
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
def iso_country_code_instance
|
|
234
|
+
@instance
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
class IsoCountryCodePage < TokenPage
|
|
239
|
+
##
|
|
240
|
+
# Initialize the IsoCountryCodePage
|
|
241
|
+
# @param [Version] version Version that contains the resource
|
|
242
|
+
# @param [Response] response Response from the API
|
|
243
|
+
# @param [Hash] solution Path solution for the resource
|
|
244
|
+
# @return [IsoCountryCodePage] IsoCountryCodePage
|
|
245
|
+
def initialize(version, response, solution)
|
|
246
|
+
|
|
247
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
248
|
+
super(apiV1Version, response)
|
|
249
|
+
|
|
250
|
+
# Path Solution
|
|
251
|
+
@solution = solution
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
##
|
|
255
|
+
# Build an instance of IsoCountryCodeInstance
|
|
256
|
+
# @param [Hash] payload Payload response from the API
|
|
257
|
+
# @return [IsoCountryCodeInstance] IsoCountryCodeInstance
|
|
258
|
+
def get_instance(payload)
|
|
259
|
+
IsoCountryCodeInstance.new(@version, payload)
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
##
|
|
263
|
+
# Provide a user friendly representation
|
|
264
|
+
def to_s
|
|
265
|
+
'<Twilio.Routes.V3.IsoCountryCodePage>'
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
class IsoCountryCodeInstance < InstanceResource
|
|
270
|
+
##
|
|
271
|
+
# Initialize the IsoCountryCodeInstance
|
|
272
|
+
# @param [Version] version Version that contains the resource
|
|
273
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
274
|
+
# @param [String] account_sid The SID of the
|
|
275
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this IsoCountryCode
|
|
276
|
+
# resource.
|
|
277
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
278
|
+
# @return [IsoCountryCodeInstance] IsoCountryCodeInstance
|
|
279
|
+
def initialize(version, payload , iso_country_code: nil, short_code: nil)
|
|
280
|
+
|
|
281
|
+
apiV1Version = ApiV1Version.new version.domain, version
|
|
282
|
+
super(apiV1Version)
|
|
283
|
+
|
|
284
|
+
# Marshaled Properties
|
|
285
|
+
@properties = {
|
|
286
|
+
'iso_country_code' => payload['iso_country_code'],
|
|
287
|
+
'short_code' => payload['short_code'],
|
|
288
|
+
'url' => payload['url'],
|
|
289
|
+
'account_sid' => payload['account_sid'],
|
|
290
|
+
'friendly_name' => payload['friendly_name'],
|
|
291
|
+
'messaging_region' => payload['messaging_region'],
|
|
292
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
293
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
# Context
|
|
297
|
+
@instance_context = nil
|
|
298
|
+
@params = { 'iso_country_code' => iso_country_code || @properties['iso_country_code'] ,'short_code' => short_code || @properties['short_code'] , }
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
##
|
|
302
|
+
# Generate an instance context for the instance, the context is capable of
|
|
303
|
+
# performing various actions. All instance actions are proxied to the context
|
|
304
|
+
# @return [IsoCountryCodeContext] CallContext for this CallInstance
|
|
305
|
+
def context
|
|
306
|
+
unless @instance_context
|
|
307
|
+
@instance_context = IsoCountryCodeContext.new(@version , @params['iso_country_code'], @params['short_code'])
|
|
308
|
+
end
|
|
309
|
+
@instance_context
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
##
|
|
313
|
+
# @return [String] The ISO country code of the short code
|
|
314
|
+
def iso_country_code
|
|
315
|
+
@properties['iso_country_code']
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
##
|
|
319
|
+
# @return [String] The short code
|
|
320
|
+
def short_code
|
|
321
|
+
@properties['short_code']
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
##
|
|
325
|
+
# @return [String] The absolute URL of the resource.
|
|
326
|
+
def url
|
|
327
|
+
@properties['url']
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
##
|
|
331
|
+
# @return [String] The unique SID identifier of the Account.
|
|
332
|
+
def account_sid
|
|
333
|
+
@properties['account_sid']
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
##
|
|
337
|
+
# @return [String] A human readable description of the Inbound Processing Region assignment for this short code, up to 64 characters.
|
|
338
|
+
def friendly_name
|
|
339
|
+
@properties['friendly_name']
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
##
|
|
343
|
+
# @return [String] The Inbound Processing Region used for this short code for messaging.
|
|
344
|
+
def messaging_region
|
|
345
|
+
@properties['messaging_region']
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
##
|
|
349
|
+
# @return [Time] The date that this short code was assigned an Inbound Processing Region, given in ISO 8601 format.
|
|
350
|
+
def date_created
|
|
351
|
+
@properties['date_created']
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
##
|
|
355
|
+
# @return [Time] The date that the Inbound Processing Region was updated for this short code, given in ISO 8601 format.
|
|
356
|
+
def date_updated
|
|
357
|
+
@properties['date_updated']
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
##
|
|
361
|
+
# Fetch the IsoCountryCodeInstance
|
|
362
|
+
# @return [IsoCountryCodeInstance] Fetched IsoCountryCodeInstance
|
|
363
|
+
def fetch
|
|
364
|
+
|
|
365
|
+
context.fetch
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
##
|
|
369
|
+
# Update the IsoCountryCodeInstance
|
|
370
|
+
# @param [String] messaging_region The Processing Region used for this short code for messaging
|
|
371
|
+
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
|
372
|
+
# @return [IsoCountryCodeInstance] Updated IsoCountryCodeInstance
|
|
373
|
+
def update(
|
|
374
|
+
messaging_region: :unset,
|
|
375
|
+
friendly_name: :unset
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
context.update(
|
|
379
|
+
messaging_region: messaging_region,
|
|
380
|
+
friendly_name: friendly_name,
|
|
381
|
+
)
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
##
|
|
385
|
+
# Provide a user friendly representation
|
|
386
|
+
def to_s
|
|
387
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
388
|
+
"<Twilio.Routes.V3.IsoCountryCodeInstance #{values}>"
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
##
|
|
392
|
+
# Provide a detailed, user friendly representation
|
|
393
|
+
def inspect
|
|
394
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
395
|
+
"<Twilio.Routes.V3.IsoCountryCodeInstance #{values}>"
|
|
396
|
+
end
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
end
|
|
400
|
+
end
|
|
401
|
+
end
|
|
402
|
+
end
|
|
@@ -21,9 +21,52 @@ module Twilio
|
|
|
21
21
|
def initialize(domain)
|
|
22
22
|
super
|
|
23
23
|
@version = 'v3'
|
|
24
|
+
@iso_country_code = nil
|
|
24
25
|
@phone_numbers = nil
|
|
25
26
|
end
|
|
26
27
|
|
|
28
|
+
##
|
|
29
|
+
# @param [String] iso_country_code The ISO country code of the short code
|
|
30
|
+
# @param [String] short_code The short code
|
|
31
|
+
# @return [Twilio::REST::Routes::V3::IsoCountryCodeContext] if isoCountryCode was passed.
|
|
32
|
+
# @return [Twilio::REST::Routes::V3::IsoCountryCodeList]
|
|
33
|
+
def iso_country_code(iso_country_code=:unset, short_code=:unset)
|
|
34
|
+
if iso_country_code.nil?
|
|
35
|
+
raise ArgumentError, 'iso_country_code cannot be nil'
|
|
36
|
+
end
|
|
37
|
+
if short_code.nil?
|
|
38
|
+
raise ArgumentError, 'short_code cannot be nil'
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
if iso_country_code == :unset && short_code == :unset
|
|
42
|
+
@iso_country_code ||= IsoCountryCodeList.new self
|
|
43
|
+
elsif iso_country_code != :unset && short_code == :unset
|
|
44
|
+
IsoCountryCodeList.new(self, iso_country_code: iso_country_code)
|
|
45
|
+
else
|
|
46
|
+
IsoCountryCodeContext.new(self, iso_country_code, short_code)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
##
|
|
50
|
+
# @param [String] iso_country_code The ISO country code of the short code
|
|
51
|
+
# @param [String] short_code The short code
|
|
52
|
+
# @return [Twilio::REST::Routes::V3::IsoCountryCodeContext] if shortCode was passed.
|
|
53
|
+
# @return [Twilio::REST::Routes::V3::IsoCountryCodeList]
|
|
54
|
+
def iso_country_code(iso_country_code=:unset, short_code=:unset)
|
|
55
|
+
if iso_country_code.nil?
|
|
56
|
+
raise ArgumentError, 'iso_country_code cannot be nil'
|
|
57
|
+
end
|
|
58
|
+
if short_code.nil?
|
|
59
|
+
raise ArgumentError, 'short_code cannot be nil'
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
if iso_country_code == :unset && short_code == :unset
|
|
63
|
+
@iso_country_code ||= IsoCountryCodeList.new self
|
|
64
|
+
elsif iso_country_code != :unset && short_code == :unset
|
|
65
|
+
IsoCountryCodeList.new(self, iso_country_code: iso_country_code)
|
|
66
|
+
else
|
|
67
|
+
IsoCountryCodeContext.new(self, iso_country_code, short_code)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
27
70
|
##
|
|
28
71
|
# @param [String] phone_number The phone number in E.164 format
|
|
29
72
|
# @return [Twilio::REST::Routes::V3::PhoneNumberContext] if phoneNumber was passed.
|
|
@@ -635,7 +635,7 @@ module Twilio
|
|
|
635
635
|
end
|
|
636
636
|
|
|
637
637
|
##
|
|
638
|
-
# @return [Hash] Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg. `{\"os\": \"Android\"}`. Can be up to 1024 characters in length.
|
|
638
|
+
# @return [Hash] Custom metadata associated with the factor. This is added by the Device/SDK directly to allow for the inclusion of device information. It must be a stringified JSON with only strings values eg. `{\"os\": \"Android\"}`. Can be up to 1024 characters in length. For `passkeys` factors, it contains the `aaguid` of the authenticator once the factor is verified, and `date_last_approved` (ISO 8601) once the factor has been used to approve a challenge.
|
|
639
639
|
def metadata
|
|
640
640
|
@properties['metadata']
|
|
641
641
|
end
|
|
@@ -265,7 +265,7 @@ module Twilio
|
|
|
265
265
|
end
|
|
266
266
|
|
|
267
267
|
##
|
|
268
|
-
# @return [Hash]
|
|
268
|
+
# @return [Hash] Metadata associated with the factor. For `passkeys` factors, it contains the `aaguid` of the authenticator once the factor is verified, and `date_last_approved` (ISO 8601) once the factor has been used to approve a challenge.
|
|
269
269
|
def metadata
|
|
270
270
|
@properties['metadata']
|
|
271
271
|
end
|