bandwidth-sdk 18.3.0 → 19.0.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.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +27 -21
  3. data/README.md +2 -11
  4. data/Rakefile +1 -1
  5. data/bandwidth.yml +341 -122
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +1308 -939
  8. data/coverage/index.html +21197 -17030
  9. data/custom_templates/README.mustache +1 -1
  10. data/custom_templates/api_client.mustache +3 -1
  11. data/custom_templates/configuration.mustache +18 -12
  12. data/custom_templates/gem.mustache +4 -2
  13. data/docs/Callback.md +1 -0
  14. data/docs/CallsApi.md +5 -25
  15. data/docs/ConferencesApi.md +9 -45
  16. data/docs/DisconnectCallback.md +6 -2
  17. data/docs/EndpointsApi.md +5 -25
  18. data/docs/InboundCallback.md +1 -1
  19. data/docs/InboundCallbackMessage.md +2 -0
  20. data/docs/InitiateCallback.md +1 -1
  21. data/docs/LookupResult.md +2 -2
  22. data/docs/MFAApi.md +3 -15
  23. data/docs/MediaApi.md +7 -23
  24. data/docs/Message.md +1 -1
  25. data/docs/MessagesApi.md +2 -10
  26. data/docs/MultiChannelAction.md +3 -3
  27. data/docs/MultiChannelActionCalendarEvent.md +3 -3
  28. data/docs/MultiChannelApi.md +1 -5
  29. data/docs/PhoneNumberLookupApi.md +3 -15
  30. data/docs/RbmActionBase.md +3 -3
  31. data/docs/RbmActionDial.md +3 -3
  32. data/docs/RbmActionOpenUrl.md +3 -3
  33. data/docs/RbmActionViewLocation.md +3 -3
  34. data/docs/RbmSession.md +26 -0
  35. data/docs/RbmSuggestionResponse.md +4 -4
  36. data/docs/RecordingsApi.md +10 -50
  37. data/docs/StatisticsApi.md +1 -5
  38. data/docs/StatusCallback.md +2 -2
  39. data/docs/StatusCallbackMessage.md +3 -1
  40. data/docs/TfvSubmissionInfo.md +2 -2
  41. data/docs/TollFreeVerificationApi.md +12 -48
  42. data/docs/TranscriptionsApi.md +3 -15
  43. data/docs/TransferDisconnectCallback.md +7 -1
  44. data/docs/VerificationRequest.md +2 -2
  45. data/docs/VerificationUpdateRequest.md +3 -3
  46. data/generate.sh +9 -0
  47. data/lib/bandwidth-sdk/api/calls_api.rb +5 -5
  48. data/lib/bandwidth-sdk/api/conferences_api.rb +9 -9
  49. data/lib/bandwidth-sdk/api/endpoints_api.rb +5 -5
  50. data/lib/bandwidth-sdk/api/media_api.rb +8 -8
  51. data/lib/bandwidth-sdk/api/messages_api.rb +2 -2
  52. data/lib/bandwidth-sdk/api/mfa_api.rb +3 -3
  53. data/lib/bandwidth-sdk/api/multi_channel_api.rb +1 -1
  54. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +3 -3
  55. data/lib/bandwidth-sdk/api/recordings_api.rb +10 -10
  56. data/lib/bandwidth-sdk/api/statistics_api.rb +1 -1
  57. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +15 -15
  58. data/lib/bandwidth-sdk/api/transcriptions_api.rb +3 -3
  59. data/lib/bandwidth-sdk/api_client.rb +3 -1
  60. data/lib/bandwidth-sdk/configuration.rb +18 -19
  61. data/lib/bandwidth-sdk/models/callback.rb +1 -0
  62. data/lib/bandwidth-sdk/models/disconnect_callback.rb +27 -5
  63. data/lib/bandwidth-sdk/models/inbound_callback_message.rb +10 -1
  64. data/lib/bandwidth-sdk/models/initiate_callback.rb +1 -1
  65. data/lib/bandwidth-sdk/models/list_message_item.rb +1 -0
  66. data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +1 -1
  67. data/lib/bandwidth-sdk/models/rbm_action_base.rb +1 -1
  68. data/lib/bandwidth-sdk/models/rbm_action_dial.rb +1 -1
  69. data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +1 -1
  70. data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +1 -1
  71. data/lib/bandwidth-sdk/models/rbm_session.rb +208 -0
  72. data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +2 -2
  73. data/lib/bandwidth-sdk/models/status_callback_message.rb +13 -4
  74. data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +2 -1
  75. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +2 -2
  76. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +37 -5
  77. data/lib/bandwidth-sdk/models/verification_request.rb +2 -2
  78. data/lib/bandwidth-sdk/models/verification_update_request.rb +19 -2
  79. data/lib/bandwidth-sdk/version.rb +1 -1
  80. data/lib/bandwidth-sdk.rb +3 -2
  81. data/spec/smoke/calls_api_spec.rb +46 -46
  82. data/spec/smoke/conferences_api_spec.rb +1 -1
  83. data/spec/smoke/endpoints_api_spec.rb +2 -31
  84. data/spec/smoke/media_api_spec.rb +2 -0
  85. data/spec/smoke/messages_api_spec.rb +2 -24
  86. data/spec/smoke/mfa_api_spec.rb +4 -27
  87. data/spec/smoke/multi_channel_api_spec.rb +4 -2
  88. data/spec/smoke/phone_number_lookup_api_spec.rb +2 -0
  89. data/spec/smoke/recordings_api_spec.rb +1 -1
  90. data/spec/smoke/smoke_helper.rb +41 -0
  91. data/spec/smoke/statistics_api_spec.rb +2 -37
  92. data/spec/smoke/toll_free_verification_api_spec.rb +2 -0
  93. data/spec/smoke/transcriptions_api_spec.rb +1 -1
  94. data/spec/spec_helper.rb +0 -48
  95. data/spec/unit/api/calls_api_spec.rb +3 -1
  96. data/spec/unit/api/conferences_api_spec.rb +2 -0
  97. data/spec/unit/api/endpoints_api_spec.rb +2 -0
  98. data/spec/unit/api/media_api_spec.rb +2 -0
  99. data/spec/unit/api/messages_api_spec.rb +2 -0
  100. data/spec/unit/api/mfa_api_spec.rb +2 -0
  101. data/spec/unit/api/multi_channel_api_spec.rb +2 -0
  102. data/spec/unit/api/phone_number_lookup_api_spec.rb +2 -0
  103. data/spec/unit/api/recordings_api_spec.rb +2 -0
  104. data/spec/unit/api/statistics_api_spec.rb +2 -0
  105. data/spec/unit/api/toll_free_verification_api_spec.rb +2 -0
  106. data/spec/unit/api/transcriptions_api_spec.rb +2 -0
  107. data/spec/unit/client/api_client_spec.rb +70 -206
  108. data/spec/unit/client/configuration_spec.rb +22 -17
  109. data/spec/unit/constants.rb +6 -0
  110. data/spec/unit/models/callback_spec.rb +1 -0
  111. data/spec/unit/models/disconnect_callback_spec.rb +10 -2
  112. data/spec/unit/models/inbound_callback_message_spec.rb +20 -5
  113. data/spec/unit/models/list_message_item_spec.rb +1 -0
  114. data/spec/unit/models/rbm_session_spec.rb +95 -0
  115. data/spec/unit/models/status_callback_message_spec.rb +20 -5
  116. data/spec/unit/models/status_callback_type_enum_spec.rb +7 -1
  117. data/spec/unit/models/tfv_submission_wrapper_spec.rb +2 -1
  118. data/spec/unit/models/transfer_disconnect_callback_spec.rb +16 -4
  119. data/spec/unit/models/verification_update_request_spec.rb +4 -2
  120. metadata +10 -1
@@ -30,10 +30,6 @@ require 'time'
30
30
  require 'bandwidth-sdk'
31
31
  # setup authorization
32
32
  Bandwidth.configure do |config|
33
- # Configure HTTP basic authorization: Basic
34
- config.username = 'YOUR USERNAME'
35
- config.password = 'YOUR PASSWORD'
36
-
37
33
  # Configure OAuth2 access token for authorization: OAuth2
38
34
  config.access_token = 'YOUR ACCESS TOKEN'
39
35
  end
@@ -82,7 +78,7 @@ end
82
78
 
83
79
  ### Authorization
84
80
 
85
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
81
+ [OAuth2](../README.md#OAuth2)
86
82
 
87
83
  ### HTTP request headers
88
84
 
@@ -96,7 +92,7 @@ end
96
92
 
97
93
  Delete a Toll-Free Verification Submission
98
94
 
99
- Delete a toll-free verification submission for a toll-free number.
95
+ Delete a toll-free verification submission for a toll-free number. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, it will be cancelled and the submission will then be deleted asynchronously.
100
96
 
101
97
  ### Examples
102
98
 
@@ -105,10 +101,6 @@ require 'time'
105
101
  require 'bandwidth-sdk'
106
102
  # setup authorization
107
103
  Bandwidth.configure do |config|
108
- # Configure HTTP basic authorization: Basic
109
- config.username = 'YOUR USERNAME'
110
- config.password = 'YOUR PASSWORD'
111
-
112
104
  # Configure OAuth2 access token for authorization: OAuth2
113
105
  config.access_token = 'YOUR ACCESS TOKEN'
114
106
  end
@@ -156,7 +148,7 @@ nil (empty response body)
156
148
 
157
149
  ### Authorization
158
150
 
159
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
151
+ [OAuth2](../README.md#OAuth2)
160
152
 
161
153
  ### HTTP request headers
162
154
 
@@ -179,10 +171,6 @@ require 'time'
179
171
  require 'bandwidth-sdk'
180
172
  # setup authorization
181
173
  Bandwidth.configure do |config|
182
- # Configure HTTP basic authorization: Basic
183
- config.username = 'YOUR USERNAME'
184
- config.password = 'YOUR PASSWORD'
185
-
186
174
  # Configure OAuth2 access token for authorization: OAuth2
187
175
  config.access_token = 'YOUR ACCESS TOKEN'
188
176
  end
@@ -230,7 +218,7 @@ nil (empty response body)
230
218
 
231
219
  ### Authorization
232
220
 
233
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
221
+ [OAuth2](../README.md#OAuth2)
234
222
 
235
223
  ### HTTP request headers
236
224
 
@@ -253,10 +241,6 @@ require 'time'
253
241
  require 'bandwidth-sdk'
254
242
  # setup authorization
255
243
  Bandwidth.configure do |config|
256
- # Configure HTTP basic authorization: Basic
257
- config.username = 'YOUR USERNAME'
258
- config.password = 'YOUR PASSWORD'
259
-
260
244
  # Configure OAuth2 access token for authorization: OAuth2
261
245
  config.access_token = 'YOUR ACCESS TOKEN'
262
246
  end
@@ -305,7 +289,7 @@ end
305
289
 
306
290
  ### Authorization
307
291
 
308
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
292
+ [OAuth2](../README.md#OAuth2)
309
293
 
310
294
  ### HTTP request headers
311
295
 
@@ -328,10 +312,6 @@ require 'time'
328
312
  require 'bandwidth-sdk'
329
313
  # setup authorization
330
314
  Bandwidth.configure do |config|
331
- # Configure HTTP basic authorization: Basic
332
- config.username = 'YOUR USERNAME'
333
- config.password = 'YOUR PASSWORD'
334
-
335
315
  # Configure OAuth2 access token for authorization: OAuth2
336
316
  config.access_token = 'YOUR ACCESS TOKEN'
337
317
  end
@@ -375,7 +355,7 @@ This endpoint does not need any parameter.
375
355
 
376
356
  ### Authorization
377
357
 
378
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
358
+ [OAuth2](../README.md#OAuth2)
379
359
 
380
360
  ### HTTP request headers
381
361
 
@@ -398,10 +378,6 @@ require 'time'
398
378
  require 'bandwidth-sdk'
399
379
  # setup authorization
400
380
  Bandwidth.configure do |config|
401
- # Configure HTTP basic authorization: Basic
402
- config.username = 'YOUR USERNAME'
403
- config.password = 'YOUR PASSWORD'
404
-
405
381
  # Configure OAuth2 access token for authorization: OAuth2
406
382
  config.access_token = 'YOUR ACCESS TOKEN'
407
383
  end
@@ -448,7 +424,7 @@ end
448
424
 
449
425
  ### Authorization
450
426
 
451
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
427
+ [OAuth2](../README.md#OAuth2)
452
428
 
453
429
  ### HTTP request headers
454
430
 
@@ -462,7 +438,7 @@ end
462
438
 
463
439
  Request Toll-Free Verification
464
440
 
465
- Submit a request for verification of a toll-free phone number.
441
+ Submit a request for verification of a toll-free phone number. **Upcoming change (effective January 2027):** If any phone number in the request already has a verification in progress, the request will be rejected with a `409 Conflict`. This check is all-or-nothing: if a single phone number conflicts, the entire request is rejected and **none** of the phone numbers in the request are submitted. Today, these requests are accepted with a `202`.
466
442
 
467
443
  ### Examples
468
444
 
@@ -471,10 +447,6 @@ require 'time'
471
447
  require 'bandwidth-sdk'
472
448
  # setup authorization
473
449
  Bandwidth.configure do |config|
474
- # Configure HTTP basic authorization: Basic
475
- config.username = 'YOUR USERNAME'
476
- config.password = 'YOUR PASSWORD'
477
-
478
450
  # Configure OAuth2 access token for authorization: OAuth2
479
451
  config.access_token = 'YOUR ACCESS TOKEN'
480
452
  end
@@ -522,7 +494,7 @@ nil (empty response body)
522
494
 
523
495
  ### Authorization
524
496
 
525
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
497
+ [OAuth2](../README.md#OAuth2)
526
498
 
527
499
  ### HTTP request headers
528
500
 
@@ -536,7 +508,7 @@ nil (empty response body)
536
508
 
537
509
  Update Toll-Free Verification Request
538
510
 
539
- Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
511
+ Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). Returns a `404` if no verification request exists for the phone number, and a `400` if the existing request is not eligible for resubmission. **Upcoming change (effective January 2027):** If a verification for the phone number is in progress, the update will be rejected with a `409 Conflict`.
540
512
 
541
513
  ### Examples
542
514
 
@@ -545,10 +517,6 @@ require 'time'
545
517
  require 'bandwidth-sdk'
546
518
  # setup authorization
547
519
  Bandwidth.configure do |config|
548
- # Configure HTTP basic authorization: Basic
549
- config.username = 'YOUR USERNAME'
550
- config.password = 'YOUR PASSWORD'
551
-
552
520
  # Configure OAuth2 access token for authorization: OAuth2
553
521
  config.access_token = 'YOUR ACCESS TOKEN'
554
522
  end
@@ -598,7 +566,7 @@ nil (empty response body)
598
566
 
599
567
  ### Authorization
600
568
 
601
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
569
+ [OAuth2](../README.md#OAuth2)
602
570
 
603
571
  ### HTTP request headers
604
572
 
@@ -621,10 +589,6 @@ require 'time'
621
589
  require 'bandwidth-sdk'
622
590
  # setup authorization
623
591
  Bandwidth.configure do |config|
624
- # Configure HTTP basic authorization: Basic
625
- config.username = 'YOUR USERNAME'
626
- config.password = 'YOUR PASSWORD'
627
-
628
592
  # Configure OAuth2 access token for authorization: OAuth2
629
593
  config.access_token = 'YOUR ACCESS TOKEN'
630
594
  end
@@ -675,7 +639,7 @@ end
675
639
 
676
640
  ### Authorization
677
641
 
678
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
642
+ [OAuth2](../README.md#OAuth2)
679
643
 
680
644
  ### HTTP request headers
681
645
 
@@ -24,10 +24,6 @@ require 'time'
24
24
  require 'bandwidth-sdk'
25
25
  # setup authorization
26
26
  Bandwidth.configure do |config|
27
- # Configure HTTP basic authorization: Basic
28
- config.username = 'YOUR USERNAME'
29
- config.password = 'YOUR PASSWORD'
30
-
31
27
  # Configure OAuth2 access token for authorization: OAuth2
32
28
  config.access_token = 'YOUR ACCESS TOKEN'
33
29
  end
@@ -77,7 +73,7 @@ nil (empty response body)
77
73
 
78
74
  ### Authorization
79
75
 
80
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
76
+ [OAuth2](../README.md#OAuth2)
81
77
 
82
78
  ### HTTP request headers
83
79
 
@@ -100,10 +96,6 @@ require 'time'
100
96
  require 'bandwidth-sdk'
101
97
  # setup authorization
102
98
  Bandwidth.configure do |config|
103
- # Configure HTTP basic authorization: Basic
104
- config.username = 'YOUR USERNAME'
105
- config.password = 'YOUR PASSWORD'
106
-
107
99
  # Configure OAuth2 access token for authorization: OAuth2
108
100
  config.access_token = 'YOUR ACCESS TOKEN'
109
101
  end
@@ -154,7 +146,7 @@ end
154
146
 
155
147
  ### Authorization
156
148
 
157
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
149
+ [OAuth2](../README.md#OAuth2)
158
150
 
159
151
  ### HTTP request headers
160
152
 
@@ -177,10 +169,6 @@ require 'time'
177
169
  require 'bandwidth-sdk'
178
170
  # setup authorization
179
171
  Bandwidth.configure do |config|
180
- # Configure HTTP basic authorization: Basic
181
- config.username = 'YOUR USERNAME'
182
- config.password = 'YOUR PASSWORD'
183
-
184
172
  # Configure OAuth2 access token for authorization: OAuth2
185
173
  config.access_token = 'YOUR ACCESS TOKEN'
186
174
  end
@@ -229,7 +217,7 @@ end
229
217
 
230
218
  ### Authorization
231
219
 
232
- [Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2)
220
+ [OAuth2](../README.md#OAuth2)
233
221
 
234
222
  ### HTTP request headers
235
223
 
@@ -24,6 +24,9 @@
24
24
  | **cause** | **String** | Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. | [optional] |
25
25
  | **error_message** | **String** | Text explaining the reason that caused the call to fail in case of errors. | [optional] |
26
26
  | **error_id** | **String** | Bandwidth's internal id that references the error event. | [optional] |
27
+ | **sip_response_code** | **Integer** | (optional) The SIP status code of the final response that rejected an outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603 for decline). Present only when the call was rejected with a SIP response. | [optional] |
28
+ | **sip_status_line** | **String** | (optional) The full SIP status line, exactly as received, of the final response that rejected an outbound call's INVITE. The reason phrase can help distinguish outcomes that share a status code, such as `603 Network Blocked` and `603 Decline`. Present only when an outbound call was rejected with a SIP response. | [optional] |
29
+ | **sip_headers** | **Hash<String, String>** | (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`. | [optional] |
27
30
 
28
31
  ## Example
29
32
 
@@ -50,7 +53,10 @@ instance = Bandwidth::TransferDisconnectCallback.new(
50
53
  transfer_to: +15555555555,
51
54
  cause: busy,
52
55
  error_message: Call c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f is already bridged with another call,
53
- error_id: 4642074b-7b58-478b-96e4-3a60955c6765
56
+ error_id: 4642074b-7b58-478b-96e4-3a60955c6765,
57
+ sip_response_code: 486,
58
+ sip_status_line: SIP/2.0 603 Network Blocked,
59
+ sip_headers: {"x-custom-header":"customer-value","x-session-id":"sess-12345"}
54
60
  )
55
61
  ```
56
62
 
@@ -17,9 +17,9 @@
17
17
  | **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] |
18
18
  | **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] |
19
19
  | **business_dba** | **String** | The company 'Doing Business As'. | [optional] |
20
- | **business_registration_number** | **String** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] |
20
+ | **business_registration_number** | **String** | Government-issued business identifying number. **As of October 19th, 2026 this field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] |
21
21
  | **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] |
22
- | **business_registration_issuing_country** | **String** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] |
22
+ | **business_registration_issuing_country** | **String** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **As of October 19th, 2026 this field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] |
23
23
  | **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | |
24
24
  | **help_message_response** | **String** | A message that gets sent to users requesting help. | [optional] |
25
25
  | **age_gated_content** | **Boolean** | Indicates whether the content is age-gated. | [optional] |
@@ -16,10 +16,10 @@
16
16
  | **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] |
17
17
  | **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] |
18
18
  | **business_dba** | **String** | The company 'Doing Business As'. | [optional] |
19
- | **business_registration_number** | **String** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] |
19
+ | **business_registration_number** | **String** | Government-issued business identifying number. **As of October 19th, 2026 this field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] |
20
20
  | **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] |
21
- | **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] |
22
- | **business_registration_issuing_country** | **String** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] |
21
+ | **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | |
22
+ | **business_registration_issuing_country** | **String** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **As of October 19th, 2026 this field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] |
23
23
  | **help_message_response** | **String** | A message that gets sent to users requesting help. | [optional] |
24
24
  | **age_gated_content** | **Boolean** | Indicates whether the content is age-gated. | [optional] |
25
25
  | **cv_token** | **String** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] |
data/generate.sh ADDED
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ cd "$(dirname "${BASH_SOURCE[0]}")"
4
+
5
+ npx --yes @openapitools/openapi-generator-cli generate \
6
+ -i bandwidth.yml -g ruby -c openapi-config.yml -o . "$@"
7
+
8
+ bundle install
9
+ bundle exec rubocop -A
@@ -74,7 +74,7 @@ module Bandwidth
74
74
  return_type = opts[:debug_return_type] || 'CreateCallResponse'
75
75
 
76
76
  # auth_names
77
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
78
 
79
79
  new_options = opts.merge(
80
80
  :operation => :"CallsApi.create_call",
@@ -143,7 +143,7 @@ module Bandwidth
143
143
  return_type = opts[:debug_return_type] || 'CallState'
144
144
 
145
145
  # auth_names
146
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
146
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
147
147
 
148
148
  new_options = opts.merge(
149
149
  :operation => :"CallsApi.get_call_state",
@@ -235,7 +235,7 @@ module Bandwidth
235
235
  return_type = opts[:debug_return_type] || 'Array<CallState>'
236
236
 
237
237
  # auth_names
238
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
238
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
239
239
 
240
240
  new_options = opts.merge(
241
241
  :operation => :"CallsApi.list_calls",
@@ -315,7 +315,7 @@ module Bandwidth
315
315
  return_type = opts[:debug_return_type]
316
316
 
317
317
  # auth_names
318
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
318
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
319
319
 
320
320
  new_options = opts.merge(
321
321
  :operation => :"CallsApi.update_call",
@@ -395,7 +395,7 @@ module Bandwidth
395
395
  return_type = opts[:debug_return_type]
396
396
 
397
397
  # auth_names
398
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
398
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
399
399
 
400
400
  new_options = opts.merge(
401
401
  :operation => :"CallsApi.update_call_bxml",
@@ -75,7 +75,7 @@ module Bandwidth
75
75
  return_type = opts[:debug_return_type] || 'File'
76
76
 
77
77
  # auth_names
78
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
78
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
79
79
 
80
80
  new_options = opts.merge(
81
81
  :operation => :"ConferencesApi.download_conference_recording",
@@ -144,7 +144,7 @@ module Bandwidth
144
144
  return_type = opts[:debug_return_type] || 'Conference'
145
145
 
146
146
  # auth_names
147
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
147
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
148
148
 
149
149
  new_options = opts.merge(
150
150
  :operation => :"ConferencesApi.get_conference",
@@ -219,7 +219,7 @@ module Bandwidth
219
219
  return_type = opts[:debug_return_type] || 'ConferenceMember'
220
220
 
221
221
  # auth_names
222
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
222
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
223
223
 
224
224
  new_options = opts.merge(
225
225
  :operation => :"ConferencesApi.get_conference_member",
@@ -294,7 +294,7 @@ module Bandwidth
294
294
  return_type = opts[:debug_return_type] || 'ConferenceRecordingMetadata'
295
295
 
296
296
  # auth_names
297
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
297
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
298
298
 
299
299
  new_options = opts.merge(
300
300
  :operation => :"ConferencesApi.get_conference_recording",
@@ -363,7 +363,7 @@ module Bandwidth
363
363
  return_type = opts[:debug_return_type] || 'Array<ConferenceRecordingMetadata>'
364
364
 
365
365
  # auth_names
366
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
366
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
367
367
 
368
368
  new_options = opts.merge(
369
369
  :operation => :"ConferencesApi.list_conference_recordings",
@@ -449,7 +449,7 @@ module Bandwidth
449
449
  return_type = opts[:debug_return_type] || 'Array<Conference>'
450
450
 
451
451
  # auth_names
452
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
452
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
453
453
 
454
454
  new_options = opts.merge(
455
455
  :operation => :"ConferencesApi.list_conferences",
@@ -529,7 +529,7 @@ module Bandwidth
529
529
  return_type = opts[:debug_return_type]
530
530
 
531
531
  # auth_names
532
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
532
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
533
533
 
534
534
  new_options = opts.merge(
535
535
  :operation => :"ConferencesApi.update_conference",
@@ -609,7 +609,7 @@ module Bandwidth
609
609
  return_type = opts[:debug_return_type]
610
610
 
611
611
  # auth_names
612
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
612
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
613
613
 
614
614
  new_options = opts.merge(
615
615
  :operation => :"ConferencesApi.update_conference_bxml",
@@ -695,7 +695,7 @@ module Bandwidth
695
695
  return_type = opts[:debug_return_type]
696
696
 
697
697
  # auth_names
698
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
698
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
699
699
 
700
700
  new_options = opts.merge(
701
701
  :operation => :"ConferencesApi.update_conference_member",
@@ -74,7 +74,7 @@ module Bandwidth
74
74
  return_type = opts[:debug_return_type] || 'CreateEndpointResponse'
75
75
 
76
76
  # auth_names
77
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
78
 
79
79
  new_options = opts.merge(
80
80
  :operation => :"EndpointsApi.create_endpoint",
@@ -143,7 +143,7 @@ module Bandwidth
143
143
  return_type = opts[:debug_return_type]
144
144
 
145
145
  # auth_names
146
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
146
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
147
147
 
148
148
  new_options = opts.merge(
149
149
  :operation => :"EndpointsApi.delete_endpoint",
@@ -212,7 +212,7 @@ module Bandwidth
212
212
  return_type = opts[:debug_return_type] || 'EndpointResponse'
213
213
 
214
214
  # auth_names
215
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
215
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
216
216
 
217
217
  new_options = opts.merge(
218
218
  :operation => :"EndpointsApi.get_endpoint",
@@ -295,7 +295,7 @@ module Bandwidth
295
295
  return_type = opts[:debug_return_type] || 'ListEndpointsResponse'
296
296
 
297
297
  # auth_names
298
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
298
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
299
299
 
300
300
  new_options = opts.merge(
301
301
  :operation => :"EndpointsApi.list_endpoints",
@@ -375,7 +375,7 @@ module Bandwidth
375
375
  return_type = opts[:debug_return_type]
376
376
 
377
377
  # auth_names
378
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
378
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
379
379
 
380
380
  new_options = opts.merge(
381
381
  :operation => :"EndpointsApi.update_endpoint_bxml",
@@ -69,7 +69,7 @@ module Bandwidth
69
69
  return_type = opts[:debug_return_type]
70
70
 
71
71
  # auth_names
72
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
72
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
73
73
 
74
74
  new_options = opts.merge(
75
75
  :operation => :"MediaApi.delete_media",
@@ -138,7 +138,7 @@ module Bandwidth
138
138
  return_type = opts[:debug_return_type] || 'File'
139
139
 
140
140
  # auth_names
141
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
141
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
142
142
 
143
143
  new_options = opts.merge(
144
144
  :operation => :"MediaApi.get_media",
@@ -204,7 +204,7 @@ module Bandwidth
204
204
  return_type = opts[:debug_return_type] || 'Array<Media>'
205
205
 
206
206
  # auth_names
207
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
207
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
208
208
 
209
209
  new_options = opts.merge(
210
210
  :operation => :"MediaApi.list_media",
@@ -224,13 +224,13 @@ module Bandwidth
224
224
  end
225
225
 
226
226
  # Upload Media
227
- # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
227
+ # Upload a file. Filename should always be unique. Reusing filenames may result in the wrong media being sent. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
228
228
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
229
229
  # @param media_id [String] The ID of the media file.
230
230
  # @param body [File]
231
231
  # @param [Hash] opts the optional parameters
232
232
  # @option opts [String] :content_type The media type of the entity-body.
233
- # @option opts [String] :cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.
233
+ # @option opts [String] :cache_control Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior.
234
234
  # @return [nil]
235
235
  def upload_media(account_id, media_id, body, opts = {})
236
236
  upload_media_with_http_info(account_id, media_id, body, opts)
@@ -238,13 +238,13 @@ module Bandwidth
238
238
  end
239
239
 
240
240
  # Upload Media
241
- # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
241
+ # Upload a file. Filename should always be unique. Reusing filenames may result in the wrong media being sent. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
242
242
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
243
243
  # @param media_id [String] The ID of the media file.
244
244
  # @param body [File]
245
245
  # @param [Hash] opts the optional parameters
246
246
  # @option opts [String] :content_type The media type of the entity-body.
247
- # @option opts [String] :cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain.
247
+ # @option opts [String] :cache_control Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior.
248
248
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
249
249
  def upload_media_with_http_info(account_id, media_id, body, opts = {})
250
250
  if @api_client.config.debugging
@@ -290,7 +290,7 @@ module Bandwidth
290
290
  return_type = opts[:debug_return_type]
291
291
 
292
292
  # auth_names
293
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
293
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
294
294
 
295
295
  new_options = opts.merge(
296
296
  :operation => :"MediaApi.upload_media",
@@ -74,7 +74,7 @@ module Bandwidth
74
74
  return_type = opts[:debug_return_type] || 'Message'
75
75
 
76
76
  # auth_names
77
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
78
 
79
79
  new_options = opts.merge(
80
80
  :operation => :"MessagesApi.create_message",
@@ -218,7 +218,7 @@ module Bandwidth
218
218
  return_type = opts[:debug_return_type] || 'MessagesList'
219
219
 
220
220
  # auth_names
221
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
221
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
222
222
 
223
223
  new_options = opts.merge(
224
224
  :operation => :"MessagesApi.list_messages",
@@ -74,7 +74,7 @@ module Bandwidth
74
74
  return_type = opts[:debug_return_type] || 'MessagingCodeResponse'
75
75
 
76
76
  # auth_names
77
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
78
 
79
79
  new_options = opts.merge(
80
80
  :operation => :"MFAApi.generate_messaging_code",
@@ -148,7 +148,7 @@ module Bandwidth
148
148
  return_type = opts[:debug_return_type] || 'VoiceCodeResponse'
149
149
 
150
150
  # auth_names
151
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
151
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
152
152
 
153
153
  new_options = opts.merge(
154
154
  :operation => :"MFAApi.generate_voice_code",
@@ -222,7 +222,7 @@ module Bandwidth
222
222
  return_type = opts[:debug_return_type] || 'VerifyCodeResponse'
223
223
 
224
224
  # auth_names
225
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
225
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
226
226
 
227
227
  new_options = opts.merge(
228
228
  :operation => :"MFAApi.verify_code",
@@ -74,7 +74,7 @@ module Bandwidth
74
74
  return_type = opts[:debug_return_type] || 'CreateMultiChannelMessageResponse'
75
75
 
76
76
  # auth_names
77
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
78
 
79
79
  new_options = opts.merge(
80
80
  :operation => :"MultiChannelApi.create_multi_channel_message",
@@ -74,7 +74,7 @@ module Bandwidth
74
74
  return_type = opts[:debug_return_type] || 'CreateAsyncBulkLookupResponse'
75
75
 
76
76
  # auth_names
77
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
78
 
79
79
  new_options = opts.merge(
80
80
  :operation => :"PhoneNumberLookupApi.create_async_bulk_lookup",
@@ -148,7 +148,7 @@ module Bandwidth
148
148
  return_type = opts[:debug_return_type] || 'CreateSyncLookupResponse'
149
149
 
150
150
  # auth_names
151
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
151
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
152
152
 
153
153
  new_options = opts.merge(
154
154
  :operation => :"PhoneNumberLookupApi.create_sync_lookup",
@@ -217,7 +217,7 @@ module Bandwidth
217
217
  return_type = opts[:debug_return_type] || 'GetAsyncBulkLookupResponse'
218
218
 
219
219
  # auth_names
220
- auth_names = opts[:debug_auth_names] || ['Basic', 'OAuth2']
220
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
221
221
 
222
222
  new_options = opts.merge(
223
223
  :operation => :"PhoneNumberLookupApi.get_async_bulk_lookup",