twilio-ruby 5.19.0 → 5.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +13 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api.rb +16 -13
  5. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +85 -88
  6. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +4 -4
  7. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +135 -146
  8. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +21 -17
  9. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +14 -8
  10. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +150 -166
  11. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +174 -79
  12. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +147 -160
  13. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +174 -79
  14. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +174 -79
  15. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +147 -160
  16. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +174 -79
  17. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +51 -51
  18. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +246 -251
  19. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +31 -26
  20. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +34 -26
  21. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +109 -112
  22. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +108 -112
  23. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +108 -112
  24. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +21 -11
  25. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +7 -6
  26. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +7 -6
  27. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +32 -25
  28. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +36 -36
  29. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
  30. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +70 -66
  31. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +10 -10
  32. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping.rb +14 -14
  33. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +26 -23
  34. 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
  35. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping.rb +12 -12
  36. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +26 -23
  37. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +4 -4
  38. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +4 -4
  39. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +11 -9
  40. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +2 -1
  41. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +56 -47
  42. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +59 -44
  43. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +59 -44
  44. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +59 -47
  45. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +59 -44
  46. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +59 -44
  47. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +59 -44
  48. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +59 -44
  49. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +59 -44
  50. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +76 -74
  51. data/lib/twilio-ruby/rest/authy.rb +8 -8
  52. data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
  53. data/lib/twilio-ruby/rest/client.rb +16 -13
  54. data/lib/twilio-ruby/rest/messaging.rb +15 -0
  55. data/lib/twilio-ruby/rest/messaging/v1.rb +23 -0
  56. data/lib/twilio-ruby/rest/messaging/v1/session.rb +482 -0
  57. data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +434 -0
  58. data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +458 -0
  59. data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +285 -0
  60. data/lib/twilio-ruby/rest/preview.rb +8 -8
  61. data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
  62. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -2
  63. data/lib/twilio-ruby/rest/video.rb +9 -9
  64. data/lib/twilio-ruby/rest/video/v1.rb +16 -16
  65. data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -6
  66. data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +37 -21
  67. data/lib/twilio-ruby/rest/video/v1/recording.rb +12 -3
  68. data/lib/twilio-ruby/security/request_validator.rb +2 -2
  69. data/lib/twilio-ruby/version.rb +1 -1
  70. data/spec/integration/messaging/v1/session/message_spec.rb +238 -0
  71. data/spec/integration/messaging/v1/session/participant_spec.rb +256 -0
  72. data/spec/integration/messaging/v1/session_spec.rb +223 -0
  73. data/spec/integration/messaging/v1/webhook_spec.rb +92 -0
  74. data/spec/integration/video/v1/composition_hook_spec.rb +1 -1
  75. data/spec/security/request_validator_spec.rb +5 -7
  76. 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 unique id of the
19
- # [Account](https://www.twilio.com/docs/api/rest/account) that created this
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 account_sid
153
- # @param [String] sid The connect-app Sid that uniquely identifies this resource
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's browser will redirect
186
- # to after Twilio authenticates the user and obtains authorization for this
187
- # Connect App.
188
- # @param [String] company_name The company name set for this Connect App.
189
- # @param [String] deauthorize_callback_method The HTTP method to be used when
190
- # making a request to the `DeauthorizeCallbackUrl`. Either `GET` or `POST`.
191
- # @param [String] deauthorize_callback_url The URL to which Twilio will send a
192
- # request when a user de-authorizes this Connect App.
193
- # @param [String] description A more detailed human readable description of the
194
- # Connect App.
195
- # @param [String] friendly_name A human readable description of the Connect App,
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 permssions
200
- # you will request from users of this ConnectApp. Valid permssions are `get-all`
201
- # or `post-all`.
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 unique id of the
243
- # [Account](https://www.twilio.com/docs/api/rest/account) that created this
244
- # ConnectApp.
245
- # @param [String] sid The connect-app Sid that uniquely identifies this resource
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 unique sid that identifies this account
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] URIL Twilio sends requests when users authorize
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 this Connect App.
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 Twilio will use making requests to the url
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 Twilio will send a request when a user de-authorizes this app
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] A more detailed human readable description
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] A human readable name for the Connect App.
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] A string that uniquely identifies this connect-apps
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 for this resource
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's browser will redirect
357
- # to after Twilio authenticates the user and obtains authorization for this
358
- # Connect App.
359
- # @param [String] company_name The company name set for this Connect App.
360
- # @param [String] deauthorize_callback_method The HTTP method to be used when
361
- # making a request to the `DeauthorizeCallbackUrl`. Either `GET` or `POST`.
362
- # @param [String] deauthorize_callback_url The URL to which Twilio will send a
363
- # request when a user de-authorizes this Connect App.
364
- # @param [String] description A more detailed human readable description of the
365
- # Connect App.
366
- # @param [String] friendly_name A human readable description of the Connect App,
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 permssions
371
- # you will request from users of this ConnectApp. Valid permssions are `get-all`
372
- # or `post-all`.
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 unique id of the
19
- # [Account](https://www.twilio.com/docs/iam/api/account) responsible for this
20
- # phone number.
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 Include phone numbers new to the Twilio platform. Possible
40
- # values are either `true` or `false`. Default is `true`.
41
- # @param [String] friendly_name Only show the incoming phone number resources with
42
- # friendly names that exactly match this name.
43
- # @param [String] phone_number Only show the incoming phone number resources that
44
- # match this pattern. You can specify partial numbers and use '*' as a wildcard
45
- # for any digit.
46
- # @param [String] origin Include phone numbers based on the origin, by default,
47
- # phone numbers of all origin are included. Possible values are either `twilio` or
48
- # `hosted`.
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 Include phone numbers new to the Twilio platform. Possible
72
- # values are either `true` or `false`. Default is `true`.
73
- # @param [String] friendly_name Only show the incoming phone number resources with
74
- # friendly names that exactly match this name.
75
- # @param [String] phone_number Only show the incoming phone number resources that
76
- # match this pattern. You can specify partial numbers and use '*' as a wildcard
77
- # for any digit.
78
- # @param [String] origin Include phone numbers based on the origin, by default,
79
- # phone numbers of all origin are included. Possible values are either `twilio` or
80
- # `hosted`.
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 Include phone numbers new to the Twilio platform. Possible
120
- # values are either `true` or `false`. Default is `true`.
121
- # @param [String] friendly_name Only show the incoming phone number resources with
122
- # friendly names that exactly match this name.
123
- # @param [String] phone_number Only show the incoming phone number resources that
124
- # match this pattern. You can specify partial numbers and use '*' as a wildcard
125
- # for any digit.
126
- # @param [String] origin Include phone numbers based on the origin, by default,
127
- # phone numbers of all origin are included. Possible values are either `twilio` or
128
- # `hosted`.
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 Twilio REST API version to use for incoming
168
- # calls made to this number. If omitted, uses `2010-04-01`.
169
- # @param [String] friendly_name A human readable descriptive text for this
170
- # resource, up to 64 characters long. By default, the `FriendlyName` is a nicely
171
- # formatted version of the phone number.
172
- # @param [String] sms_application_sid The 34 character sid of the application
173
- # Twilio should use to handle SMSs sent to the new number. If a
174
- # `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and
175
- # use those set on the application.
176
- # @param [String] sms_fallback_method The HTTP method that should be used to
177
- # request the `SmsFallbackUrl`. Must be either `GET` or `POST`. Defaults to
178
- # `POST`.
179
- # @param [String] sms_fallback_url A URL that Twilio will request if an error
180
- # occurs requesting or executing the TwiML defined by `SmsUrl`.
181
- # @param [String] sms_method The HTTP method that should be used to request the
182
- # `SmsUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
183
- # @param [String] sms_url The URL Twilio will request when receiving an incoming
184
- # SMS message to this number.
185
- # @param [String] status_callback The URL that Twilio will request to pass status
186
- # parameters (such as call ended) to your application.
187
- # @param [String] status_callback_method The HTTP method Twilio will use to make
188
- # requests to the `StatusCallback` URL. Either `GET` or `POST`. Defaults to
189
- # `POST`.
190
- # @param [String] voice_application_sid The 34 character sid of the application
191
- # Twilio should use to handle phone calls to the new number. If a
192
- # `VoiceApplicationSid` is present, Twilio will ignore all of the voice urls above
193
- # and use those set on the application. Setting a `VoiceApplicationSid` will
194
- # automatically delete your `TrunkSid` and vice versa.
195
- # @param [Boolean] voice_caller_id_lookup Do a lookup of a caller's name from the
196
- # CNAM database and post it to your app. Either `true` or `false`. Defaults to
197
- # `false`.
198
- # @param [String] voice_fallback_method The HTTP method that should be used to
199
- # request the `VoiceFallbackUrl`. Either `GET` or `POST`. Defaults to `POST`.
200
- # @param [String] voice_fallback_url The URL that Twilio will request if an error
201
- # occurs retrieving or executing the TwiML requested by `Url`.
202
- # @param [String] voice_method The HTTP method that should be used to request the
203
- # `VoiceUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
204
- # @param [String] voice_url The URL that Twilio should request when somebody dials
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 determining whether this phone number is enabled
209
- # for emergency calling
210
- # @param [String] emergency_address_sid The 34 character sid of the
211
- # EmergencyAddress configuration to leverage emergency calling for this phone
212
- # number
213
- # @param [String] trunk_sid The 34 character sid of the Trunk Twilio should use to
214
- # handle phone calls to this number. If a `TrunkSid` is present, Twilio will
215
- # ignore all of the voice urls and voice applications above and use those set on
216
- # the Trunk. Setting a `TrunkSid` will automatically delete your
217
- # `VoiceApplicationSid` and vice versa.
218
- # @param [String] identity_sid The 34 character sid of the identity Twilio should
219
- # use to associate with the number. Identities are required in some regions to
220
- # meet local regulations
221
- # @param [String] address_sid The 34 character sid of the address Twilio should
222
- # use to associate with the number. Addresses are required in some regions to meet
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 this phone number to receive incoming voice calls or
226
- # faxes. Must be either `fax` or `voice`. Defaults to `voice`
227
- # @param [String] phone_number The phone number you want to purchase. The number
228
- # should be formatted starting with a '+' followed by the country code and the
229
- # number in [E.164](http://en.wikipedia.org/wiki/E.164) format e.g.,
230
- # '+15105555555'. **You must include either this or an `AreaCode` parameter to
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. Any three digit, US or Canada area code is valid. Twilio will provision
234
- # a random phone number within this area code for you. **You must include either
235
- # this or a `PhoneNumber` parameter to have your POST succeed.** (US and Canada
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 unique id of the
339
- # [Account](https://www.twilio.com/docs/iam/api/account) responsible for this
340
- # phone number.
341
- # @param [String] sid The incoming-phone-number Sid that uniquely identifies this
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 unique 34 character id of the account to which
358
- # you wish to transfer this phone number. See [Exchanging Numbers Between
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 Calls to this phone number will start a new TwiML
361
- # session with this API version. Either `2010-04-01` or `2008-08-01`.
362
- # @param [String] friendly_name A human readable descriptive text for this
363
- # resource, up to 64 characters long. By default, the `FriendlyName` is a nicely
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 34 character sid of the application
366
- # Twilio should use to handle SMSs sent to this number. If a `SmsApplicationSid`
367
- # is present, Twilio will ignore all of the SMS urls above and use those set on
368
- # the application instead.
369
- # @param [String] sms_fallback_method The HTTP method that should be used to
370
- # request the `SmsFallbackUrl`. Either `GET` or `POST`.
371
- # @param [String] sms_fallback_url A URL that Twilio will request if an error
372
- # occurs requesting or executing the TwiML defined by `SmsUrl`.
373
- # @param [String] sms_method The HTTP method Twilio will use when making requests
374
- # to the `SmsUrl`. Either `GET` or `POST`.
375
- # @param [String] sms_url The URL that Twilio should request when somebody sends
376
- # an SMS to the new phone number.
377
- # @param [String] status_callback The URL that Twilio will request to pass status
378
- # parameters (such as call ended) to your application.
379
- # @param [String] status_callback_method The HTTP method Twilio will use to make
380
- # requests to the `StatusCallback` URL. Either `GET` or `POST`.
381
- # @param [String] voice_application_sid The 34 character sid of the application
382
- # Twilio should use to handle phone calls to this number. If a
383
- # `VoiceApplicationSid` is present, Twilio will ignore all of the voice urls above
384
- # and use those set on the application instead. Setting a `VoiceApplicationSid`
385
- # will automatically delete your `TrunkSid` and vice versa.
386
- # @param [Boolean] voice_caller_id_lookup Look up the caller's caller-ID name from
387
- # the CNAM database ($0.01 per look up). Either `true` or `false`.
388
- # @param [String] voice_fallback_method The HTTP method Twilio will use when
389
- # requesting the `VoiceFallbackUrl`. Either `GET` or `POST`.
390
- # @param [String] voice_fallback_url A URL that Twilio will request if an error
391
- # occurs requesting or executing the TwiML defined by `VoiceUrl`.
392
- # @param [String] voice_method The HTTP method Twilio will use when requesting the
393
- # above `Url`. Either `GET` or `POST`.
394
- # @param [String] voice_url The URL that Twilio should request when somebody dials
395
- # the phone number. The VoiceURL will no longer be used if a
396
- # `VoiceApplicationSid` or a `TrunkSid` is set.
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 determining whether this phone number is enabled
399
- # for emergency calling
400
- # @param [String] emergency_address_sid The 34 character sid of the
401
- # EmergencyAddress configuration to leverage emergency calling for this phone
402
- # number
403
- # @param [String] trunk_sid The 34 character sid of the Trunk Twilio should use to
404
- # handle phone calls to this number. If a `TrunkSid` is present, Twilio will
405
- # ignore all of the voice urls and voice applications above and use those set on
406
- # the Trunk. Setting a `TrunkSid` will automatically delete your
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 this phone number to receive incoming voice calls or
410
- # faxes. Must be either `fax` or `voice`. Defaults to `voice`
411
- # @param [String] identity_sid The 34 character sid of the identity Twilio should
412
- # use to associate with the number. Identities are required in some regions to
413
- # meet local regulations
414
- # @param [String] address_sid The 34 character sid of the address Twilio should
415
- # associate with the number. If the number has address restrictions, only another
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 unique id of the
521
- # [Account](https://www.twilio.com/docs/iam/api/account) responsible for this
522
- # phone number.
523
- # @param [String] sid The incoming-phone-number Sid that uniquely identifies this
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 unique sid that identifies this account
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] Unique string that identifies the address associated with number
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] Indicates if the customer requires an address
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 Twilio REST API version to use
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] Indicates if the phone number is a beta number
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 this resource was created
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 this resource was last updated
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] A human readable description of this resouce
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] Unique string that identifies the identity associated with number
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 incoming phone number
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] Twilio owned phone numbers are marked as twilio while hosted phone numbers are marked as hosted.
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] A string that uniquely identifies this resource
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] Unique string that identifies the application
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 sms fallback url
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 Twilio will request if an error occurs in executing TwiML
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 sms url
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 Twilio will request when receiving an SMS
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 Twilio will use to pass status parameters
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 twilio will use with status callback
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] Unique string to identify the trunk
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 for this resource
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 unique sid of the application to handle this number
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] Look up the caller's caller-ID
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 fallback_url
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 Twilio will request when an error occurs in TwiML
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 voice url
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 Twilio will request when receiving a call
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] The emergency_status
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 emergency_address_sid
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 unique 34 character id of the account to which
762
- # you wish to transfer this phone number. See [Exchanging Numbers Between
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 Calls to this phone number will start a new TwiML
765
- # session with this API version. Either `2010-04-01` or `2008-08-01`.
766
- # @param [String] friendly_name A human readable descriptive text for this
767
- # resource, up to 64 characters long. By default, the `FriendlyName` is a nicely
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 34 character sid of the application
770
- # Twilio should use to handle SMSs sent to this number. If a `SmsApplicationSid`
771
- # is present, Twilio will ignore all of the SMS urls above and use those set on
772
- # the application instead.
773
- # @param [String] sms_fallback_method The HTTP method that should be used to
774
- # request the `SmsFallbackUrl`. Either `GET` or `POST`.
775
- # @param [String] sms_fallback_url A URL that Twilio will request if an error
776
- # occurs requesting or executing the TwiML defined by `SmsUrl`.
777
- # @param [String] sms_method The HTTP method Twilio will use when making requests
778
- # to the `SmsUrl`. Either `GET` or `POST`.
779
- # @param [String] sms_url The URL that Twilio should request when somebody sends
780
- # an SMS to the new phone number.
781
- # @param [String] status_callback The URL that Twilio will request to pass status
782
- # parameters (such as call ended) to your application.
783
- # @param [String] status_callback_method The HTTP method Twilio will use to make
784
- # requests to the `StatusCallback` URL. Either `GET` or `POST`.
785
- # @param [String] voice_application_sid The 34 character sid of the application
786
- # Twilio should use to handle phone calls to this number. If a
787
- # `VoiceApplicationSid` is present, Twilio will ignore all of the voice urls above
788
- # and use those set on the application instead. Setting a `VoiceApplicationSid`
789
- # will automatically delete your `TrunkSid` and vice versa.
790
- # @param [Boolean] voice_caller_id_lookup Look up the caller's caller-ID name from
791
- # the CNAM database ($0.01 per look up). Either `true` or `false`.
792
- # @param [String] voice_fallback_method The HTTP method Twilio will use when
793
- # requesting the `VoiceFallbackUrl`. Either `GET` or `POST`.
794
- # @param [String] voice_fallback_url A URL that Twilio will request if an error
795
- # occurs requesting or executing the TwiML defined by `VoiceUrl`.
796
- # @param [String] voice_method The HTTP method Twilio will use when requesting the
797
- # above `Url`. Either `GET` or `POST`.
798
- # @param [String] voice_url The URL that Twilio should request when somebody dials
799
- # the phone number. The VoiceURL will no longer be used if a
800
- # `VoiceApplicationSid` or a `TrunkSid` is set.
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 determining whether this phone number is enabled
803
- # for emergency calling
804
- # @param [String] emergency_address_sid The 34 character sid of the
805
- # EmergencyAddress configuration to leverage emergency calling for this phone
806
- # number
807
- # @param [String] trunk_sid The 34 character sid of the Trunk Twilio should use to
808
- # handle phone calls to this number. If a `TrunkSid` is present, Twilio will
809
- # ignore all of the voice urls and voice applications above and use those set on
810
- # the Trunk. Setting a `TrunkSid` will automatically delete your
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 this phone number to receive incoming voice calls or
814
- # faxes. Must be either `fax` or `voice`. Defaults to `voice`
815
- # @param [String] identity_sid The 34 character sid of the identity Twilio should
816
- # use to associate with the number. Identities are required in some regions to
817
- # meet local regulations
818
- # @param [String] address_sid The 34 character sid of the address Twilio should
819
- # associate with the number. If the number has address restrictions, only another
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(