twilio-ruby 5.19.0 → 5.20.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/CHANGES.md +13 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api.rb +16 -13
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +85 -88
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +135 -146
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +21 -17
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +14 -8
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +150 -166
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +147 -160
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +147 -160
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +174 -79
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +51 -51
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +246 -251
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +31 -26
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +34 -26
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +109 -112
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +108 -112
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +108 -112
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +21 -11
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +7 -6
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +32 -25
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +36 -36
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +70 -66
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +10 -10
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +14 -14
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +12 -12
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +26 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +11 -9
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +56 -47
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +59 -47
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +59 -44
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +76 -74
- data/lib/twilio-ruby/rest/authy.rb +8 -8
- data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
- data/lib/twilio-ruby/rest/client.rb +16 -13
- data/lib/twilio-ruby/rest/messaging.rb +15 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +23 -0
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +482 -0
- data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +434 -0
- data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +458 -0
- data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +285 -0
- data/lib/twilio-ruby/rest/preview.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -2
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -6
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +37 -21
- data/lib/twilio-ruby/rest/video/v1/recording.rb +12 -3
- data/lib/twilio-ruby/security/request_validator.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/messaging/v1/session/message_spec.rb +238 -0
- data/spec/integration/messaging/v1/session/participant_spec.rb +256 -0
- data/spec/integration/messaging/v1/session_spec.rb +223 -0
- data/spec/integration/messaging/v1/webhook_spec.rb +92 -0
- data/spec/integration/video/v1/composition_hook_spec.rb +1 -1
- data/spec/security/request_validator_spec.rb +5 -7
- metadata +14 -2
@@ -15,9 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the ConnectAppList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] account_sid The
|
19
|
-
# [Account](https://www.twilio.com/docs/api/rest/account) that created
|
20
|
-
# ConnectApp.
|
18
|
+
# @param [String] account_sid The SID of the
|
19
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
20
|
+
# ConnectApp resource.
|
21
21
|
# @return [ConnectAppList] ConnectAppList
|
22
22
|
def initialize(version, account_sid: nil)
|
23
23
|
super(version)
|
@@ -149,8 +149,11 @@ module Twilio
|
|
149
149
|
##
|
150
150
|
# Initialize the ConnectAppContext
|
151
151
|
# @param [Version] version Version that contains the resource
|
152
|
-
# @param [String] account_sid The
|
153
|
-
#
|
152
|
+
# @param [String] account_sid The SID of the
|
153
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
154
|
+
# ConnectApp resource to fetch.
|
155
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
156
|
+
# ConnectApp resource to fetch.
|
154
157
|
# @return [ConnectAppContext] ConnectAppContext
|
155
158
|
def initialize(version, account_sid, sid)
|
156
159
|
super(version)
|
@@ -182,23 +185,21 @@ module Twilio
|
|
182
185
|
|
183
186
|
##
|
184
187
|
# Update the ConnectAppInstance
|
185
|
-
# @param [String] authorize_redirect_url The URL the user
|
186
|
-
#
|
187
|
-
#
|
188
|
-
# @param [String]
|
189
|
-
#
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
# @param [String]
|
194
|
-
#
|
195
|
-
# @param [String]
|
196
|
-
# with maximum length 64 characters.
|
197
|
-
# @param [String] homepage_url The public URL where users can obtain more
|
188
|
+
# @param [String] authorize_redirect_url The URL to redirect the user to after we
|
189
|
+
# authenticate the user and obtain authorization to access the Connect App.
|
190
|
+
# @param [String] company_name The company name to set for the Connect App.
|
191
|
+
# @param [String] deauthorize_callback_method The HTTP method to use when calling
|
192
|
+
# `deauthorize_callback_url`.
|
193
|
+
# @param [String] deauthorize_callback_url The URL to call using the
|
194
|
+
# `deauthorize_callback_method` to de-authorize the Connect App.
|
195
|
+
# @param [String] description A description of the Connect App.
|
196
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
197
|
+
# the resource. It can be up to 64 characters long.
|
198
|
+
# @param [String] homepage_url A public URL where users can obtain more
|
198
199
|
# information about this Connect App.
|
199
|
-
# @param [connect_app.Permission] permissions A comma-separated list of
|
200
|
-
# you will request from users of this ConnectApp.
|
201
|
-
#
|
200
|
+
# @param [connect_app.Permission] permissions A comma-separated list of the
|
201
|
+
# permissions you will request from the users of this ConnectApp. Can include:
|
202
|
+
# `get-all` and `post-all`.
|
202
203
|
# @return [ConnectAppInstance] Updated ConnectAppInstance
|
203
204
|
def update(authorize_redirect_url: :unset, company_name: :unset, deauthorize_callback_method: :unset, deauthorize_callback_url: :unset, description: :unset, friendly_name: :unset, homepage_url: :unset, permissions: :unset)
|
204
205
|
data = Twilio::Values.of({
|
@@ -239,10 +240,11 @@ module Twilio
|
|
239
240
|
# Initialize the ConnectAppInstance
|
240
241
|
# @param [Version] version Version that contains the resource
|
241
242
|
# @param [Hash] payload payload that contains response from Twilio
|
242
|
-
# @param [String] account_sid The
|
243
|
-
# [Account](https://www.twilio.com/docs/api/rest/account) that created
|
244
|
-
# ConnectApp.
|
245
|
-
# @param [String] sid The
|
243
|
+
# @param [String] account_sid The SID of the
|
244
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
245
|
+
# ConnectApp resource.
|
246
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
247
|
+
# ConnectApp resource to fetch.
|
246
248
|
# @return [ConnectAppInstance] ConnectAppInstance
|
247
249
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
248
250
|
super(version)
|
@@ -279,43 +281,43 @@ module Twilio
|
|
279
281
|
end
|
280
282
|
|
281
283
|
##
|
282
|
-
# @return [String] The
|
284
|
+
# @return [String] The SID of the Account that created the resource
|
283
285
|
def account_sid
|
284
286
|
@properties['account_sid']
|
285
287
|
end
|
286
288
|
|
287
289
|
##
|
288
|
-
# @return [String]
|
290
|
+
# @return [String] The URL to redirect the user to after authorization
|
289
291
|
def authorize_redirect_url
|
290
292
|
@properties['authorize_redirect_url']
|
291
293
|
end
|
292
294
|
|
293
295
|
##
|
294
|
-
# @return [String] The company name set for
|
296
|
+
# @return [String] The company name set for the Connect App
|
295
297
|
def company_name
|
296
298
|
@properties['company_name']
|
297
299
|
end
|
298
300
|
|
299
301
|
##
|
300
|
-
# @return [String] HTTP method
|
302
|
+
# @return [String] The HTTP method we use to call deauthorize_callback_url
|
301
303
|
def deauthorize_callback_method
|
302
304
|
@properties['deauthorize_callback_method']
|
303
305
|
end
|
304
306
|
|
305
307
|
##
|
306
|
-
# @return [String] URL
|
308
|
+
# @return [String] The URL we call to de-authorize the Connect App
|
307
309
|
def deauthorize_callback_url
|
308
310
|
@properties['deauthorize_callback_url']
|
309
311
|
end
|
310
312
|
|
311
313
|
##
|
312
|
-
# @return [String]
|
314
|
+
# @return [String] The description of the Connect App
|
313
315
|
def description
|
314
316
|
@properties['description']
|
315
317
|
end
|
316
318
|
|
317
319
|
##
|
318
|
-
# @return [String]
|
320
|
+
# @return [String] The string that you assigned to describe the resource
|
319
321
|
def friendly_name
|
320
322
|
@properties['friendly_name']
|
321
323
|
end
|
@@ -327,19 +329,19 @@ module Twilio
|
|
327
329
|
end
|
328
330
|
|
329
331
|
##
|
330
|
-
# @return [connect_app.Permission] The set of permissions that your ConnectApp requests
|
332
|
+
# @return [connect_app.Permission] The set of permissions that your ConnectApp requests
|
331
333
|
def permissions
|
332
334
|
@properties['permissions']
|
333
335
|
end
|
334
336
|
|
335
337
|
##
|
336
|
-
# @return [String]
|
338
|
+
# @return [String] The unique string that identifies the resource
|
337
339
|
def sid
|
338
340
|
@properties['sid']
|
339
341
|
end
|
340
342
|
|
341
343
|
##
|
342
|
-
# @return [String] The URI
|
344
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`
|
343
345
|
def uri
|
344
346
|
@properties['uri']
|
345
347
|
end
|
@@ -353,23 +355,21 @@ module Twilio
|
|
353
355
|
|
354
356
|
##
|
355
357
|
# Update the ConnectAppInstance
|
356
|
-
# @param [String] authorize_redirect_url The URL the user
|
357
|
-
#
|
358
|
-
#
|
359
|
-
# @param [String]
|
360
|
-
#
|
361
|
-
#
|
362
|
-
#
|
363
|
-
#
|
364
|
-
# @param [String]
|
365
|
-
#
|
366
|
-
# @param [String]
|
367
|
-
# with maximum length 64 characters.
|
368
|
-
# @param [String] homepage_url The public URL where users can obtain more
|
358
|
+
# @param [String] authorize_redirect_url The URL to redirect the user to after we
|
359
|
+
# authenticate the user and obtain authorization to access the Connect App.
|
360
|
+
# @param [String] company_name The company name to set for the Connect App.
|
361
|
+
# @param [String] deauthorize_callback_method The HTTP method to use when calling
|
362
|
+
# `deauthorize_callback_url`.
|
363
|
+
# @param [String] deauthorize_callback_url The URL to call using the
|
364
|
+
# `deauthorize_callback_method` to de-authorize the Connect App.
|
365
|
+
# @param [String] description A description of the Connect App.
|
366
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
367
|
+
# the resource. It can be up to 64 characters long.
|
368
|
+
# @param [String] homepage_url A public URL where users can obtain more
|
369
369
|
# information about this Connect App.
|
370
|
-
# @param [connect_app.Permission] permissions A comma-separated list of
|
371
|
-
# you will request from users of this ConnectApp.
|
372
|
-
#
|
370
|
+
# @param [connect_app.Permission] permissions A comma-separated list of the
|
371
|
+
# permissions you will request from the users of this ConnectApp. Can include:
|
372
|
+
# `get-all` and `post-all`.
|
373
373
|
# @return [ConnectAppInstance] Updated ConnectAppInstance
|
374
374
|
def update(authorize_redirect_url: :unset, company_name: :unset, deauthorize_callback_method: :unset, deauthorize_callback_url: :unset, description: :unset, friendly_name: :unset, homepage_url: :unset, permissions: :unset)
|
375
375
|
context.update(
|
@@ -15,9 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the IncomingPhoneNumberList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] account_sid The
|
19
|
-
# [Account](https://www.twilio.com/docs/
|
20
|
-
#
|
18
|
+
# @param [String] account_sid The SID of the
|
19
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created this
|
20
|
+
# IncomingPhoneNumber resource.
|
21
21
|
# @return [IncomingPhoneNumberList] IncomingPhoneNumberList
|
22
22
|
def initialize(version, account_sid: nil)
|
23
23
|
super(version)
|
@@ -36,16 +36,16 @@ module Twilio
|
|
36
36
|
# Lists IncomingPhoneNumberInstance records from the API as a list.
|
37
37
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
38
38
|
# memory before returning.
|
39
|
-
# @param [Boolean] beta
|
40
|
-
#
|
41
|
-
# @param [String] friendly_name
|
42
|
-
#
|
43
|
-
# @param [String] phone_number
|
44
|
-
#
|
45
|
-
#
|
46
|
-
# @param [String] origin
|
47
|
-
#
|
48
|
-
#
|
39
|
+
# @param [Boolean] beta Whether to include phone numbers new to the Twilio
|
40
|
+
# platform. Can be: `true` or `false` and the default is `true`.
|
41
|
+
# @param [String] friendly_name A string that identifies the IncomingPhoneNumber
|
42
|
+
# resources to read.
|
43
|
+
# @param [String] phone_number The phone numbers of the IncomingPhoneNumber
|
44
|
+
# resources to read. You can specify partial numbers and use '*' as a wildcard for
|
45
|
+
# any digit.
|
46
|
+
# @param [String] origin Whether to include phone numbers based on their origin.
|
47
|
+
# Can be: `twilio` or `hosted`. By default, phone numbers of all origin are
|
48
|
+
# included.
|
49
49
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
50
50
|
# guarantees to never return more than limit. Default is no limit
|
51
51
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -68,16 +68,16 @@ module Twilio
|
|
68
68
|
# Streams IncomingPhoneNumberInstance records from the API as an Enumerable.
|
69
69
|
# This operation lazily loads records as efficiently as possible until the limit
|
70
70
|
# is reached.
|
71
|
-
# @param [Boolean] beta
|
72
|
-
#
|
73
|
-
# @param [String] friendly_name
|
74
|
-
#
|
75
|
-
# @param [String] phone_number
|
76
|
-
#
|
77
|
-
#
|
78
|
-
# @param [String] origin
|
79
|
-
#
|
80
|
-
#
|
71
|
+
# @param [Boolean] beta Whether to include phone numbers new to the Twilio
|
72
|
+
# platform. Can be: `true` or `false` and the default is `true`.
|
73
|
+
# @param [String] friendly_name A string that identifies the IncomingPhoneNumber
|
74
|
+
# resources to read.
|
75
|
+
# @param [String] phone_number The phone numbers of the IncomingPhoneNumber
|
76
|
+
# resources to read. You can specify partial numbers and use '*' as a wildcard for
|
77
|
+
# any digit.
|
78
|
+
# @param [String] origin Whether to include phone numbers based on their origin.
|
79
|
+
# Can be: `twilio` or `hosted`. By default, phone numbers of all origin are
|
80
|
+
# included.
|
81
81
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
82
82
|
# guarantees to never return more than limit. Default is no limit.
|
83
83
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -116,16 +116,16 @@ module Twilio
|
|
116
116
|
##
|
117
117
|
# Retrieve a single page of IncomingPhoneNumberInstance records from the API.
|
118
118
|
# Request is executed immediately.
|
119
|
-
# @param [Boolean] beta
|
120
|
-
#
|
121
|
-
# @param [String] friendly_name
|
122
|
-
#
|
123
|
-
# @param [String] phone_number
|
124
|
-
#
|
125
|
-
#
|
126
|
-
# @param [String] origin
|
127
|
-
#
|
128
|
-
#
|
119
|
+
# @param [Boolean] beta Whether to include phone numbers new to the Twilio
|
120
|
+
# platform. Can be: `true` or `false` and the default is `true`.
|
121
|
+
# @param [String] friendly_name A string that identifies the IncomingPhoneNumber
|
122
|
+
# resources to read.
|
123
|
+
# @param [String] phone_number The phone numbers of the IncomingPhoneNumber
|
124
|
+
# resources to read. You can specify partial numbers and use '*' as a wildcard for
|
125
|
+
# any digit.
|
126
|
+
# @param [String] origin Whether to include phone numbers based on their origin.
|
127
|
+
# Can be: `twilio` or `hosted`. By default, phone numbers of all origin are
|
128
|
+
# included.
|
129
129
|
# @param [String] page_token PageToken provided by the API
|
130
130
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
131
131
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -164,76 +164,71 @@ module Twilio
|
|
164
164
|
##
|
165
165
|
# Retrieve a single page of IncomingPhoneNumberInstance records from the API.
|
166
166
|
# Request is executed immediately.
|
167
|
-
# @param [String] api_version The
|
168
|
-
#
|
169
|
-
# @param [String] friendly_name A
|
170
|
-
#
|
171
|
-
# formatted version of the phone number.
|
172
|
-
# @param [String] sms_application_sid The
|
173
|
-
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
# @param [String] sms_fallback_method The HTTP method that should
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
#
|
189
|
-
# `
|
190
|
-
#
|
191
|
-
#
|
192
|
-
# `
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
#
|
197
|
-
# `
|
198
|
-
# @param [String]
|
199
|
-
#
|
200
|
-
# @param [String]
|
201
|
-
#
|
202
|
-
# @param [String]
|
203
|
-
#
|
204
|
-
#
|
205
|
-
# the new phone number. The VoiceURL will no longer be used if a
|
206
|
-
# `VoiceApplicationSid` or a `TrunkSid` is set.
|
167
|
+
# @param [String] api_version The API version to use for incoming calls made to
|
168
|
+
# the new phone number. The default is `2010-04-01`.
|
169
|
+
# @param [String] friendly_name A descriptive string that you created to describe
|
170
|
+
# the new phone number. It can be up to 64 characters long. By default, this is a
|
171
|
+
# formatted version of the new phone number.
|
172
|
+
# @param [String] sms_application_sid The SID of the application that should
|
173
|
+
# handle SMS messages sent to the new phone number. If an `sms_application_sid` is
|
174
|
+
# present, we ignore all of the `sms_*_url` urls and use those set on the
|
175
|
+
# application.
|
176
|
+
# @param [String] sms_fallback_method The HTTP method that we should use to call
|
177
|
+
# `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
178
|
+
# @param [String] sms_fallback_url The URL that we should call when an error
|
179
|
+
# occurs while requesting or executing the TwiML defined by `sms_url`.
|
180
|
+
# @param [String] sms_method The HTTP method that we should use to call `sms_url`.
|
181
|
+
# Can be: `GET` or `POST` and defaults to `POST`.
|
182
|
+
# @param [String] sms_url The URL we should call when the new phone number
|
183
|
+
# receives an incoming SMS message.
|
184
|
+
# @param [String] status_callback The URL we should call using the
|
185
|
+
# `status_callback_method` to send status information to your application.
|
186
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
187
|
+
# `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
|
188
|
+
# @param [String] voice_application_sid The SID of the application we should use
|
189
|
+
# to handle calls to the new phone number. If a `voice_application_sid` is
|
190
|
+
# present, we ignore all of the voice urls and use only those set on the
|
191
|
+
# application. Setting a `voice_application_sid` will automatically delete your
|
192
|
+
# `trunk_sid` and vice versa.
|
193
|
+
# @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from
|
194
|
+
# the CNAM database and post it to your app. Can be: `true` or `false` and
|
195
|
+
# defaults to `false`.
|
196
|
+
# @param [String] voice_fallback_method The HTTP method that we should use to call
|
197
|
+
# `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
198
|
+
# @param [String] voice_fallback_url The URL that we should call when an error
|
199
|
+
# occurs retrieving or executing the TwiML requested by `url`.
|
200
|
+
# @param [String] voice_method The HTTP method that we should use to call
|
201
|
+
# `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
202
|
+
# @param [String] voice_url The URL that we should call to answer a call to the
|
203
|
+
# new phone number. The `voice_url` will not be called if a
|
204
|
+
# `voice_application_sid` or a `trunk_sid` is set.
|
207
205
|
# @param [incoming_phone_number.EmergencyStatus] emergency_status The
|
208
|
-
# configuration status parameter
|
209
|
-
# for emergency calling
|
210
|
-
# @param [String] emergency_address_sid The
|
211
|
-
#
|
212
|
-
#
|
213
|
-
#
|
214
|
-
#
|
215
|
-
#
|
216
|
-
#
|
217
|
-
#
|
218
|
-
#
|
219
|
-
#
|
220
|
-
#
|
221
|
-
#
|
222
|
-
#
|
223
|
-
# local regulations
|
206
|
+
# configuration status parameter that determines whether the new phone number is
|
207
|
+
# enabled for emergency calling.
|
208
|
+
# @param [String] emergency_address_sid The SID of the emergency address
|
209
|
+
# configuration to use for emergency calling from the new phone number.
|
210
|
+
# @param [String] trunk_sid The SID of the Trunk we should use to handle calls to
|
211
|
+
# the new phone number. If a `trunk_sid` is present, we ignore all of the voice
|
212
|
+
# urls and voice applications and use only those set on the Trunk. Setting a
|
213
|
+
# `trunk_sid` will automatically delete your `voice_application_sid` and vice
|
214
|
+
# versa.
|
215
|
+
# @param [String] identity_sid The SID of the Identity resource that we should
|
216
|
+
# associate with the new phone number. Some regions require an identity to meet
|
217
|
+
# local regulations.
|
218
|
+
# @param [String] address_sid The SID of the Address resource we should associate
|
219
|
+
# with the new phone number. Some regions require addresses to meet local
|
220
|
+
# regulations.
|
224
221
|
# @param [incoming_phone_number.VoiceReceiveMode] voice_receive_mode The
|
225
|
-
# configuration parameter for
|
226
|
-
# faxes.
|
227
|
-
# @param [String] phone_number The phone number
|
228
|
-
#
|
229
|
-
#
|
230
|
-
#
|
231
|
-
# have your POST succeed.**
|
222
|
+
# configuration parameter for the new phone number to receive incoming voice calls
|
223
|
+
# or faxes. Can be: `fax` or `voice` and defaults to `voice`.
|
224
|
+
# @param [String] phone_number The phone number to purchase specified in
|
225
|
+
# [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone
|
226
|
+
# numbers consist of a + followed by the country code and subscriber number
|
227
|
+
# without punctuation characters. For example, +14155551234.
|
232
228
|
# @param [String] area_code The desired area code for your new incoming phone
|
233
|
-
# number.
|
234
|
-
#
|
235
|
-
#
|
236
|
-
# only)
|
229
|
+
# number. Can be any three-digit, US or Canada area code. We will provision an
|
230
|
+
# available phone number within this area code for you. **You must provide an
|
231
|
+
# `area_code` or a `phone_number`.** (US and Canada only).
|
237
232
|
# @return [IncomingPhoneNumberInstance] Newly created IncomingPhoneNumberInstance
|
238
233
|
def create(api_version: :unset, friendly_name: :unset, sms_application_sid: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, status_callback: :unset, status_callback_method: :unset, voice_application_sid: :unset, voice_caller_id_lookup: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, emergency_status: :unset, emergency_address_sid: :unset, trunk_sid: :unset, identity_sid: :unset, address_sid: :unset, voice_receive_mode: :unset, phone_number: :unset, area_code: :unset)
|
239
234
|
data = Twilio::Values.of({
|
@@ -335,11 +330,11 @@ module Twilio
|
|
335
330
|
##
|
336
331
|
# Initialize the IncomingPhoneNumberContext
|
337
332
|
# @param [Version] version Version that contains the resource
|
338
|
-
# @param [String] account_sid The
|
339
|
-
# [Account](https://www.twilio.com/docs/
|
340
|
-
#
|
341
|
-
# @param [String] sid The
|
342
|
-
# resource
|
333
|
+
# @param [String] account_sid The SID of the
|
334
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
335
|
+
# IncomingPhoneNumber resource to fetch.
|
336
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
337
|
+
# IncomingPhoneNumber resource to fetch.
|
343
338
|
# @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext
|
344
339
|
def initialize(version, account_sid, sid)
|
345
340
|
super(version)
|
@@ -354,66 +349,66 @@ module Twilio
|
|
354
349
|
|
355
350
|
##
|
356
351
|
# Update the IncomingPhoneNumberInstance
|
357
|
-
# @param [String] account_sid The
|
358
|
-
#
|
352
|
+
# @param [String] account_sid The SID of the
|
353
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
354
|
+
# IncomingPhoneNumber resource to update. For more information, see [Exchanging
|
355
|
+
# Numbers Between
|
359
356
|
# Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
|
360
|
-
# @param [String] api_version
|
361
|
-
#
|
362
|
-
# @param [String] friendly_name A
|
363
|
-
#
|
357
|
+
# @param [String] api_version The API version to use for incoming calls made to
|
358
|
+
# the phone number. The default is `2010-04-01`.
|
359
|
+
# @param [String] friendly_name A descriptive string that you created to describe
|
360
|
+
# this phone number. It can be up to 64 characters long. By default, this is a
|
364
361
|
# formatted version of the phone number.
|
365
|
-
# @param [String] sms_application_sid The
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
#
|
370
|
-
#
|
371
|
-
#
|
372
|
-
#
|
373
|
-
#
|
374
|
-
#
|
375
|
-
#
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
379
|
-
#
|
380
|
-
#
|
381
|
-
#
|
382
|
-
#
|
383
|
-
#
|
384
|
-
# and
|
385
|
-
#
|
386
|
-
#
|
387
|
-
#
|
388
|
-
# @param [String] voice_fallback_method The HTTP method
|
389
|
-
#
|
390
|
-
# @param [String] voice_fallback_url
|
391
|
-
# occurs
|
392
|
-
# @param [String] voice_method The HTTP method
|
393
|
-
#
|
394
|
-
# @param [String] voice_url The URL that
|
395
|
-
#
|
396
|
-
#
|
362
|
+
# @param [String] sms_application_sid The SID of the application that should
|
363
|
+
# handle SMS messages sent to the number. If an `sms_application_sid` is present,
|
364
|
+
# we ignore all of the `sms_*_url` urls and use those set on the application.
|
365
|
+
# @param [String] sms_fallback_method The HTTP method that we should use to call
|
366
|
+
# `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
367
|
+
# @param [String] sms_fallback_url The URL that we should call when an error
|
368
|
+
# occurs while requesting or executing the TwiML defined by `sms_url`.
|
369
|
+
# @param [String] sms_method The HTTP method that we should use to call `sms_url`.
|
370
|
+
# Can be: `GET` or `POST` and defaults to `POST`.
|
371
|
+
# @param [String] sms_url The URL we should call when the phone number receives an
|
372
|
+
# incoming SMS message.
|
373
|
+
# @param [String] status_callback The URL we should call using the
|
374
|
+
# `status_callback_method` to send status information to your application.
|
375
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
376
|
+
# `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
|
377
|
+
# @param [String] voice_application_sid The SID of the application we should use
|
378
|
+
# to handle phone calls to the phone number. If a `voice_application_sid` is
|
379
|
+
# present, we ignore all of the voice urls and use only those set on the
|
380
|
+
# application. Setting a `voice_application_sid` will automatically delete your
|
381
|
+
# `trunk_sid` and vice versa.
|
382
|
+
# @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from
|
383
|
+
# the CNAM database and post it to your app. Can be: `true` or `false` and
|
384
|
+
# defaults to `false`.
|
385
|
+
# @param [String] voice_fallback_method The HTTP method that we should use to call
|
386
|
+
# `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
387
|
+
# @param [String] voice_fallback_url The URL that we should call when an error
|
388
|
+
# occurs retrieving or executing the TwiML requested by `url`.
|
389
|
+
# @param [String] voice_method The HTTP method that we should use to call
|
390
|
+
# `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
391
|
+
# @param [String] voice_url The URL that we should call to answer a call to the
|
392
|
+
# phone number. The `voice_url` will not be called if a `voice_application_sid` or
|
393
|
+
# a `trunk_sid` is set.
|
397
394
|
# @param [incoming_phone_number.EmergencyStatus] emergency_status The
|
398
|
-
# configuration status parameter
|
399
|
-
# for emergency calling
|
400
|
-
# @param [String] emergency_address_sid The
|
401
|
-
#
|
402
|
-
#
|
403
|
-
#
|
404
|
-
#
|
405
|
-
#
|
406
|
-
#
|
407
|
-
# `VoiceApplicationSid` and vice versa.
|
395
|
+
# configuration status parameter that determines whether the phone number is
|
396
|
+
# enabled for emergency calling.
|
397
|
+
# @param [String] emergency_address_sid The SID of the emergency address
|
398
|
+
# configuration to use for emergency calling from this phone number.
|
399
|
+
# @param [String] trunk_sid The SID of the Trunk we should use to handle phone
|
400
|
+
# calls to the phone number. If a `trunk_sid` is present, we ignore all of the
|
401
|
+
# voice urls and voice applications and use only those set on the Trunk. Setting a
|
402
|
+
# `trunk_sid` will automatically delete your `voice_application_sid` and vice
|
403
|
+
# versa.
|
408
404
|
# @param [incoming_phone_number.VoiceReceiveMode] voice_receive_mode The
|
409
|
-
# configuration parameter for
|
410
|
-
# faxes.
|
411
|
-
# @param [String] identity_sid The
|
412
|
-
#
|
413
|
-
#
|
414
|
-
# @param [String] address_sid The
|
415
|
-
#
|
416
|
-
# address that satisfies the requirement can replace the existing one.
|
405
|
+
# configuration parameter for the phone number to receive incoming voice calls or
|
406
|
+
# faxes. Can be: `fax` or `voice` and defaults to `voice`.
|
407
|
+
# @param [String] identity_sid The SID of the Identity resource that we should
|
408
|
+
# associate with the phone number. Some regions require an identity to meet local
|
409
|
+
# regulations.
|
410
|
+
# @param [String] address_sid The SID of the Address resource we should associate
|
411
|
+
# with the phone number. Some regions require addresses to meet local regulations.
|
417
412
|
# @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
|
418
413
|
def update(account_sid: :unset, api_version: :unset, friendly_name: :unset, sms_application_sid: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, status_callback: :unset, status_callback_method: :unset, voice_application_sid: :unset, voice_caller_id_lookup: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, emergency_status: :unset, emergency_address_sid: :unset, trunk_sid: :unset, voice_receive_mode: :unset, identity_sid: :unset, address_sid: :unset)
|
419
414
|
data = Twilio::Values.of({
|
@@ -517,11 +512,11 @@ module Twilio
|
|
517
512
|
# Initialize the IncomingPhoneNumberInstance
|
518
513
|
# @param [Version] version Version that contains the resource
|
519
514
|
# @param [Hash] payload payload that contains response from Twilio
|
520
|
-
# @param [String] account_sid The
|
521
|
-
# [Account](https://www.twilio.com/docs/
|
522
|
-
#
|
523
|
-
# @param [String] sid The
|
524
|
-
# resource
|
515
|
+
# @param [String] account_sid The SID of the
|
516
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created this
|
517
|
+
# IncomingPhoneNumber resource.
|
518
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
519
|
+
# IncomingPhoneNumber resource to fetch.
|
525
520
|
# @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
|
526
521
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
527
522
|
super(version)
|
@@ -577,31 +572,31 @@ module Twilio
|
|
577
572
|
end
|
578
573
|
|
579
574
|
##
|
580
|
-
# @return [String] The
|
575
|
+
# @return [String] The SID of the Account that created the resource
|
581
576
|
def account_sid
|
582
577
|
@properties['account_sid']
|
583
578
|
end
|
584
579
|
|
585
580
|
##
|
586
|
-
# @return [String]
|
581
|
+
# @return [String] The SID of the Address resource associated with the phone number
|
587
582
|
def address_sid
|
588
583
|
@properties['address_sid']
|
589
584
|
end
|
590
585
|
|
591
586
|
##
|
592
|
-
# @return [incoming_phone_number.AddressRequirement]
|
587
|
+
# @return [incoming_phone_number.AddressRequirement] Whether the phone number requires an Address registered with Twilio.
|
593
588
|
def address_requirements
|
594
589
|
@properties['address_requirements']
|
595
590
|
end
|
596
591
|
|
597
592
|
##
|
598
|
-
# @return [String] The
|
593
|
+
# @return [String] The API version used to start a new TwiML session
|
599
594
|
def api_version
|
600
595
|
@properties['api_version']
|
601
596
|
end
|
602
597
|
|
603
598
|
##
|
604
|
-
# @return [Boolean]
|
599
|
+
# @return [Boolean] Whether the phone number is new to the Twilio platform
|
605
600
|
def beta
|
606
601
|
@properties['beta']
|
607
602
|
end
|
@@ -613,211 +608,211 @@ module Twilio
|
|
613
608
|
end
|
614
609
|
|
615
610
|
##
|
616
|
-
# @return [Time] The date
|
611
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was created
|
617
612
|
def date_created
|
618
613
|
@properties['date_created']
|
619
614
|
end
|
620
615
|
|
621
616
|
##
|
622
|
-
# @return [Time] The date
|
617
|
+
# @return [Time] The RFC 2822 date and time in GMT that the resource was last updated
|
623
618
|
def date_updated
|
624
619
|
@properties['date_updated']
|
625
620
|
end
|
626
621
|
|
627
622
|
##
|
628
|
-
# @return [String]
|
623
|
+
# @return [String] The string that you assigned to describe the resource
|
629
624
|
def friendly_name
|
630
625
|
@properties['friendly_name']
|
631
626
|
end
|
632
627
|
|
633
628
|
##
|
634
|
-
# @return [String]
|
629
|
+
# @return [String] The SID of the Identity resource associated with number
|
635
630
|
def identity_sid
|
636
631
|
@properties['identity_sid']
|
637
632
|
end
|
638
633
|
|
639
634
|
##
|
640
|
-
# @return [String] The
|
635
|
+
# @return [String] The phone number in E.164 format
|
641
636
|
def phone_number
|
642
637
|
@properties['phone_number']
|
643
638
|
end
|
644
639
|
|
645
640
|
##
|
646
|
-
# @return [String]
|
641
|
+
# @return [String] The phone number's origin. Can be twilio or hosted.
|
647
642
|
def origin
|
648
643
|
@properties['origin']
|
649
644
|
end
|
650
645
|
|
651
646
|
##
|
652
|
-
# @return [String]
|
647
|
+
# @return [String] The unique string that identifies the resource
|
653
648
|
def sid
|
654
649
|
@properties['sid']
|
655
650
|
end
|
656
651
|
|
657
652
|
##
|
658
|
-
# @return [String]
|
653
|
+
# @return [String] The SID of the application that handles SMS messages sent to the phone number
|
659
654
|
def sms_application_sid
|
660
655
|
@properties['sms_application_sid']
|
661
656
|
end
|
662
657
|
|
663
658
|
##
|
664
|
-
# @return [String] HTTP method used with
|
659
|
+
# @return [String] The HTTP method used with sms_fallback_url
|
665
660
|
def sms_fallback_method
|
666
661
|
@properties['sms_fallback_method']
|
667
662
|
end
|
668
663
|
|
669
664
|
##
|
670
|
-
# @return [String] URL
|
665
|
+
# @return [String] The URL that we call when an error occurs while retrieving or executing the TwiML
|
671
666
|
def sms_fallback_url
|
672
667
|
@properties['sms_fallback_url']
|
673
668
|
end
|
674
669
|
|
675
670
|
##
|
676
|
-
# @return [String] HTTP method to use with
|
671
|
+
# @return [String] The HTTP method to use with sms_url
|
677
672
|
def sms_method
|
678
673
|
@properties['sms_method']
|
679
674
|
end
|
680
675
|
|
681
676
|
##
|
682
|
-
# @return [String] URL
|
677
|
+
# @return [String] The URL we call when the phone number receives an incoming SMS message
|
683
678
|
def sms_url
|
684
679
|
@properties['sms_url']
|
685
680
|
end
|
686
681
|
|
687
682
|
##
|
688
|
-
# @return [String] URL
|
683
|
+
# @return [String] The URL to send status information to your application
|
689
684
|
def status_callback
|
690
685
|
@properties['status_callback']
|
691
686
|
end
|
692
687
|
|
693
688
|
##
|
694
|
-
# @return [String] HTTP method
|
689
|
+
# @return [String] The HTTP method we use to call status_callback
|
695
690
|
def status_callback_method
|
696
691
|
@properties['status_callback_method']
|
697
692
|
end
|
698
693
|
|
699
694
|
##
|
700
|
-
# @return [String]
|
695
|
+
# @return [String] The SID of the Trunk that handles calls to the phone number
|
701
696
|
def trunk_sid
|
702
697
|
@properties['trunk_sid']
|
703
698
|
end
|
704
699
|
|
705
700
|
##
|
706
|
-
# @return [String] The URI
|
701
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`
|
707
702
|
def uri
|
708
703
|
@properties['uri']
|
709
704
|
end
|
710
705
|
|
711
706
|
##
|
712
|
-
# @return [String] The
|
707
|
+
# @return [String] The SID of the application that handles calls to the phone number
|
713
708
|
def voice_application_sid
|
714
709
|
@properties['voice_application_sid']
|
715
710
|
end
|
716
711
|
|
717
712
|
##
|
718
|
-
# @return [Boolean]
|
713
|
+
# @return [Boolean] Whether to lookup the caller's name
|
719
714
|
def voice_caller_id_lookup
|
720
715
|
@properties['voice_caller_id_lookup']
|
721
716
|
end
|
722
717
|
|
723
718
|
##
|
724
|
-
# @return [String] HTTP method used with
|
719
|
+
# @return [String] The HTTP method used with voice_fallback_url
|
725
720
|
def voice_fallback_method
|
726
721
|
@properties['voice_fallback_method']
|
727
722
|
end
|
728
723
|
|
729
724
|
##
|
730
|
-
# @return [String] URL
|
725
|
+
# @return [String] The URL we call when an error occurs in TwiML
|
731
726
|
def voice_fallback_url
|
732
727
|
@properties['voice_fallback_url']
|
733
728
|
end
|
734
729
|
|
735
730
|
##
|
736
|
-
# @return [String] HTTP method used with the
|
731
|
+
# @return [String] The HTTP method used with the voice_url
|
737
732
|
def voice_method
|
738
733
|
@properties['voice_method']
|
739
734
|
end
|
740
735
|
|
741
736
|
##
|
742
|
-
# @return [String] URL
|
737
|
+
# @return [String] The URL we call when the phone number receives a call
|
743
738
|
def voice_url
|
744
739
|
@properties['voice_url']
|
745
740
|
end
|
746
741
|
|
747
742
|
##
|
748
|
-
# @return [incoming_phone_number.EmergencyStatus]
|
743
|
+
# @return [incoming_phone_number.EmergencyStatus] Whether the phone number is enabled for emergency calling
|
749
744
|
def emergency_status
|
750
745
|
@properties['emergency_status']
|
751
746
|
end
|
752
747
|
|
753
748
|
##
|
754
|
-
# @return [String] The
|
749
|
+
# @return [String] The emergency address configuration to use for emergency calling
|
755
750
|
def emergency_address_sid
|
756
751
|
@properties['emergency_address_sid']
|
757
752
|
end
|
758
753
|
|
759
754
|
##
|
760
755
|
# Update the IncomingPhoneNumberInstance
|
761
|
-
# @param [String] account_sid The
|
762
|
-
#
|
756
|
+
# @param [String] account_sid The SID of the
|
757
|
+
# [Account](https://www.twilio.com/docs/api/rest/account) that created the
|
758
|
+
# IncomingPhoneNumber resource to update. For more information, see [Exchanging
|
759
|
+
# Numbers Between
|
763
760
|
# Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
|
764
|
-
# @param [String] api_version
|
765
|
-
#
|
766
|
-
# @param [String] friendly_name A
|
767
|
-
#
|
761
|
+
# @param [String] api_version The API version to use for incoming calls made to
|
762
|
+
# the phone number. The default is `2010-04-01`.
|
763
|
+
# @param [String] friendly_name A descriptive string that you created to describe
|
764
|
+
# this phone number. It can be up to 64 characters long. By default, this is a
|
768
765
|
# formatted version of the phone number.
|
769
|
-
# @param [String] sms_application_sid The
|
770
|
-
#
|
771
|
-
#
|
772
|
-
#
|
773
|
-
#
|
774
|
-
#
|
775
|
-
#
|
776
|
-
#
|
777
|
-
#
|
778
|
-
#
|
779
|
-
#
|
780
|
-
#
|
781
|
-
#
|
782
|
-
#
|
783
|
-
#
|
784
|
-
#
|
785
|
-
#
|
786
|
-
#
|
787
|
-
#
|
788
|
-
# and
|
789
|
-
#
|
790
|
-
#
|
791
|
-
#
|
792
|
-
# @param [String] voice_fallback_method The HTTP method
|
793
|
-
#
|
794
|
-
# @param [String] voice_fallback_url
|
795
|
-
# occurs
|
796
|
-
# @param [String] voice_method The HTTP method
|
797
|
-
#
|
798
|
-
# @param [String] voice_url The URL that
|
799
|
-
#
|
800
|
-
#
|
766
|
+
# @param [String] sms_application_sid The SID of the application that should
|
767
|
+
# handle SMS messages sent to the number. If an `sms_application_sid` is present,
|
768
|
+
# we ignore all of the `sms_*_url` urls and use those set on the application.
|
769
|
+
# @param [String] sms_fallback_method The HTTP method that we should use to call
|
770
|
+
# `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
771
|
+
# @param [String] sms_fallback_url The URL that we should call when an error
|
772
|
+
# occurs while requesting or executing the TwiML defined by `sms_url`.
|
773
|
+
# @param [String] sms_method The HTTP method that we should use to call `sms_url`.
|
774
|
+
# Can be: `GET` or `POST` and defaults to `POST`.
|
775
|
+
# @param [String] sms_url The URL we should call when the phone number receives an
|
776
|
+
# incoming SMS message.
|
777
|
+
# @param [String] status_callback The URL we should call using the
|
778
|
+
# `status_callback_method` to send status information to your application.
|
779
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
780
|
+
# `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
|
781
|
+
# @param [String] voice_application_sid The SID of the application we should use
|
782
|
+
# to handle phone calls to the phone number. If a `voice_application_sid` is
|
783
|
+
# present, we ignore all of the voice urls and use only those set on the
|
784
|
+
# application. Setting a `voice_application_sid` will automatically delete your
|
785
|
+
# `trunk_sid` and vice versa.
|
786
|
+
# @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from
|
787
|
+
# the CNAM database and post it to your app. Can be: `true` or `false` and
|
788
|
+
# defaults to `false`.
|
789
|
+
# @param [String] voice_fallback_method The HTTP method that we should use to call
|
790
|
+
# `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
791
|
+
# @param [String] voice_fallback_url The URL that we should call when an error
|
792
|
+
# occurs retrieving or executing the TwiML requested by `url`.
|
793
|
+
# @param [String] voice_method The HTTP method that we should use to call
|
794
|
+
# `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
795
|
+
# @param [String] voice_url The URL that we should call to answer a call to the
|
796
|
+
# phone number. The `voice_url` will not be called if a `voice_application_sid` or
|
797
|
+
# a `trunk_sid` is set.
|
801
798
|
# @param [incoming_phone_number.EmergencyStatus] emergency_status The
|
802
|
-
# configuration status parameter
|
803
|
-
# for emergency calling
|
804
|
-
# @param [String] emergency_address_sid The
|
805
|
-
#
|
806
|
-
#
|
807
|
-
#
|
808
|
-
#
|
809
|
-
#
|
810
|
-
#
|
811
|
-
# `VoiceApplicationSid` and vice versa.
|
799
|
+
# configuration status parameter that determines whether the phone number is
|
800
|
+
# enabled for emergency calling.
|
801
|
+
# @param [String] emergency_address_sid The SID of the emergency address
|
802
|
+
# configuration to use for emergency calling from this phone number.
|
803
|
+
# @param [String] trunk_sid The SID of the Trunk we should use to handle phone
|
804
|
+
# calls to the phone number. If a `trunk_sid` is present, we ignore all of the
|
805
|
+
# voice urls and voice applications and use only those set on the Trunk. Setting a
|
806
|
+
# `trunk_sid` will automatically delete your `voice_application_sid` and vice
|
807
|
+
# versa.
|
812
808
|
# @param [incoming_phone_number.VoiceReceiveMode] voice_receive_mode The
|
813
|
-
# configuration parameter for
|
814
|
-
# faxes.
|
815
|
-
# @param [String] identity_sid The
|
816
|
-
#
|
817
|
-
#
|
818
|
-
# @param [String] address_sid The
|
819
|
-
#
|
820
|
-
# address that satisfies the requirement can replace the existing one.
|
809
|
+
# configuration parameter for the phone number to receive incoming voice calls or
|
810
|
+
# faxes. Can be: `fax` or `voice` and defaults to `voice`.
|
811
|
+
# @param [String] identity_sid The SID of the Identity resource that we should
|
812
|
+
# associate with the phone number. Some regions require an identity to meet local
|
813
|
+
# regulations.
|
814
|
+
# @param [String] address_sid The SID of the Address resource we should associate
|
815
|
+
# with the phone number. Some regions require addresses to meet local regulations.
|
821
816
|
# @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
|
822
817
|
def update(account_sid: :unset, api_version: :unset, friendly_name: :unset, sms_application_sid: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, status_callback: :unset, status_callback_method: :unset, voice_application_sid: :unset, voice_caller_id_lookup: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, emergency_status: :unset, emergency_address_sid: :unset, trunk_sid: :unset, voice_receive_mode: :unset, identity_sid: :unset, address_sid: :unset)
|
823
818
|
context.update(
|