twilio-ruby 7.6.3 → 7.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +28 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +1 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +1 -1
- data/lib/twilio-ruby/rest/client.rb +0 -10
- data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +315 -0
- data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +390 -0
- data/lib/twilio-ruby/rest/lookups/v2/query.rb +456 -0
- data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +136 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +86 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +4 -4
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +133 -1
- data/lib/twilio-ruby/rest/numbers/v1/{porting_webhook_configuration_fetch.rb → webhook.rb} +20 -20
- data/lib/twilio-ruby/rest/numbers/v1.rb +6 -6
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +0 -27
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +2 -2
- data/lib/twilio-ruby/rest/{proxy/v1/service/short_code.rb → video/v1/room/transcriptions.rb} +110 -123
- data/lib/twilio-ruby/rest/video/v1/room.rb +27 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +24 -0
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +8 -20
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +0 -232
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +0 -213
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +0 -623
- data/lib/twilio-ruby/rest/knowledge/v1.rb +0 -49
- data/lib/twilio-ruby/rest/knowledge.rb +0 -6
- data/lib/twilio-ruby/rest/knowledge_base.rb +0 -38
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -382
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -375
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +0 -213
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -361
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -398
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -391
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -441
- data/lib/twilio-ruby/rest/microvisor/v1.rb +0 -94
- data/lib/twilio-ruby/rest/microvisor.rb +0 -24
- data/lib/twilio-ruby/rest/microvisor_base.rb +0 -38
@@ -0,0 +1,456 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Lookups
|
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 Lookups < LookupsBase
|
19
|
+
class V2 < Version
|
20
|
+
class QueryList < ListResource
|
21
|
+
|
22
|
+
class CallForwarding
|
23
|
+
# @param [call_forwarding_enabled]: [Boolean]
|
24
|
+
# @param [error_code]: [Integer]
|
25
|
+
attr_accessor :call_forwarding_enabled, :error_code
|
26
|
+
def initialize(payload)
|
27
|
+
@call_forwarding_enabled = payload["call_forwarding_enabled"]
|
28
|
+
@error_code = payload["error_code"]
|
29
|
+
end
|
30
|
+
def to_json(options = {})
|
31
|
+
{
|
32
|
+
"call_forwarding_enabled": @call_forwarding_enabled,
|
33
|
+
"error_code": @error_code,
|
34
|
+
}.to_json(options)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class CallerName
|
39
|
+
# @param [caller_name]: [String]
|
40
|
+
# @param [caller_type]: [String]
|
41
|
+
# @param [error_code]: [Integer]
|
42
|
+
attr_accessor :caller_name, :caller_type, :error_code
|
43
|
+
def initialize(payload)
|
44
|
+
@caller_name = payload["caller_name"]
|
45
|
+
@caller_type = payload["caller_type"]
|
46
|
+
@error_code = payload["error_code"]
|
47
|
+
end
|
48
|
+
def to_json(options = {})
|
49
|
+
{
|
50
|
+
"caller_name": @caller_name,
|
51
|
+
"caller_type": @caller_type,
|
52
|
+
"error_code": @error_code,
|
53
|
+
}.to_json(options)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class IdentityMatch
|
58
|
+
# @param [first_name_match]: [String]
|
59
|
+
# @param [last_name_match]: [String]
|
60
|
+
# @param [address_line_match]: [String]
|
61
|
+
# @param [city_match]: [String]
|
62
|
+
# @param [state_match]: [String]
|
63
|
+
# @param [postal_code_match]: [String]
|
64
|
+
# @param [country_code_match]: [String]
|
65
|
+
# @param [national_id_match]: [String]
|
66
|
+
# @param [date_of_birth_match]: [String]
|
67
|
+
# @param [summary_score]: [Integer]
|
68
|
+
# @param [error_code]: [Integer]
|
69
|
+
# @param [error_message]: [String]
|
70
|
+
attr_accessor :first_name_match, :last_name_match, :address_line_match, :city_match, :state_match, :postal_code_match, :country_code_match, :national_id_match, :date_of_birth_match, :summary_score, :error_code, :error_message
|
71
|
+
def initialize(payload)
|
72
|
+
@first_name_match = payload["first_name_match"]
|
73
|
+
@last_name_match = payload["last_name_match"]
|
74
|
+
@address_line_match = payload["address_line_match"]
|
75
|
+
@city_match = payload["city_match"]
|
76
|
+
@state_match = payload["state_match"]
|
77
|
+
@postal_code_match = payload["postal_code_match"]
|
78
|
+
@country_code_match = payload["country_code_match"]
|
79
|
+
@national_id_match = payload["national_id_match"]
|
80
|
+
@date_of_birth_match = payload["date_of_birth_match"]
|
81
|
+
@summary_score = payload["summary_score"]
|
82
|
+
@error_code = payload["error_code"]
|
83
|
+
@error_message = payload["error_message"]
|
84
|
+
end
|
85
|
+
def to_json(options = {})
|
86
|
+
{
|
87
|
+
"first_name_match": @first_name_match,
|
88
|
+
"last_name_match": @last_name_match,
|
89
|
+
"address_line_match": @address_line_match,
|
90
|
+
"city_match": @city_match,
|
91
|
+
"state_match": @state_match,
|
92
|
+
"postal_code_match": @postal_code_match,
|
93
|
+
"country_code_match": @country_code_match,
|
94
|
+
"national_id_match": @national_id_match,
|
95
|
+
"date_of_birth_match": @date_of_birth_match,
|
96
|
+
"summary_score": @summary_score,
|
97
|
+
"error_code": @error_code,
|
98
|
+
"error_message": @error_message,
|
99
|
+
}.to_json(options)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class IdentityMatchParameters
|
104
|
+
# @param [first_name]: [String]
|
105
|
+
# @param [last_name]: [String]
|
106
|
+
# @param [address_line1]: [String]
|
107
|
+
# @param [address_line2]: [String]
|
108
|
+
# @param [city]: [String]
|
109
|
+
# @param [state]: [String]
|
110
|
+
# @param [postal_code]: [String]
|
111
|
+
# @param [address_country_code]: [String]
|
112
|
+
# @param [national_id]: [String]
|
113
|
+
# @param [date_of_birth]: [String]
|
114
|
+
attr_accessor :first_name, :last_name, :address_line1, :address_line2, :city, :state, :postal_code, :address_country_code, :national_id, :date_of_birth
|
115
|
+
def initialize(payload)
|
116
|
+
@first_name = payload["first_name"]
|
117
|
+
@last_name = payload["last_name"]
|
118
|
+
@address_line1 = payload["address_line1"]
|
119
|
+
@address_line2 = payload["address_line2"]
|
120
|
+
@city = payload["city"]
|
121
|
+
@state = payload["state"]
|
122
|
+
@postal_code = payload["postal_code"]
|
123
|
+
@address_country_code = payload["address_country_code"]
|
124
|
+
@national_id = payload["national_id"]
|
125
|
+
@date_of_birth = payload["date_of_birth"]
|
126
|
+
end
|
127
|
+
def to_json(options = {})
|
128
|
+
{
|
129
|
+
"first_name": @first_name,
|
130
|
+
"last_name": @last_name,
|
131
|
+
"address_line1": @address_line1,
|
132
|
+
"address_line2": @address_line2,
|
133
|
+
"city": @city,
|
134
|
+
"state": @state,
|
135
|
+
"postal_code": @postal_code,
|
136
|
+
"address_country_code": @address_country_code,
|
137
|
+
"national_id": @national_id,
|
138
|
+
"date_of_birth": @date_of_birth,
|
139
|
+
}.to_json(options)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
class LastSimSwap
|
144
|
+
# @param [last_sim_swap_date]: [Time]
|
145
|
+
# @param [swapped_period]: [String]
|
146
|
+
# @param [swapped_in_period]: [Boolean]
|
147
|
+
attr_accessor :last_sim_swap_date, :swapped_period, :swapped_in_period
|
148
|
+
def initialize(payload)
|
149
|
+
@last_sim_swap_date = payload["last_sim_swap_date"]
|
150
|
+
@swapped_period = payload["swapped_period"]
|
151
|
+
@swapped_in_period = payload["swapped_in_period"]
|
152
|
+
end
|
153
|
+
def to_json(options = {})
|
154
|
+
{
|
155
|
+
"last_sim_swap_date": @last_sim_swap_date,
|
156
|
+
"swapped_period": @swapped_period,
|
157
|
+
"swapped_in_period": @swapped_in_period,
|
158
|
+
}.to_json(options)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
class LineStatus
|
163
|
+
# @param [status]: [String]
|
164
|
+
# @param [error_code]: [Integer]
|
165
|
+
attr_accessor :status, :error_code
|
166
|
+
def initialize(payload)
|
167
|
+
@status = payload["status"]
|
168
|
+
@error_code = payload["error_code"]
|
169
|
+
end
|
170
|
+
def to_json(options = {})
|
171
|
+
{
|
172
|
+
"status": @status,
|
173
|
+
"error_code": @error_code,
|
174
|
+
}.to_json(options)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
class LineTypeIntelligence
|
179
|
+
# @param [type]: [String]
|
180
|
+
# @param [carrier_name]: [String]
|
181
|
+
# @param [mobile_country_code]: [String]
|
182
|
+
# @param [mobile_network_code]: [String]
|
183
|
+
# @param [error_code]: [Integer]
|
184
|
+
attr_accessor :type, :carrier_name, :mobile_country_code, :mobile_network_code, :error_code
|
185
|
+
def initialize(payload)
|
186
|
+
@type = payload["type"]
|
187
|
+
@carrier_name = payload["carrier_name"]
|
188
|
+
@mobile_country_code = payload["mobile_country_code"]
|
189
|
+
@mobile_network_code = payload["mobile_network_code"]
|
190
|
+
@error_code = payload["error_code"]
|
191
|
+
end
|
192
|
+
def to_json(options = {})
|
193
|
+
{
|
194
|
+
"type": @type,
|
195
|
+
"carrier_name": @carrier_name,
|
196
|
+
"mobile_country_code": @mobile_country_code,
|
197
|
+
"mobile_network_code": @mobile_network_code,
|
198
|
+
"error_code": @error_code,
|
199
|
+
}.to_json(options)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
class LookupRequest1
|
204
|
+
# @param [phone_numbers]: [Array<QueryList.LookupRequestWithCorId>]
|
205
|
+
attr_accessor :phone_numbers
|
206
|
+
def initialize(payload)
|
207
|
+
@phone_numbers = payload["phone_numbers"]
|
208
|
+
end
|
209
|
+
def to_json(options = {})
|
210
|
+
{
|
211
|
+
"phone_numbers": @phone_numbers,
|
212
|
+
}.to_json(options)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
class LookupRequestWithCorId
|
217
|
+
# @param [correlation_id]: [String] Unique identifier used to match request with response
|
218
|
+
# @param [phone_number]: [String]
|
219
|
+
# @param [fields]: [Array<String>]
|
220
|
+
# @param [country_code]: [String]
|
221
|
+
# @param [identity_match]: [QueryList.IdentityMatchParameters]
|
222
|
+
# @param [reassigned_number]: [QueryList.ReassignedNumberRequest]
|
223
|
+
# @param [sms_pumping_risk]: [QueryList.SmsPumpingRiskParameters]
|
224
|
+
attr_accessor :correlation_id, :phone_number, :fields, :country_code, :identity_match, :reassigned_number, :sms_pumping_risk
|
225
|
+
def initialize(payload)
|
226
|
+
@correlation_id = payload["correlation_id"]
|
227
|
+
@phone_number = payload["phone_number"]
|
228
|
+
@fields = payload["fields"]
|
229
|
+
@country_code = payload["country_code"]
|
230
|
+
@identity_match = payload["identity_match"]
|
231
|
+
@reassigned_number = payload["reassigned_number"]
|
232
|
+
@sms_pumping_risk = payload["sms_pumping_risk"]
|
233
|
+
end
|
234
|
+
def to_json(options = {})
|
235
|
+
{
|
236
|
+
"correlation_id": @correlation_id,
|
237
|
+
"phone_number": @phone_number,
|
238
|
+
"fields": @fields,
|
239
|
+
"country_code": @country_code,
|
240
|
+
"identity_match": @identity_match,
|
241
|
+
"reassigned_number": @reassigned_number,
|
242
|
+
"sms_pumping_risk": @sms_pumping_risk,
|
243
|
+
}.to_json(options)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
class ReassignedNumberRequest
|
248
|
+
# @param [last_verified_date]: [String]
|
249
|
+
attr_accessor :last_verified_date
|
250
|
+
def initialize(payload)
|
251
|
+
@last_verified_date = payload["last_verified_date"]
|
252
|
+
end
|
253
|
+
def to_json(options = {})
|
254
|
+
{
|
255
|
+
"last_verified_date": @last_verified_date,
|
256
|
+
}.to_json(options)
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
class ReassignedNumberResponse
|
261
|
+
# @param [last_verified_date]: [String]
|
262
|
+
# @param [is_number_reassigned]: [String]
|
263
|
+
# @param [error_code]: [String]
|
264
|
+
attr_accessor :last_verified_date, :is_number_reassigned, :error_code
|
265
|
+
def initialize(payload)
|
266
|
+
@last_verified_date = payload["last_verified_date"]
|
267
|
+
@is_number_reassigned = payload["is_number_reassigned"]
|
268
|
+
@error_code = payload["error_code"]
|
269
|
+
end
|
270
|
+
def to_json(options = {})
|
271
|
+
{
|
272
|
+
"last_verified_date": @last_verified_date,
|
273
|
+
"is_number_reassigned": @is_number_reassigned,
|
274
|
+
"error_code": @error_code,
|
275
|
+
}.to_json(options)
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
class SimSwap
|
280
|
+
# @param [last_sim_swap]: [LastSimSwap]
|
281
|
+
# @param [carrier_name]: [String]
|
282
|
+
# @param [mobile_country_code]: [String]
|
283
|
+
# @param [mobile_network_code]: [String]
|
284
|
+
# @param [error_code]: [Integer]
|
285
|
+
attr_accessor :last_sim_swap, :carrier_name, :mobile_country_code, :mobile_network_code, :error_code
|
286
|
+
def initialize(payload)
|
287
|
+
@last_sim_swap = payload["last_sim_swap"]
|
288
|
+
@carrier_name = payload["carrier_name"]
|
289
|
+
@mobile_country_code = payload["mobile_country_code"]
|
290
|
+
@mobile_network_code = payload["mobile_network_code"]
|
291
|
+
@error_code = payload["error_code"]
|
292
|
+
end
|
293
|
+
def to_json(options = {})
|
294
|
+
{
|
295
|
+
"last_sim_swap": @last_sim_swap,
|
296
|
+
"carrier_name": @carrier_name,
|
297
|
+
"mobile_country_code": @mobile_country_code,
|
298
|
+
"mobile_network_code": @mobile_network_code,
|
299
|
+
"error_code": @error_code,
|
300
|
+
}.to_json(options)
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
class SmsPumpingRisk
|
305
|
+
# @param [carrier_risk_category]: [String]
|
306
|
+
# @param [number_blocked]: [Boolean]
|
307
|
+
# @param [number_blocked_date]: [Time]
|
308
|
+
# @param [number_blocked_last_3_months]: [Boolean]
|
309
|
+
# @param [sms_pumping_risk_score]: [Integer]
|
310
|
+
# @param [error_code]: [Integer]
|
311
|
+
attr_accessor :carrier_risk_category, :number_blocked, :number_blocked_date, :number_blocked_last_3_months, :sms_pumping_risk_score, :error_code
|
312
|
+
def initialize(payload)
|
313
|
+
@carrier_risk_category = payload["carrier_risk_category"]
|
314
|
+
@number_blocked = payload["number_blocked"]
|
315
|
+
@number_blocked_date = payload["number_blocked_date"]
|
316
|
+
@number_blocked_last_3_months = payload["number_blocked_last_3_months"]
|
317
|
+
@sms_pumping_risk_score = payload["sms_pumping_risk_score"]
|
318
|
+
@error_code = payload["error_code"]
|
319
|
+
end
|
320
|
+
def to_json(options = {})
|
321
|
+
{
|
322
|
+
"carrier_risk_category": @carrier_risk_category,
|
323
|
+
"number_blocked": @number_blocked,
|
324
|
+
"number_blocked_date": @number_blocked_date,
|
325
|
+
"number_blocked_last_3_months": @number_blocked_last_3_months,
|
326
|
+
"sms_pumping_risk_score": @sms_pumping_risk_score,
|
327
|
+
"error_code": @error_code,
|
328
|
+
}.to_json(options)
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
class SmsPumpingRiskParameters
|
333
|
+
# @param [partner_sub_id]: [String]
|
334
|
+
attr_accessor :partner_sub_id
|
335
|
+
def initialize(payload)
|
336
|
+
@partner_sub_id = payload["partner_sub_id"]
|
337
|
+
end
|
338
|
+
def to_json(options = {})
|
339
|
+
{
|
340
|
+
"partner_sub_id": @partner_sub_id,
|
341
|
+
}.to_json(options)
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
|
346
|
+
##
|
347
|
+
# Initialize the QueryList
|
348
|
+
# @param [Version] version Version that contains the resource
|
349
|
+
# @return [QueryList] QueryList
|
350
|
+
def initialize(version)
|
351
|
+
super(version)
|
352
|
+
# Path Solution
|
353
|
+
@solution = { }
|
354
|
+
@uri = "/batch/query"
|
355
|
+
|
356
|
+
end
|
357
|
+
##
|
358
|
+
# Create the QueryInstance
|
359
|
+
# @param [LookupRequest1] lookup_request1
|
360
|
+
# @return [QueryInstance] Created QueryInstance
|
361
|
+
def create(lookup_request1: :unset
|
362
|
+
)
|
363
|
+
|
364
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
365
|
+
headers['Content-Type'] = 'application/json'
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
payload = @version.create('POST', @uri, headers: headers, data: lookup_request1.to_json)
|
371
|
+
QueryInstance.new(
|
372
|
+
@version,
|
373
|
+
payload,
|
374
|
+
)
|
375
|
+
end
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
# Provide a user friendly representation
|
381
|
+
def to_s
|
382
|
+
'#<Twilio.Lookups.V2.QueryList>'
|
383
|
+
end
|
384
|
+
end
|
385
|
+
|
386
|
+
class QueryPage < Page
|
387
|
+
##
|
388
|
+
# Initialize the QueryPage
|
389
|
+
# @param [Version] version Version that contains the resource
|
390
|
+
# @param [Response] response Response from the API
|
391
|
+
# @param [Hash] solution Path solution for the resource
|
392
|
+
# @return [QueryPage] QueryPage
|
393
|
+
def initialize(version, response, solution)
|
394
|
+
super(version, response)
|
395
|
+
|
396
|
+
# Path Solution
|
397
|
+
@solution = solution
|
398
|
+
end
|
399
|
+
|
400
|
+
##
|
401
|
+
# Build an instance of QueryInstance
|
402
|
+
# @param [Hash] payload Payload response from the API
|
403
|
+
# @return [QueryInstance] QueryInstance
|
404
|
+
def get_instance(payload)
|
405
|
+
QueryInstance.new(@version, payload)
|
406
|
+
end
|
407
|
+
|
408
|
+
##
|
409
|
+
# Provide a user friendly representation
|
410
|
+
def to_s
|
411
|
+
'<Twilio.Lookups.V2.QueryPage>'
|
412
|
+
end
|
413
|
+
end
|
414
|
+
class QueryInstance < InstanceResource
|
415
|
+
##
|
416
|
+
# Initialize the QueryInstance
|
417
|
+
# @param [Version] version Version that contains the resource
|
418
|
+
# @param [Hash] payload payload that contains response from Twilio
|
419
|
+
# @param [String] account_sid The SID of the
|
420
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Query
|
421
|
+
# resource.
|
422
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
423
|
+
# @return [QueryInstance] QueryInstance
|
424
|
+
def initialize(version, payload )
|
425
|
+
super(version)
|
426
|
+
|
427
|
+
# Marshaled Properties
|
428
|
+
@properties = {
|
429
|
+
'phone_numbers' => payload['phone_numbers'],
|
430
|
+
}
|
431
|
+
end
|
432
|
+
|
433
|
+
|
434
|
+
##
|
435
|
+
# @return [Array<LookupResponseWithCorId>]
|
436
|
+
def phone_numbers
|
437
|
+
@properties['phone_numbers']
|
438
|
+
end
|
439
|
+
|
440
|
+
##
|
441
|
+
# Provide a user friendly representation
|
442
|
+
def to_s
|
443
|
+
"<Twilio.Lookups.V2.QueryInstance>"
|
444
|
+
end
|
445
|
+
|
446
|
+
##
|
447
|
+
# Provide a detailed, user friendly representation
|
448
|
+
def inspect
|
449
|
+
"<Twilio.Lookups.V2.QueryInstance>"
|
450
|
+
end
|
451
|
+
end
|
452
|
+
|
453
|
+
end
|
454
|
+
end
|
455
|
+
end
|
456
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Lookups
|
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 Lookups < LookupsBase
|
19
|
+
class V2 < Version
|
20
|
+
class RateLimitList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the RateLimitList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [RateLimitList] RateLimitList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/RateLimits"
|
31
|
+
|
32
|
+
end
|
33
|
+
##
|
34
|
+
# Fetch the RateLimitInstance
|
35
|
+
# @param [Array[String]] fields
|
36
|
+
# @return [RateLimitInstance] Fetched RateLimitInstance
|
37
|
+
def fetch(
|
38
|
+
fields: :unset
|
39
|
+
)
|
40
|
+
|
41
|
+
params = Twilio::Values.of({
|
42
|
+
'Fields' => Twilio.serialize_list(fields) { |e| e },
|
43
|
+
})
|
44
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
payload = @version.fetch('GET', @uri, params: params, headers: headers)
|
51
|
+
RateLimitInstance.new(
|
52
|
+
@version,
|
53
|
+
payload,
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
# Provide a user friendly representation
|
61
|
+
def to_s
|
62
|
+
'#<Twilio.Lookups.V2.RateLimitList>'
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
class RateLimitPage < Page
|
67
|
+
##
|
68
|
+
# Initialize the RateLimitPage
|
69
|
+
# @param [Version] version Version that contains the resource
|
70
|
+
# @param [Response] response Response from the API
|
71
|
+
# @param [Hash] solution Path solution for the resource
|
72
|
+
# @return [RateLimitPage] RateLimitPage
|
73
|
+
def initialize(version, response, solution)
|
74
|
+
super(version, response)
|
75
|
+
|
76
|
+
# Path Solution
|
77
|
+
@solution = solution
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# Build an instance of RateLimitInstance
|
82
|
+
# @param [Hash] payload Payload response from the API
|
83
|
+
# @return [RateLimitInstance] RateLimitInstance
|
84
|
+
def get_instance(payload)
|
85
|
+
RateLimitInstance.new(@version, payload)
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Provide a user friendly representation
|
90
|
+
def to_s
|
91
|
+
'<Twilio.Lookups.V2.RateLimitPage>'
|
92
|
+
end
|
93
|
+
end
|
94
|
+
class RateLimitInstance < InstanceResource
|
95
|
+
##
|
96
|
+
# Initialize the RateLimitInstance
|
97
|
+
# @param [Version] version Version that contains the resource
|
98
|
+
# @param [Hash] payload payload that contains response from Twilio
|
99
|
+
# @param [String] account_sid The SID of the
|
100
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this RateLimit
|
101
|
+
# resource.
|
102
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
103
|
+
# @return [RateLimitInstance] RateLimitInstance
|
104
|
+
def initialize(version, payload )
|
105
|
+
super(version)
|
106
|
+
|
107
|
+
# Marshaled Properties
|
108
|
+
@properties = {
|
109
|
+
'rate_limits' => payload['rate_limits'],
|
110
|
+
}
|
111
|
+
end
|
112
|
+
|
113
|
+
|
114
|
+
##
|
115
|
+
# @return [Array<RateLimitResponse>]
|
116
|
+
def rate_limits
|
117
|
+
@properties['rate_limits']
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# Provide a user friendly representation
|
122
|
+
def to_s
|
123
|
+
"<Twilio.Lookups.V2.RateLimitInstance>"
|
124
|
+
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# Provide a detailed, user friendly representation
|
128
|
+
def inspect
|
129
|
+
"<Twilio.Lookups.V2.RateLimitInstance>"
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|