twilio-ruby 6.0.2 → 6.2.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 +25 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +4 -4
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +13 -13
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +22 -22
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +12 -12
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +13 -13
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +106 -99
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +12 -12
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +17 -4
- data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +229 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +245 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +30 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +348 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +403 -0
- data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +515 -0
- data/lib/twilio-ruby/rest/numbers/v2.rb +30 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +3 -3
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +7 -2
@@ -0,0 +1,515 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Numbers
|
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 Numbers < NumbersBase
|
19
|
+
class V2 < Version
|
20
|
+
class HostedNumberOrderList < ListResource
|
21
|
+
##
|
22
|
+
# Initialize the HostedNumberOrderList
|
23
|
+
# @param [Version] version Version that contains the resource
|
24
|
+
# @return [HostedNumberOrderList] HostedNumberOrderList
|
25
|
+
def initialize(version)
|
26
|
+
super(version)
|
27
|
+
# Path Solution
|
28
|
+
@solution = { }
|
29
|
+
@uri = "/HostedNumber/Orders"
|
30
|
+
|
31
|
+
end
|
32
|
+
##
|
33
|
+
# Create the HostedNumberOrderInstance
|
34
|
+
# @param [String] phone_number The number to host in [+E.164](https://en.wikipedia.org/wiki/E.164) format
|
35
|
+
# @param [String] contact_phone_number The contact phone number of the person authorized to sign the Authorization Document.
|
36
|
+
# @param [String] address_sid Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.
|
37
|
+
# @param [String] email Optional. Email of the owner of this phone number that is being hosted.
|
38
|
+
# @param [String] account_sid This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to.
|
39
|
+
# @param [String] friendly_name A 64 character string that is a human readable text that describes this resource.
|
40
|
+
# @param [Array[String]] cc_emails Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to.
|
41
|
+
# @param [String] sms_url The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource.
|
42
|
+
# @param [String] sms_method The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
|
43
|
+
# @param [String] sms_fallback_url A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource.
|
44
|
+
# @param [Boolean] sms_capability Used to specify that the SMS capability will be hosted on Twilio's platform.
|
45
|
+
# @param [String] sms_fallback_method The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
|
46
|
+
# @param [String] status_callback_url Optional. The Status Callback URL attached to the IncomingPhoneNumber resource.
|
47
|
+
# @param [String] status_callback_method Optional. The Status Callback Method attached to the IncomingPhoneNumber resource.
|
48
|
+
# @param [String] sms_application_sid Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application.
|
49
|
+
# @param [String] contact_title The title of the person authorized to sign the Authorization Document for this phone number.
|
50
|
+
# @return [HostedNumberOrderInstance] Created HostedNumberOrderInstance
|
51
|
+
def create(
|
52
|
+
phone_number: nil,
|
53
|
+
contact_phone_number: nil,
|
54
|
+
address_sid: nil,
|
55
|
+
email: nil,
|
56
|
+
account_sid: :unset,
|
57
|
+
friendly_name: :unset,
|
58
|
+
cc_emails: :unset,
|
59
|
+
sms_url: :unset,
|
60
|
+
sms_method: :unset,
|
61
|
+
sms_fallback_url: :unset,
|
62
|
+
sms_capability: :unset,
|
63
|
+
sms_fallback_method: :unset,
|
64
|
+
status_callback_url: :unset,
|
65
|
+
status_callback_method: :unset,
|
66
|
+
sms_application_sid: :unset,
|
67
|
+
contact_title: :unset
|
68
|
+
)
|
69
|
+
|
70
|
+
data = Twilio::Values.of({
|
71
|
+
'PhoneNumber' => phone_number,
|
72
|
+
'ContactPhoneNumber' => contact_phone_number,
|
73
|
+
'AddressSid' => address_sid,
|
74
|
+
'Email' => email,
|
75
|
+
'AccountSid' => account_sid,
|
76
|
+
'FriendlyName' => friendly_name,
|
77
|
+
'CcEmails' => Twilio.serialize_list(cc_emails) { |e| e },
|
78
|
+
'SmsUrl' => sms_url,
|
79
|
+
'SmsMethod' => sms_method,
|
80
|
+
'SmsFallbackUrl' => sms_fallback_url,
|
81
|
+
'SmsCapability' => sms_capability,
|
82
|
+
'SmsFallbackMethod' => sms_fallback_method,
|
83
|
+
'StatusCallbackUrl' => status_callback_url,
|
84
|
+
'StatusCallbackMethod' => status_callback_method,
|
85
|
+
'SmsApplicationSid' => sms_application_sid,
|
86
|
+
'ContactTitle' => contact_title,
|
87
|
+
})
|
88
|
+
|
89
|
+
payload = @version.create('POST', @uri, data: data)
|
90
|
+
HostedNumberOrderInstance.new(
|
91
|
+
@version,
|
92
|
+
payload,
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
|
97
|
+
##
|
98
|
+
# Lists HostedNumberOrderInstance records from the API as a list.
|
99
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
100
|
+
# memory before returning.
|
101
|
+
# @param [Status] status The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`.
|
102
|
+
# @param [Boolean] sms_capability Whether the SMS capability will be hosted on our platform. Can be `true` of `false`.
|
103
|
+
# @param [String] phone_number An E164 formatted phone number hosted by this HostedNumberOrder.
|
104
|
+
# @param [String] incoming_phone_number_sid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
|
105
|
+
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
106
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
107
|
+
# guarantees to never return more than limit. Default is no limit
|
108
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
109
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
110
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
111
|
+
# efficient page size, i.e. min(limit, 1000)
|
112
|
+
# @return [Array] Array of up to limit results
|
113
|
+
def list(status: :unset, sms_capability: :unset, phone_number: :unset, incoming_phone_number_sid: :unset, friendly_name: :unset, limit: nil, page_size: nil)
|
114
|
+
self.stream(
|
115
|
+
status: status,
|
116
|
+
sms_capability: sms_capability,
|
117
|
+
phone_number: phone_number,
|
118
|
+
incoming_phone_number_sid: incoming_phone_number_sid,
|
119
|
+
friendly_name: friendly_name,
|
120
|
+
limit: limit,
|
121
|
+
page_size: page_size
|
122
|
+
).entries
|
123
|
+
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# Streams Instance records from the API as an Enumerable.
|
127
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
128
|
+
# is reached.
|
129
|
+
# @param [Status] status The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`.
|
130
|
+
# @param [Boolean] sms_capability Whether the SMS capability will be hosted on our platform. Can be `true` of `false`.
|
131
|
+
# @param [String] phone_number An E164 formatted phone number hosted by this HostedNumberOrder.
|
132
|
+
# @param [String] incoming_phone_number_sid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
|
133
|
+
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
134
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
135
|
+
# guarantees to never return more than limit. Default is no limit
|
136
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
137
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
138
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
139
|
+
# efficient page size, i.e. min(limit, 1000)
|
140
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
141
|
+
def stream(status: :unset, sms_capability: :unset, phone_number: :unset, incoming_phone_number_sid: :unset, friendly_name: :unset, limit: nil, page_size: nil)
|
142
|
+
limits = @version.read_limits(limit, page_size)
|
143
|
+
|
144
|
+
page = self.page(
|
145
|
+
status: status,
|
146
|
+
sms_capability: sms_capability,
|
147
|
+
phone_number: phone_number,
|
148
|
+
incoming_phone_number_sid: incoming_phone_number_sid,
|
149
|
+
friendly_name: friendly_name,
|
150
|
+
page_size: limits[:page_size], )
|
151
|
+
|
152
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
153
|
+
end
|
154
|
+
|
155
|
+
##
|
156
|
+
# When passed a block, yields HostedNumberOrderInstance records from the API.
|
157
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
158
|
+
# is reached.
|
159
|
+
def each
|
160
|
+
limits = @version.read_limits
|
161
|
+
|
162
|
+
page = self.page(page_size: limits[:page_size], )
|
163
|
+
|
164
|
+
@version.stream(page,
|
165
|
+
limit: limits[:limit],
|
166
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# Retrieve a single page of HostedNumberOrderInstance records from the API.
|
171
|
+
# Request is executed immediately.
|
172
|
+
# @param [Status] status The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`.
|
173
|
+
# @param [Boolean] sms_capability Whether the SMS capability will be hosted on our platform. Can be `true` of `false`.
|
174
|
+
# @param [String] phone_number An E164 formatted phone number hosted by this HostedNumberOrder.
|
175
|
+
# @param [String] incoming_phone_number_sid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
|
176
|
+
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
177
|
+
# @param [String] page_token PageToken provided by the API
|
178
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
179
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
180
|
+
# @return [Page] Page of HostedNumberOrderInstance
|
181
|
+
def page(status: :unset, sms_capability: :unset, phone_number: :unset, incoming_phone_number_sid: :unset, friendly_name: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
182
|
+
params = Twilio::Values.of({
|
183
|
+
|
184
|
+
'Status' => status,
|
185
|
+
|
186
|
+
'SmsCapability' => sms_capability,
|
187
|
+
|
188
|
+
'PhoneNumber' => phone_number,
|
189
|
+
|
190
|
+
'IncomingPhoneNumberSid' => incoming_phone_number_sid,
|
191
|
+
|
192
|
+
'FriendlyName' => friendly_name,
|
193
|
+
|
194
|
+
'PageToken' => page_token,
|
195
|
+
'Page' => page_number,
|
196
|
+
'PageSize' => page_size,
|
197
|
+
})
|
198
|
+
|
199
|
+
response = @version.page('GET', @uri, params: params)
|
200
|
+
|
201
|
+
HostedNumberOrderPage.new(@version, response, @solution)
|
202
|
+
end
|
203
|
+
|
204
|
+
##
|
205
|
+
# Retrieve a single page of HostedNumberOrderInstance records from the API.
|
206
|
+
# Request is executed immediately.
|
207
|
+
# @param [String] target_url API-generated URL for the requested results page
|
208
|
+
# @return [Page] Page of HostedNumberOrderInstance
|
209
|
+
def get_page(target_url)
|
210
|
+
response = @version.domain.request(
|
211
|
+
'GET',
|
212
|
+
target_url
|
213
|
+
)
|
214
|
+
HostedNumberOrderPage.new(@version, response, @solution)
|
215
|
+
end
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
# Provide a user friendly representation
|
220
|
+
def to_s
|
221
|
+
'#<Twilio.Numbers.V2.HostedNumberOrderList>'
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
|
226
|
+
##
|
227
|
+
#PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
228
|
+
class HostedNumberOrderContext < InstanceContext
|
229
|
+
##
|
230
|
+
# Initialize the HostedNumberOrderContext
|
231
|
+
# @param [Version] version Version that contains the resource
|
232
|
+
# @param [String] sid A 34 character string that uniquely identifies this HostedNumberOrder.
|
233
|
+
# @return [HostedNumberOrderContext] HostedNumberOrderContext
|
234
|
+
def initialize(version, sid)
|
235
|
+
super(version)
|
236
|
+
|
237
|
+
# Path Solution
|
238
|
+
@solution = { sid: sid, }
|
239
|
+
@uri = "/HostedNumber/Orders/#{@solution[:sid]}"
|
240
|
+
|
241
|
+
|
242
|
+
end
|
243
|
+
##
|
244
|
+
# Delete the HostedNumberOrderInstance
|
245
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
246
|
+
def delete
|
247
|
+
|
248
|
+
@version.delete('DELETE', @uri)
|
249
|
+
end
|
250
|
+
|
251
|
+
##
|
252
|
+
# Fetch the HostedNumberOrderInstance
|
253
|
+
# @return [HostedNumberOrderInstance] Fetched HostedNumberOrderInstance
|
254
|
+
def fetch
|
255
|
+
|
256
|
+
payload = @version.fetch('GET', @uri)
|
257
|
+
HostedNumberOrderInstance.new(
|
258
|
+
@version,
|
259
|
+
payload,
|
260
|
+
sid: @solution[:sid],
|
261
|
+
)
|
262
|
+
end
|
263
|
+
|
264
|
+
|
265
|
+
##
|
266
|
+
# Provide a user friendly representation
|
267
|
+
def to_s
|
268
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
269
|
+
"#<Twilio.Numbers.V2.HostedNumberOrderContext #{context}>"
|
270
|
+
end
|
271
|
+
|
272
|
+
##
|
273
|
+
# Provide a detailed, user friendly representation
|
274
|
+
def inspect
|
275
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
276
|
+
"#<Twilio.Numbers.V2.HostedNumberOrderContext #{context}>"
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
class HostedNumberOrderPage < Page
|
281
|
+
##
|
282
|
+
# Initialize the HostedNumberOrderPage
|
283
|
+
# @param [Version] version Version that contains the resource
|
284
|
+
# @param [Response] response Response from the API
|
285
|
+
# @param [Hash] solution Path solution for the resource
|
286
|
+
# @return [HostedNumberOrderPage] HostedNumberOrderPage
|
287
|
+
def initialize(version, response, solution)
|
288
|
+
super(version, response)
|
289
|
+
|
290
|
+
# Path Solution
|
291
|
+
@solution = solution
|
292
|
+
end
|
293
|
+
|
294
|
+
##
|
295
|
+
# Build an instance of HostedNumberOrderInstance
|
296
|
+
# @param [Hash] payload Payload response from the API
|
297
|
+
# @return [HostedNumberOrderInstance] HostedNumberOrderInstance
|
298
|
+
def get_instance(payload)
|
299
|
+
HostedNumberOrderInstance.new(@version, payload)
|
300
|
+
end
|
301
|
+
|
302
|
+
##
|
303
|
+
# Provide a user friendly representation
|
304
|
+
def to_s
|
305
|
+
'<Twilio.Numbers.V2.HostedNumberOrderPage>'
|
306
|
+
end
|
307
|
+
end
|
308
|
+
class HostedNumberOrderInstance < InstanceResource
|
309
|
+
##
|
310
|
+
# Initialize the HostedNumberOrderInstance
|
311
|
+
# @param [Version] version Version that contains the resource
|
312
|
+
# @param [Hash] payload payload that contains response from Twilio
|
313
|
+
# @param [String] account_sid The SID of the
|
314
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this HostedNumberOrder
|
315
|
+
# resource.
|
316
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
317
|
+
# @return [HostedNumberOrderInstance] HostedNumberOrderInstance
|
318
|
+
def initialize(version, payload , sid: nil)
|
319
|
+
super(version)
|
320
|
+
|
321
|
+
# Marshaled Properties
|
322
|
+
@properties = {
|
323
|
+
'sid' => payload['sid'],
|
324
|
+
'account_sid' => payload['account_sid'],
|
325
|
+
'incoming_phone_number_sid' => payload['incoming_phone_number_sid'],
|
326
|
+
'address_sid' => payload['address_sid'],
|
327
|
+
'signing_document_sid' => payload['signing_document_sid'],
|
328
|
+
'phone_number' => payload['phone_number'],
|
329
|
+
'capabilities' => payload['capabilities'],
|
330
|
+
'friendly_name' => payload['friendly_name'],
|
331
|
+
'status' => payload['status'],
|
332
|
+
'failure_reason' => payload['failure_reason'],
|
333
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
334
|
+
'sms_capability' => payload['sms_capability'],
|
335
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
336
|
+
'email' => payload['email'],
|
337
|
+
'cc_emails' => payload['cc_emails'],
|
338
|
+
'url' => payload['url'],
|
339
|
+
'contact_title' => payload['contact_title'],
|
340
|
+
'contact_phone_number' => payload['contact_phone_number'],
|
341
|
+
'bulk_hosting_request_sid' => payload['bulk_hosting_request_sid'],
|
342
|
+
'next_step' => payload['next_step'],
|
343
|
+
}
|
344
|
+
|
345
|
+
# Context
|
346
|
+
@instance_context = nil
|
347
|
+
@params = { 'sid' => sid || @properties['sid'] , }
|
348
|
+
end
|
349
|
+
|
350
|
+
##
|
351
|
+
# Generate an instance context for the instance, the context is capable of
|
352
|
+
# performing various actions. All instance actions are proxied to the context
|
353
|
+
# @return [HostedNumberOrderContext] CallContext for this CallInstance
|
354
|
+
def context
|
355
|
+
unless @instance_context
|
356
|
+
@instance_context = HostedNumberOrderContext.new(@version , @params['sid'])
|
357
|
+
end
|
358
|
+
@instance_context
|
359
|
+
end
|
360
|
+
|
361
|
+
##
|
362
|
+
# @return [String] A 34 character string that uniquely identifies this HostedNumberOrder.
|
363
|
+
def sid
|
364
|
+
@properties['sid']
|
365
|
+
end
|
366
|
+
|
367
|
+
##
|
368
|
+
# @return [String] A 34 character string that uniquely identifies the account.
|
369
|
+
def account_sid
|
370
|
+
@properties['account_sid']
|
371
|
+
end
|
372
|
+
|
373
|
+
##
|
374
|
+
# @return [String] A 34 character string that uniquely identifies the [IncomingPhoneNumber](https://www.twilio.com/docs/api/rest/incoming-phone-numbers) resource that represents the phone number being hosted.
|
375
|
+
def incoming_phone_number_sid
|
376
|
+
@properties['incoming_phone_number_sid']
|
377
|
+
end
|
378
|
+
|
379
|
+
##
|
380
|
+
# @return [String] A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.
|
381
|
+
def address_sid
|
382
|
+
@properties['address_sid']
|
383
|
+
end
|
384
|
+
|
385
|
+
##
|
386
|
+
# @return [String] A 34 character string that uniquely identifies the [Authorization Document](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents) the user needs to sign.
|
387
|
+
def signing_document_sid
|
388
|
+
@properties['signing_document_sid']
|
389
|
+
end
|
390
|
+
|
391
|
+
##
|
392
|
+
# @return [String] Phone number to be hosted. This must be in [E.164](https://en.wikipedia.org/wiki/E.164) format, e.g., +16175551212
|
393
|
+
def phone_number
|
394
|
+
@properties['phone_number']
|
395
|
+
end
|
396
|
+
|
397
|
+
##
|
398
|
+
# @return [NumbersV2HostedNumberOrderCapabilities]
|
399
|
+
def capabilities
|
400
|
+
@properties['capabilities']
|
401
|
+
end
|
402
|
+
|
403
|
+
##
|
404
|
+
# @return [String] A 64 character string that is a human-readable text that describes this resource.
|
405
|
+
def friendly_name
|
406
|
+
@properties['friendly_name']
|
407
|
+
end
|
408
|
+
|
409
|
+
##
|
410
|
+
# @return [Status]
|
411
|
+
def status
|
412
|
+
@properties['status']
|
413
|
+
end
|
414
|
+
|
415
|
+
##
|
416
|
+
# @return [String] A message that explains why a hosted_number_order went to status \"action-required\"
|
417
|
+
def failure_reason
|
418
|
+
@properties['failure_reason']
|
419
|
+
end
|
420
|
+
|
421
|
+
##
|
422
|
+
# @return [Time] The date this resource was created, given as [GMT RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format.
|
423
|
+
def date_created
|
424
|
+
@properties['date_created']
|
425
|
+
end
|
426
|
+
|
427
|
+
##
|
428
|
+
# @return [Boolean] Whether the SMS capability will be hosted on our platform. Can be `true` of `false`.
|
429
|
+
def sms_capability
|
430
|
+
@properties['sms_capability']
|
431
|
+
end
|
432
|
+
|
433
|
+
##
|
434
|
+
# @return [Time] The date that this resource was updated, given as [GMT RFC 2822](http://www.ietf.org/rfc/rfc2822.txt) format.
|
435
|
+
def date_updated
|
436
|
+
@properties['date_updated']
|
437
|
+
end
|
438
|
+
|
439
|
+
##
|
440
|
+
# @return [String] Email of the owner of this phone number that is being hosted.
|
441
|
+
def email
|
442
|
+
@properties['email']
|
443
|
+
end
|
444
|
+
|
445
|
+
##
|
446
|
+
# @return [Array<String>] A list of emails that LOA document for this HostedNumberOrder will be carbon copied to.
|
447
|
+
def cc_emails
|
448
|
+
@properties['cc_emails']
|
449
|
+
end
|
450
|
+
|
451
|
+
##
|
452
|
+
# @return [String] The URL of this HostedNumberOrder.
|
453
|
+
def url
|
454
|
+
@properties['url']
|
455
|
+
end
|
456
|
+
|
457
|
+
##
|
458
|
+
# @return [String] The title of the person authorized to sign the Authorization Document for this phone number.
|
459
|
+
def contact_title
|
460
|
+
@properties['contact_title']
|
461
|
+
end
|
462
|
+
|
463
|
+
##
|
464
|
+
# @return [String] The contact phone number of the person authorized to sign the Authorization Document.
|
465
|
+
def contact_phone_number
|
466
|
+
@properties['contact_phone_number']
|
467
|
+
end
|
468
|
+
|
469
|
+
##
|
470
|
+
# @return [String] A 34 character string that uniquely identifies the bulk hosting request associated with this HostedNumberOrder.
|
471
|
+
def bulk_hosting_request_sid
|
472
|
+
@properties['bulk_hosting_request_sid']
|
473
|
+
end
|
474
|
+
|
475
|
+
##
|
476
|
+
# @return [String] The next step you need to take to complete the hosted number order and request it successfully.
|
477
|
+
def next_step
|
478
|
+
@properties['next_step']
|
479
|
+
end
|
480
|
+
|
481
|
+
##
|
482
|
+
# Delete the HostedNumberOrderInstance
|
483
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
484
|
+
def delete
|
485
|
+
|
486
|
+
context.delete
|
487
|
+
end
|
488
|
+
|
489
|
+
##
|
490
|
+
# Fetch the HostedNumberOrderInstance
|
491
|
+
# @return [HostedNumberOrderInstance] Fetched HostedNumberOrderInstance
|
492
|
+
def fetch
|
493
|
+
|
494
|
+
context.fetch
|
495
|
+
end
|
496
|
+
|
497
|
+
##
|
498
|
+
# Provide a user friendly representation
|
499
|
+
def to_s
|
500
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
501
|
+
"<Twilio.Numbers.V2.HostedNumberOrderInstance #{values}>"
|
502
|
+
end
|
503
|
+
|
504
|
+
##
|
505
|
+
# Provide a detailed, user friendly representation
|
506
|
+
def inspect
|
507
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
508
|
+
"<Twilio.Numbers.V2.HostedNumberOrderInstance #{values}>"
|
509
|
+
end
|
510
|
+
end
|
511
|
+
|
512
|
+
end
|
513
|
+
end
|
514
|
+
end
|
515
|
+
end
|
@@ -21,9 +21,39 @@ module Twilio
|
|
21
21
|
def initialize(domain)
|
22
22
|
super
|
23
23
|
@version = 'v2'
|
24
|
+
@authorization_documents = nil
|
25
|
+
@hosted_number_orders = nil
|
24
26
|
@regulatory_compliance = nil
|
25
27
|
end
|
26
28
|
|
29
|
+
##
|
30
|
+
# @param [String] sid A 34 character string that uniquely identifies this AuthorizationDocument.
|
31
|
+
# @return [Twilio::REST::Numbers::V2::AuthorizationDocumentContext] if sid was passed.
|
32
|
+
# @return [Twilio::REST::Numbers::V2::AuthorizationDocumentList]
|
33
|
+
def authorization_documents(sid=:unset)
|
34
|
+
if sid.nil?
|
35
|
+
raise ArgumentError, 'sid cannot be nil'
|
36
|
+
end
|
37
|
+
if sid == :unset
|
38
|
+
@authorization_documents ||= AuthorizationDocumentList.new self
|
39
|
+
else
|
40
|
+
AuthorizationDocumentContext.new(self, sid)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
##
|
44
|
+
# @param [String] sid A 34 character string that uniquely identifies this HostedNumberOrder.
|
45
|
+
# @return [Twilio::REST::Numbers::V2::HostedNumberOrderContext] if sid was passed.
|
46
|
+
# @return [Twilio::REST::Numbers::V2::HostedNumberOrderList]
|
47
|
+
def hosted_number_orders(sid=:unset)
|
48
|
+
if sid.nil?
|
49
|
+
raise ArgumentError, 'sid cannot be nil'
|
50
|
+
end
|
51
|
+
if sid == :unset
|
52
|
+
@hosted_number_orders ||= HostedNumberOrderList.new self
|
53
|
+
else
|
54
|
+
HostedNumberOrderContext.new(self, sid)
|
55
|
+
end
|
56
|
+
end
|
27
57
|
##
|
28
58
|
# @return [Twilio::REST::Numbers::V2::RegulatoryComplianceList]
|
29
59
|
def regulatory_compliance
|
@@ -67,7 +67,7 @@ module Twilio
|
|
67
67
|
# @param [String] activity_sid The `activity_sid` of the Worker resources to read.
|
68
68
|
# @param [String] available Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available.
|
69
69
|
# @param [String] friendly_name The `friendly_name` of the Worker resources to read.
|
70
|
-
# @param [String] target_workers_expression Filter by Workers that would match an expression
|
70
|
+
# @param [String] target_workers_expression Filter by Workers that would match an expression. In addition to fields in the workers' attributes, the expression can include the following worker fields: `sid`, `friendly_name`, `activity_sid`, or `activity_name`
|
71
71
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue that the Workers to read are eligible for.
|
72
72
|
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read are eligible for.
|
73
73
|
# @param [String] ordering Sorting parameter for Workers
|
@@ -101,7 +101,7 @@ module Twilio
|
|
101
101
|
# @param [String] activity_sid The `activity_sid` of the Worker resources to read.
|
102
102
|
# @param [String] available Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available.
|
103
103
|
# @param [String] friendly_name The `friendly_name` of the Worker resources to read.
|
104
|
-
# @param [String] target_workers_expression Filter by Workers that would match an expression
|
104
|
+
# @param [String] target_workers_expression Filter by Workers that would match an expression. In addition to fields in the workers' attributes, the expression can include the following worker fields: `sid`, `friendly_name`, `activity_sid`, or `activity_name`
|
105
105
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue that the Workers to read are eligible for.
|
106
106
|
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read are eligible for.
|
107
107
|
# @param [String] ordering Sorting parameter for Workers
|
@@ -150,7 +150,7 @@ module Twilio
|
|
150
150
|
# @param [String] activity_sid The `activity_sid` of the Worker resources to read.
|
151
151
|
# @param [String] available Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available.
|
152
152
|
# @param [String] friendly_name The `friendly_name` of the Worker resources to read.
|
153
|
-
# @param [String] target_workers_expression Filter by Workers that would match an expression
|
153
|
+
# @param [String] target_workers_expression Filter by Workers that would match an expression. In addition to fields in the workers' attributes, the expression can include the following worker fields: `sid`, `friendly_name`, `activity_sid`, or `activity_name`
|
154
154
|
# @param [String] task_queue_name The `friendly_name` of the TaskQueue that the Workers to read are eligible for.
|
155
155
|
# @param [String] task_queue_sid The SID of the TaskQueue that the Workers to read are eligible for.
|
156
156
|
# @param [String] ordering Sorting parameter for Workers
|
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: 6.0
|
4
|
+
version: 6.2.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: 2023-06-
|
11
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -569,7 +569,12 @@ files:
|
|
569
569
|
- lib/twilio-ruby/rest/numbers.rb
|
570
570
|
- lib/twilio-ruby/rest/numbers/v1.rb
|
571
571
|
- lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb
|
572
|
+
- lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb
|
573
|
+
- lib/twilio-ruby/rest/numbers/v1/porting_portability.rb
|
572
574
|
- lib/twilio-ruby/rest/numbers/v2.rb
|
575
|
+
- lib/twilio-ruby/rest/numbers/v2/authorization_document.rb
|
576
|
+
- lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb
|
577
|
+
- lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb
|
573
578
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb
|
574
579
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb
|
575
580
|
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb
|