From 72396d95adc9e750f7a19b0fc1d75ce1dca3c524 Mon Sep 17 00:00:00 2001 From: adambaldwin Date: Tue, 13 Oct 2026 15:18:13 -0400 Subject: [PATCH] MV-21235 Update SDK Based on Recent Spec Changes Co-Authored-By: Claude Sonnet 5.5 --- bandwidth.yml | 80 ++++++++++++++----- docs/MediaApi.md | 6 +- docs/TfvSubmissionInfo.md | 4 +- docs/TollFreeVerificationApi.md | 6 +- docs/VerificationRequest.md | 4 +- docs/VerificationUpdateRequest.md | 6 +- lib/bandwidth-sdk/api/media_api.rb | 8 +- .../api/toll_free_verification_api.rb | 12 +-- .../models/tfv_submission_info.rb | 4 +- .../models/verification_request.rb | 4 +- .../models/verification_update_request.rb | 21 ++++- .../models/tfv_submission_wrapper_spec.rb | 3 +- .../verification_update_request_spec.rb | 6 +- 13 files changed, 113 insertions(+), 51 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index 53949fed..6b44f54f 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -88,12 +88,11 @@ paths: put: summary: Upload Media description: >- - Upload a file. You may add headers to the request in order to provide - some control to your media file. + Upload a 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. + 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 @@ -1404,7 +1403,19 @@ paths: tags: - Toll-Free Verification summary: Request Toll-Free Verification - description: Submit a request for verification of a toll-free phone number. + description: >- + 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`. operationId: requestTollFreeVerification parameters: - $ref: '#/components/parameters/accountId4' @@ -1421,6 +1432,8 @@ paths: $ref: '#/components/responses/tfvForbiddenResponse' '405': $ref: '#/components/responses/tfvNotAllowedResponse' + '409': + $ref: '#/components/responses/tfvConflictResponse' '429': $ref: '#/components/responses/tfvTooManyRequestsResponse' '500': @@ -1477,6 +1490,14 @@ paths: 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`. operationId: updateTollFreeVerificationRequest parameters: - $ref: '#/components/parameters/accountId4' @@ -1492,8 +1513,12 @@ paths: $ref: '#/components/responses/tfvUnauthorizedResponse' '403': $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' '405': $ref: '#/components/responses/tfvNotAllowedResponse' + '409': + $ref: '#/components/responses/tfvConflictResponse' '429': $ref: '#/components/responses/tfvTooManyRequestsResponse' '500': @@ -1504,7 +1529,13 @@ paths: tfVerificationStatus: $ref: '#/components/callbacks/tfVerificationStatus' delete: - description: Delete a toll-free verification submission for a toll-free number. + description: >- + 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. operationId: deleteVerificationRequest parameters: - $ref: '#/components/parameters/accountId4' @@ -6273,10 +6304,9 @@ components: 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.** + **This field is required when `businessEntityType` is _not_ + `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` + and `businessRegistrationIssuingCountry` are also required.** nullable: true maxLength: 500 example: 12-3456789 @@ -6286,8 +6316,8 @@ components: The type of business registration number. - **Note: As of October 19th, 2026 this field will be required when - `businessRegistrationNumber` is provided.** + **This field is required when `businessRegistrationNumber` is + provided.** enum: - EIN - CBN @@ -6317,8 +6347,8 @@ components: encouraged. - **Note: As of October 19th, 2026 this field will be required when - `businessRegistrationNumber` is provided.** + **This field is required when `businessRegistrationNumber` is + provided.** | Registration Type | Supported Countries | @@ -6368,9 +6398,9 @@ components: The type of registered business. - **Note: As of October 19th, 2026 submissions using a value other than - `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, - `businessRegistrationType`, and `businessRegistrationIssuingCountry`. + **Submissions using a value other than `SOLE_PROPRIETOR` must provide a + value for `businessRegistrationNumber`, `businessRegistrationType`, and + `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and @@ -6490,6 +6520,7 @@ components: - useCaseSummary - productionMessageContent - optInWorkflow + - businessEntityType properties: businessAddress: $ref: '#/components/schemas/address' @@ -8072,6 +8103,17 @@ components: example: description: Cannot find the requested resource. type: Not Found + tfvConflictResponse: + description: >- + Conflict. A toll-free verification for the phone number is already in + progress. + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: 'TFV request already in progress for phone number: +18005551234' + type: conflict tfvNotAllowedResponse: description: Method Not Allowed content: @@ -8256,8 +8298,8 @@ components: style: simple explode: false description: >- - General-header field is used to specify directives that MUST be obeyed - by all caching mechanisms along the request/response chain. + Pass-through header stored with the media and returned when the media is + retrieved by the user. Does not affect internal server caching behavior. example: no-cache schema: type: string diff --git a/docs/MediaApi.md b/docs/MediaApi.md index ab6fd49f..8c800661 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -242,7 +242,7 @@ end Upload Media -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). +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). ### Examples @@ -265,7 +265,7 @@ media_id = 'bw.png' # String | The ID of the media file. body = File.new('/path/to/some/file') # File | opts = { content_type: 'audio/wav', # String | The media type of the entity-body. - cache_control: 'no-cache' # String | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. + cache_control: 'no-cache' # String | Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior. } begin @@ -302,7 +302,7 @@ end | **media_id** | **String** | The ID of the media file. | | | **body** | **File** | | | | **content_type** | **String** | The media type of the entity-body. | [optional] | -| **cache_control** | **String** | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | [optional] | +| **cache_control** | **String** | Pass-through header stored with the media and returned when the media is retrieved by the user. Does not affect internal server caching behavior. | [optional] | ### Return type diff --git a/docs/TfvSubmissionInfo.md b/docs/TfvSubmissionInfo.md index c0409e65..e944e7c3 100644 --- a/docs/TfvSubmissionInfo.md +++ b/docs/TfvSubmissionInfo.md @@ -16,9 +16,9 @@ | **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] | | **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] | | **business_dba** | **String** | The company 'Doing Business As'. | [optional] | -| **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] | +| **business_registration_number** | **String** | Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] | | **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] | -| **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] | +| **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. **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] | | **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] | ## Example diff --git a/docs/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md index 9fd133a9..1646e37b 100644 --- a/docs/TollFreeVerificationApi.md +++ b/docs/TollFreeVerificationApi.md @@ -96,7 +96,7 @@ end Delete a Toll-Free Verification Submission -Delete a toll-free verification submission for a toll-free number. +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. ### Examples @@ -462,7 +462,7 @@ end Request Toll-Free Verification -Submit a request for verification of a toll-free phone number. +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`. ### Examples @@ -536,7 +536,7 @@ nil (empty response body) Update Toll-Free Verification Request -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). +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`. ### Examples diff --git a/docs/VerificationRequest.md b/docs/VerificationRequest.md index b2eda27d..276f09e9 100644 --- a/docs/VerificationRequest.md +++ b/docs/VerificationRequest.md @@ -17,9 +17,9 @@ | **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] | | **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] | | **business_dba** | **String** | The company 'Doing Business As'. | [optional] | -| **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] | +| **business_registration_number** | **String** | Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] | | **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] | -| **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] | +| **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. **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] | | **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | | | **help_message_response** | **String** | A message that gets sent to users requesting help. | [optional] | | **age_gated_content** | **Boolean** | Indicates whether the content is age-gated. | [optional] | diff --git a/docs/VerificationUpdateRequest.md b/docs/VerificationUpdateRequest.md index 0dce8f2b..aeb4a012 100644 --- a/docs/VerificationUpdateRequest.md +++ b/docs/VerificationUpdateRequest.md @@ -16,10 +16,10 @@ | **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] | | **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] | | **business_dba** | **String** | The company 'Doing Business As'. | [optional] | -| **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] | +| **business_registration_number** | **String** | Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] | | **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] | -| **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] | -| **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] | +| **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | | +| **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. **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] | | **help_message_response** | **String** | A message that gets sent to users requesting help. | [optional] | | **age_gated_content** | **Boolean** | Indicates whether the content is age-gated. | [optional] | | **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] | diff --git a/lib/bandwidth-sdk/api/media_api.rb b/lib/bandwidth-sdk/api/media_api.rb index 7ca88f54..cbe04871 100644 --- a/lib/bandwidth-sdk/api/media_api.rb +++ b/lib/bandwidth-sdk/api/media_api.rb @@ -224,13 +224,13 @@ def list_media_with_http_info(account_id, opts = {}) end # Upload Media - # 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). + # 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). # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** # @param media_id [String] The ID of the media file. # @param body [File] # @param [Hash] opts the optional parameters # @option opts [String] :content_type The media type of the entity-body. - # @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. + # @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. # @return [nil] def upload_media(account_id, media_id, body, opts = {}) upload_media_with_http_info(account_id, media_id, body, opts) @@ -238,13 +238,13 @@ def upload_media(account_id, media_id, body, opts = {}) end # Upload Media - # 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). + # 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). # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** # @param media_id [String] The ID of the media file. # @param body [File] # @param [Hash] opts the optional parameters # @option opts [String] :content_type The media type of the entity-body. - # @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. + # @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. # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def upload_media_with_http_info(account_id, media_id, body, opts = {}) if @api_client.config.debugging diff --git a/lib/bandwidth-sdk/api/toll_free_verification_api.rb b/lib/bandwidth-sdk/api/toll_free_verification_api.rb index 70254f60..b62c4929 100644 --- a/lib/bandwidth-sdk/api/toll_free_verification_api.rb +++ b/lib/bandwidth-sdk/api/toll_free_verification_api.rb @@ -94,7 +94,7 @@ def create_webhook_subscription_with_http_info(account_id, webhook_subscription_ end # Delete a Toll-Free Verification Submission - # Delete a toll-free verification submission for a toll-free number. + # 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. # @param account_id [String] Your Bandwidth Account ID. # @param phone_number [String] Valid Toll-Free telephone number in E.164 format. # @param [Hash] opts the optional parameters @@ -105,7 +105,7 @@ def delete_verification_request(account_id, phone_number, opts = {}) end # Delete a Toll-Free Verification Submission - # Delete a toll-free verification submission for a toll-free number. + # 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. # @param account_id [String] Your Bandwidth Account ID. # @param phone_number [String] Valid Toll-Free telephone number in E.164 format. # @param [Hash] opts the optional parameters @@ -447,7 +447,7 @@ def list_webhook_subscriptions_with_http_info(account_id, opts = {}) end # Request Toll-Free Verification - # Submit a request for verification of a toll-free phone number. + # 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`. # @param account_id [String] Your Bandwidth Account ID. # @param verification_request [VerificationRequest] Request for verification of a toll-free phone number. # @param [Hash] opts the optional parameters @@ -458,7 +458,7 @@ def request_toll_free_verification(account_id, verification_request, opts = {}) end # Request Toll-Free Verification - # Submit a request for verification of a toll-free phone number. + # 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`. # @param account_id [String] Your Bandwidth Account ID. # @param verification_request [VerificationRequest] Request for verification of a toll-free phone number. # @param [Hash] opts the optional parameters @@ -521,7 +521,7 @@ def request_toll_free_verification_with_http_info(account_id, verification_reque end # Update Toll-Free Verification Request - # 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). + # 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`. # @param account_id [String] Your Bandwidth Account ID. # @param phone_number [String] Valid Toll-Free telephone number in E.164 format. # @param tfv_submission_wrapper [TfvSubmissionWrapper] Update a request for verification of a toll-free phone number. @@ -533,7 +533,7 @@ def update_toll_free_verification_request(account_id, phone_number, tfv_submissi end # Update Toll-Free Verification Request - # 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). + # 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`. # @param account_id [String] Your Bandwidth Account ID. # @param phone_number [String] Valid Toll-Free telephone number in E.164 format. # @param tfv_submission_wrapper [TfvSubmissionWrapper] Update a request for verification of a toll-free phone number. diff --git a/lib/bandwidth-sdk/models/tfv_submission_info.rb b/lib/bandwidth-sdk/models/tfv_submission_info.rb index 75be5720..5c9f3161 100644 --- a/lib/bandwidth-sdk/models/tfv_submission_info.rb +++ b/lib/bandwidth-sdk/models/tfv_submission_info.rb @@ -48,12 +48,12 @@ class TfvSubmissionInfo < ApiModelBase # The company 'Doing Business As'. attr_accessor :business_dba - # 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.** + # Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** attr_accessor :business_registration_number attr_accessor :business_registration_type - # 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 | + # 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. **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 | attr_accessor :business_registration_issuing_country attr_accessor :business_entity_type diff --git a/lib/bandwidth-sdk/models/verification_request.rb b/lib/bandwidth-sdk/models/verification_request.rb index ce67e407..370a5e73 100644 --- a/lib/bandwidth-sdk/models/verification_request.rb +++ b/lib/bandwidth-sdk/models/verification_request.rb @@ -50,12 +50,12 @@ class VerificationRequest < ApiModelBase # The company 'Doing Business As'. attr_accessor :business_dba - # 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.** + # Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** attr_accessor :business_registration_number attr_accessor :business_registration_type - # 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 | + # 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. **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 | attr_accessor :business_registration_issuing_country attr_accessor :business_entity_type diff --git a/lib/bandwidth-sdk/models/verification_update_request.rb b/lib/bandwidth-sdk/models/verification_update_request.rb index 3100ded5..02639f83 100644 --- a/lib/bandwidth-sdk/models/verification_update_request.rb +++ b/lib/bandwidth-sdk/models/verification_update_request.rb @@ -48,14 +48,14 @@ class VerificationUpdateRequest < ApiModelBase # The company 'Doing Business As'. attr_accessor :business_dba - # 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.** + # Government-issued business identifying number. **This field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** attr_accessor :business_registration_number attr_accessor :business_registration_type attr_accessor :business_entity_type - # 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 | + # 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. **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 | attr_accessor :business_registration_issuing_country # A message that gets sent to users requesting help. @@ -250,6 +250,8 @@ def initialize(attributes = {}) if attributes.key?(:'business_entity_type') self.business_entity_type = attributes[:'business_entity_type'] + else + self.business_entity_type = nil end if attributes.key?(:'business_registration_issuing_country') @@ -366,6 +368,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.') end + if @business_entity_type.nil? + invalid_properties.push('invalid value for "business_entity_type", business_entity_type cannot be nil.') + end + if !@help_message_response.nil? && @help_message_response.to_s.length > 500 invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.') end @@ -408,6 +414,7 @@ def valid? return false if !@terms_and_conditions_url.nil? && @terms_and_conditions_url.to_s.length > 500 return false if !@business_dba.nil? && @business_dba.to_s.length > 500 return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500 + return false if @business_entity_type.nil? return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500 return false if !@cv_token.nil? && @cv_token.to_s.length > 500 return false if !@cv_token.nil? && @cv_token.to_s.length < 0 @@ -596,6 +603,16 @@ def business_registration_number=(business_registration_number) @business_registration_number = business_registration_number end + # Custom attribute writer method with validation + # @param [Object] business_entity_type Value to be assigned + def business_entity_type=(business_entity_type) + if business_entity_type.nil? + fail ArgumentError, 'business_entity_type cannot be nil' + end + + @business_entity_type = business_entity_type + end + # Custom attribute writer method with validation # @param [Object] help_message_response Value to be assigned def help_message_response=(help_message_response) diff --git a/spec/unit/models/tfv_submission_wrapper_spec.rb b/spec/unit/models/tfv_submission_wrapper_spec.rb index 4802ea6d..fc6ea288 100644 --- a/spec/unit/models/tfv_submission_wrapper_spec.rb +++ b/spec/unit/models/tfv_submission_wrapper_spec.rb @@ -44,7 +44,8 @@ optInWorkflow: { description: 'opt-in via website', imageUrls: ['https://example.com/optin.png'] }, privacyPolicyUrl: 'https://example.com/privacy', termsAndConditionsUrl: 'https://example.com/terms', - businessDba: 'Bandwidth Inc' + businessDba: 'Bandwidth Inc', + businessEntityType: 'SOLE_PROPRIETOR' } }) expect(tfv_submission_wrapper_from_hash).to be_instance_of(Bandwidth::TfvSubmissionWrapper) diff --git a/spec/unit/models/verification_update_request_spec.rb b/spec/unit/models/verification_update_request_spec.rb index 56384687..96fdec9e 100644 --- a/spec/unit/models/verification_update_request_spec.rb +++ b/spec/unit/models/verification_update_request_spec.rb @@ -7,7 +7,8 @@ use_case: 'baseline use case', use_case_summary: 'baseline summary', production_message_content: 'baseline message', - opt_in_workflow: { description: 'baseline opt-in', imageUrls: [] } + opt_in_workflow: { description: 'baseline opt-in', imageUrls: [] }, + business_entity_type: Bandwidth::BusinessEntityTypeEnum::SOLE_PROPRIETOR }) } let(:verification_update_request_values) { Bandwidth::VerificationUpdateRequest.new({ business_address: { name: 'Bandwidth' }, @@ -126,7 +127,8 @@ use_case: 'baseline use case', use_case_summary: 'baseline summary', production_message_content: 'baseline message', - opt_in_workflow: { description: 'baseline opt-in', imageUrls: [] } + opt_in_workflow: { description: 'baseline opt-in', imageUrls: [] }, + business_entity_type: Bandwidth::BusinessEntityTypeEnum::SOLE_PROPRIETOR }) expect(verification_update_request_default.eql?(verification_update_request_equal)).to be true expect(verification_update_request_default.eql?(verification_update_request_values)).to be false