From 8e0e31df29333efc3ca3014bce8e55d0bcbe9973 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 26 Aug 2025 14:07:35 +0000 Subject: [PATCH 1/2] Generate SDK with OpenAPI Generator Version --- .openapi-generator/FILES | 6 + README.md | 3 + bandwidth.yml | 254 ++++++++++++++++++ docs/BusinessEntityTypeEnum.md | 15 ++ docs/BusinessRegistrationTypeEnum.md | 15 ++ docs/ListMessageItem.md | 14 +- docs/MessagesApi.md | 24 ++ docs/OptInWorkflow.md | 4 +- docs/ProductTypeEnum.md | 15 ++ docs/RbmActionBase.md | 2 +- docs/RbmSuggestionResponse.md | 2 +- docs/TfvSubmissionInfo.md | 8 +- docs/VerificationRequest.md | 12 +- docs/VerificationUpdateRequest.md | 12 +- lib/bandwidth-sdk.rb | 3 + lib/bandwidth-sdk/api/messages_api.rb | 36 +++ .../models/business_entity_type_enum.rb | 43 +++ .../models/business_registration_type_enum.rb | 40 +++ lib/bandwidth-sdk/models/list_message_item.rb | 76 +++++- lib/bandwidth-sdk/models/message_type_enum.rb | 3 +- lib/bandwidth-sdk/models/opt_in_workflow.rb | 42 ++- lib/bandwidth-sdk/models/product_type_enum.rb | 47 ++++ .../models/tfv_submission_info.rb | 76 +++++- .../models/verification_request.rb | 112 +++++++- .../models/verification_update_request.rb | 112 +++++++- 25 files changed, 947 insertions(+), 29 deletions(-) create mode 100644 docs/BusinessEntityTypeEnum.md create mode 100644 docs/BusinessRegistrationTypeEnum.md create mode 100644 docs/ProductTypeEnum.md create mode 100644 lib/bandwidth-sdk/models/business_entity_type_enum.rb create mode 100644 lib/bandwidth-sdk/models/business_registration_type_enum.rb create mode 100644 lib/bandwidth-sdk/models/product_type_enum.rb diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index ce9ee26b..3acca0e7 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -11,6 +11,8 @@ docs/AnswerCallback.md docs/BlockedWebhook.md docs/BridgeCompleteCallback.md docs/BridgeTargetCompleteCallback.md +docs/BusinessEntityTypeEnum.md +docs/BusinessRegistrationTypeEnum.md docs/CallDirectionEnum.md docs/CallRecordingMetadata.md docs/CallState.md @@ -100,6 +102,7 @@ docs/OptInWorkflow.md docs/PageInfo.md docs/PhoneNumberLookupApi.md docs/PriorityEnum.md +docs/ProductTypeEnum.md docs/RbmActionBase.md docs/RbmActionDial.md docs/RbmActionOpenUrl.md @@ -189,6 +192,8 @@ lib/bandwidth-sdk/models/answer_callback.rb lib/bandwidth-sdk/models/blocked_webhook.rb lib/bandwidth-sdk/models/bridge_complete_callback.rb lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +lib/bandwidth-sdk/models/business_entity_type_enum.rb +lib/bandwidth-sdk/models/business_registration_type_enum.rb lib/bandwidth-sdk/models/call_direction_enum.rb lib/bandwidth-sdk/models/call_recording_metadata.rb lib/bandwidth-sdk/models/call_state.rb @@ -271,6 +276,7 @@ lib/bandwidth-sdk/models/multi_channel_message_response_data_channel_list_inner. lib/bandwidth-sdk/models/opt_in_workflow.rb lib/bandwidth-sdk/models/page_info.rb lib/bandwidth-sdk/models/priority_enum.rb +lib/bandwidth-sdk/models/product_type_enum.rb lib/bandwidth-sdk/models/rbm_action_base.rb lib/bandwidth-sdk/models/rbm_action_dial.rb lib/bandwidth-sdk/models/rbm_action_open_url.rb diff --git a/README.md b/README.md index 97229bd7..2f137c2a 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,8 @@ Class | Method | HTTP request | Description - [Bandwidth::BlockedWebhook](docs/BlockedWebhook.md) - [Bandwidth::BridgeCompleteCallback](docs/BridgeCompleteCallback.md) - [Bandwidth::BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md) + - [Bandwidth::BusinessEntityTypeEnum](docs/BusinessEntityTypeEnum.md) + - [Bandwidth::BusinessRegistrationTypeEnum](docs/BusinessRegistrationTypeEnum.md) - [Bandwidth::CallDirectionEnum](docs/CallDirectionEnum.md) - [Bandwidth::CallRecordingMetadata](docs/CallRecordingMetadata.md) - [Bandwidth::CallState](docs/CallState.md) @@ -249,6 +251,7 @@ Class | Method | HTTP request | Description - [Bandwidth::OptInWorkflow](docs/OptInWorkflow.md) - [Bandwidth::PageInfo](docs/PageInfo.md) - [Bandwidth::PriorityEnum](docs/PriorityEnum.md) + - [Bandwidth::ProductTypeEnum](docs/ProductTypeEnum.md) - [Bandwidth::RbmActionBase](docs/RbmActionBase.md) - [Bandwidth::RbmActionDial](docs/RbmActionDial.md) - [Bandwidth::RbmActionOpenUrl](docs/RbmActionOpenUrl.md) diff --git a/bandwidth.yml b/bandwidth.yml index 4b3681cb..004fb91b 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -179,6 +179,18 @@ paths: - $ref: '#/components/parameters/fromDateTime' - $ref: '#/components/parameters/toDateTime' - $ref: '#/components/parameters/campaignId' + - $ref: '#/components/parameters/fromBwLatency' + - $ref: '#/components/parameters/bwQueued' + - $ref: '#/components/parameters/product' + - $ref: '#/components/parameters/location' + - $ref: '#/components/parameters/carrierQueued' + - $ref: '#/components/parameters/fromCarrierLatency' + - $ref: '#/components/parameters/callingNumberCountryA3' + - $ref: '#/components/parameters/calledNumberCountryA3' + - $ref: '#/components/parameters/fromSegmentCount' + - $ref: '#/components/parameters/toSegmentCount' + - $ref: '#/components/parameters/fromMessageSize' + - $ref: '#/components/parameters/toMessageSize' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/pageToken' - $ref: '#/components/parameters/limit' @@ -1716,7 +1728,22 @@ components: enum: - sms - mms + - rcs example: sms + productTypeEnum: + type: string + description: The type of product associated with the message. + enum: + - LOCAL_A2P + - P2P + - SHORT_CODE_REACH + - TOLL_FREE + - HOSTED_SHORT_CODE + - ALPHA_NUMERIC + - RBM_MEDIA + - RBM_RICH + - RBM_CONVERSATIONAL + example: P2P fieldError: type: object properties: @@ -1819,6 +1846,41 @@ components: description: The campaign ID of the message if it has one. nullable: true example: CJEUMDK + bwLatency: + type: integer + description: >- + The Bandwidth latency of the message in seconds. Only available for + accounts with the Advanced Quality Metrics feature enabled. + nullable: true + example: 20 + carrierLatency: + type: integer + description: >- + The carrier latency of the message in seconds. Only available for + OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + nullable: true + example: 20 + callingNumberCountryA3: + type: string + description: The A3 country code of the calling number. + nullable: true + example: USA + calledNumberCountryA3: + type: string + description: The A3 country code of the called number. + nullable: true + example: USA + product: + type: string + description: The messaging product associated with the message. + nullable: true + example: P2P + location: + type: string + description: The location ID associated with this message. + nullable: true + example: 123ID pageInfo: title: PageInfo type: object @@ -5478,6 +5540,50 @@ components: description: The company 'Doing Business As'. example: Another Company Name Inc. type: string + businessRegistrationNumber: + type: string + description: >- + US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional + until early 2026. If a value is provided for this field, a value must be + provided for `businessRegistrationType` and `businessEntityType`. + Available starting October 1st, 2025. + nullable: true + maxLength: 500 + example: 12-3456789 + businessRegistrationTypeEnum: + type: string + description: >- + The type of business registration number. Optional until early 2026; + required if `businessRegistrationNumber` is provided. Available starting + October 1st, 2025. + enum: + - EIN + - CBN + nullable: true + businessEntityTypeEnum: + type: string + description: >- + The type of registered business. If no option is applicable, please + provide "SOLE_PROPRIETOR" as a value. Optional until early 2026; + required if `businessRegistrationNumber` is provided. Available starting + October 1st, 2025. + enum: + - SOLE_PROPRIETOR + - PRIVATE_PROFIT + - PUBLIC_PROFIT + - NON_PROFIT + - GOVERNMENT + nullable: true + helpMessageResponse: + type: string + description: A message that gets sent to users requesting help. + nullable: true + maxLength: 500 + example: Please contact support for assistance. + ageGatedContent: + type: boolean + description: Indicates whether the content is age-gated. + example: false additionalDenialReason: properties: statusCode: @@ -5564,6 +5670,16 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + $ref: '#/components/schemas/helpMessageResponse' + ageGatedContent: + $ref: '#/components/schemas/ageGatedContent' verificationUpdateRequest: type: object required: @@ -5603,6 +5719,16 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + $ref: '#/components/schemas/helpMessageResponse' + ageGatedContent: + $ref: '#/components/schemas/ageGatedContent' tfvBasicAuthentication: type: object properties: @@ -5806,6 +5932,12 @@ components: example: https://www.example.com/path/to/resource pattern: >- ^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*) + confirmationResponse: + type: string + minLength: 0 + maxLength: 500 + nullable: true + example: Thank you for opting in! isvReseller: type: string description: ISV name. @@ -6079,6 +6211,22 @@ components: $ref: '#/components/schemas/termsAndConditionsUrl' businessDba: $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + description: >- + US Federal Tax ID Number (EIN) or Canada Business Number (CBN). + Available starting October 1st, 2025. + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + description: >- + The type of business registration number. Available starting October + 1st, 2025. + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + description: >- + The type of registered business. If no option is applicable, please + provide "SOLE_PROPRIETOR" as a value. Available starting October + 1st, 2025. tfvStatusEnum: type: string enum: @@ -6940,6 +7088,112 @@ components: example: CJEUMDK schema: type: string + fromBwLatency: + in: query + name: fromBwLatency + required: false + description: >- + The minimum Bandwidth latency of the message in seconds. Only available + for accounts with the Advanced Quality Metrics feature enabled. + example: 5 + schema: + type: integer + bwQueued: + in: query + name: bwQueued + required: false + description: >- + A boolean value indicating whether the message is queued in the + Bandwidth network. + example: true + schema: + type: boolean + product: + in: query + name: product + required: false + description: Messaging product associated with the message. + example: P2P + schema: + $ref: '#/components/schemas/productTypeEnum' + location: + in: query + name: location + required: false + description: Location Id associated with the message. + example: 123ABC + schema: + type: string + carrierQueued: + in: query + name: carrierQueued + required: false + description: >- + A boolean value indicating whether the message is queued in the carrier + network. Only available for OUTBOUND messages from accounts with the + Advanced Quality Metrics feature enabled. + example: true + schema: + type: boolean + fromCarrierLatency: + in: query + name: fromCarrierLatency + required: false + description: >- + The minimum carrier latency of the message in seconds. Only available + for OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + example: 50 + schema: + type: integer + callingNumberCountryA3: + in: query + name: callingNumberCountryA3 + required: false + description: Calling number country in A3 format. + example: USA + schema: + type: string + calledNumberCountryA3: + in: query + name: calledNumberCountryA3 + required: false + description: Called number country in A3 format. + example: USA + schema: + type: string + fromSegmentCount: + in: query + name: fromSegmentCount + required: false + description: Segment count (start range). + example: 1 + schema: + type: integer + toSegmentCount: + in: query + name: toSegmentCount + required: false + description: Segment count (end range). + example: 3 + schema: + type: integer + fromMessageSize: + in: query + name: fromMessageSize + required: false + description: Message size (start range). + example: 100 + schema: + type: integer + toMessageSize: + in: query + name: toMessageSize + required: false + description: Message size (end range). + example: 120 + schema: + type: integer sort: in: query name: sort diff --git a/docs/BusinessEntityTypeEnum.md b/docs/BusinessEntityTypeEnum.md new file mode 100644 index 00000000..0ccc4c60 --- /dev/null +++ b/docs/BusinessEntityTypeEnum.md @@ -0,0 +1,15 @@ +# Bandwidth::BusinessEntityTypeEnum + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'bandwidth-sdk' + +instance = Bandwidth::BusinessEntityTypeEnum.new() +``` + diff --git a/docs/BusinessRegistrationTypeEnum.md b/docs/BusinessRegistrationTypeEnum.md new file mode 100644 index 00000000..313cd785 --- /dev/null +++ b/docs/BusinessRegistrationTypeEnum.md @@ -0,0 +1,15 @@ +# Bandwidth::BusinessRegistrationTypeEnum + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'bandwidth-sdk' + +instance = Bandwidth::BusinessRegistrationTypeEnum.new() +``` + diff --git a/docs/ListMessageItem.md b/docs/ListMessageItem.md index f4ddf253..4e0918c8 100644 --- a/docs/ListMessageItem.md +++ b/docs/ListMessageItem.md @@ -21,6 +21,12 @@ | **recipient_count** | **Integer** | The number of recipients the message has. | [optional] | | **campaign_class** | **String** | The campaign class of the message if it has one. | [optional] | | **campaign_id** | **String** | The campaign ID of the message if it has one. | [optional] | +| **bw_latency** | **Integer** | The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **carrier_latency** | **Integer** | The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **calling_number_country_a3** | **String** | The A3 country code of the calling number. | [optional] | +| **called_number_country_a3** | **String** | The A3 country code of the called number. | [optional] | +| **product** | **String** | The messaging product associated with the message. | [optional] | +| **location** | **String** | The location ID associated with this message. | [optional] | ## Example @@ -44,7 +50,13 @@ instance = Bandwidth::ListMessageItem.new( attachment_count: 1, recipient_count: 1, campaign_class: T, - campaign_id: CJEUMDK + campaign_id: CJEUMDK, + bw_latency: 20, + carrier_latency: 20, + calling_number_country_a3: USA, + called_number_country_a3: USA, + product: P2P, + location: 123ID ) ``` diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index b32f532d..c0616667 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -114,6 +114,18 @@ opts = { from_date_time: '2022-09-14T18:20:16.000Z', # String | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. to_date_time: '2022-09-14T18:20:16.000Z', # String | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. campaign_id: 'CJEUMDK', # String | The campaign ID of the message. + from_bw_latency: 5, # Integer | The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + bw_queued: true, # Boolean | A boolean value indicating whether the message is queued in the Bandwidth network. + product: Bandwidth::ProductTypeEnum::LOCAL_A2_P, # ProductTypeEnum | Messaging product associated with the message. + location: '123ABC', # String | Location Id associated with the message. + carrier_queued: true, # Boolean | A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + from_carrier_latency: 50, # Integer | The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + calling_number_country_a3: 'USA', # String | Calling number country in A3 format. + called_number_country_a3: 'USA', # String | Called number country in A3 format. + from_segment_count: 1, # Integer | Segment count (start range). + to_segment_count: 3, # Integer | Segment count (end range). + from_message_size: 100, # Integer | Message size (start range). + to_message_size: 120, # Integer | Message size (end range). sort: 'sourceTn:desc', # String | The field and direction to sort by combined with a colon. Direction is either asc or desc. page_token: 'gdEewhcJLQRB5', # String | A base64 encoded value used for pagination of results. limit: 50, # Integer | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. @@ -163,6 +175,18 @@ end | **from_date_time** | **String** | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | | **to_date_time** | **String** | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | | **campaign_id** | **String** | The campaign ID of the message. | [optional] | +| **from_bw_latency** | **Integer** | The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **bw_queued** | **Boolean** | A boolean value indicating whether the message is queued in the Bandwidth network. | [optional] | +| **product** | [**ProductTypeEnum**](.md) | Messaging product associated with the message. | [optional] | +| **location** | **String** | Location Id associated with the message. | [optional] | +| **carrier_queued** | **Boolean** | A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **from_carrier_latency** | **Integer** | The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **calling_number_country_a3** | **String** | Calling number country in A3 format. | [optional] | +| **called_number_country_a3** | **String** | Called number country in A3 format. | [optional] | +| **from_segment_count** | **Integer** | Segment count (start range). | [optional] | +| **to_segment_count** | **Integer** | Segment count (end range). | [optional] | +| **from_message_size** | **Integer** | Message size (start range). | [optional] | +| **to_message_size** | **Integer** | Message size (end range). | [optional] | | **sort** | **String** | The field and direction to sort by combined with a colon. Direction is either asc or desc. | [optional] | | **page_token** | **String** | A base64 encoded value used for pagination of results. | [optional] | | **limit** | **Integer** | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. | [optional] | diff --git a/docs/OptInWorkflow.md b/docs/OptInWorkflow.md index f23130a5..2fc12205 100644 --- a/docs/OptInWorkflow.md +++ b/docs/OptInWorkflow.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **description** | **String** | | | | **image_urls** | **Array<String>** | | | +| **confirmation_response** | **String** | | [optional] | ## Example @@ -14,7 +15,8 @@ require 'bandwidth-sdk' instance = Bandwidth::OptInWorkflow.new( description: Opt In Flow, - image_urls: null + image_urls: null, + confirmation_response: Thank you for opting in! ) ``` diff --git a/docs/ProductTypeEnum.md b/docs/ProductTypeEnum.md new file mode 100644 index 00000000..157f3fd3 --- /dev/null +++ b/docs/ProductTypeEnum.md @@ -0,0 +1,15 @@ +# Bandwidth::ProductTypeEnum + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'bandwidth-sdk' + +instance = Bandwidth::ProductTypeEnum.new() +``` + diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md index 8a357c4f..28ea77d5 100644 --- a/docs/RbmActionBase.md +++ b/docs/RbmActionBase.md @@ -16,7 +16,7 @@ require 'bandwidth-sdk' instance = Bandwidth::RbmActionBase.new( type: null, text: Hello world, - postback_data: [B@2c6aa46c + postback_data: [B@a93c798 ) ``` diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index 96842d90..a00359ca 100644 --- a/docs/RbmSuggestionResponse.md +++ b/docs/RbmSuggestionResponse.md @@ -14,7 +14,7 @@ require 'bandwidth-sdk' instance = Bandwidth::RbmSuggestionResponse.new( text: Yes, I would like to proceed, - postback_data: [B@2c6aa46c + postback_data: [B@a93c798 ) ``` diff --git a/docs/TfvSubmissionInfo.md b/docs/TfvSubmissionInfo.md index 7cf12b4b..414c10da 100644 --- a/docs/TfvSubmissionInfo.md +++ b/docs/TfvSubmissionInfo.md @@ -16,6 +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** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] | +| **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] | +| **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] | ## Example @@ -34,7 +37,10 @@ instance = Bandwidth::TfvSubmissionInfo.new( isv_reseller: Test ISV, privacy_policy_url: http://your-company.com/privacyPolicy, terms_and_conditions_url: http://your-company.com/termsAndConditions, - business_dba: Another Company Name Inc. + business_dba: Another Company Name Inc., + business_registration_number: 12-3456789, + business_registration_type: null, + business_entity_type: null ) ``` diff --git a/docs/VerificationRequest.md b/docs/VerificationRequest.md index a0cf0535..73e09f33 100644 --- a/docs/VerificationRequest.md +++ b/docs/VerificationRequest.md @@ -17,6 +17,11 @@ | **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** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] | +| **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] | +| **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [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] | ## Example @@ -36,7 +41,12 @@ instance = Bandwidth::VerificationRequest.new( isv_reseller: Test ISV, privacy_policy_url: http://your-company.com/privacyPolicy, terms_and_conditions_url: http://your-company.com/termsAndConditions, - business_dba: Another Company Name Inc. + business_dba: Another Company Name Inc., + business_registration_number: 12-3456789, + business_registration_type: null, + business_entity_type: null, + help_message_response: Please contact support for assistance., + age_gated_content: false ) ``` diff --git a/docs/VerificationUpdateRequest.md b/docs/VerificationUpdateRequest.md index dd8f9b30..f7492d38 100644 --- a/docs/VerificationUpdateRequest.md +++ b/docs/VerificationUpdateRequest.md @@ -16,6 +16,11 @@ | **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** | US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. | [optional] | +| **business_registration_type** | [**BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] | +| **business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [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] | ## Example @@ -34,7 +39,12 @@ instance = Bandwidth::VerificationUpdateRequest.new( isv_reseller: Test ISV, privacy_policy_url: http://your-company.com/privacyPolicy, terms_and_conditions_url: http://your-company.com/termsAndConditions, - business_dba: Another Company Name Inc. + business_dba: Another Company Name Inc., + business_registration_number: 12-3456789, + business_registration_type: null, + business_entity_type: null, + help_message_response: Please contact support for assistance., + age_gated_content: false ) ``` diff --git a/lib/bandwidth-sdk.rb b/lib/bandwidth-sdk.rb index a0f6136c..c865cd01 100644 --- a/lib/bandwidth-sdk.rb +++ b/lib/bandwidth-sdk.rb @@ -24,6 +24,8 @@ require 'bandwidth-sdk/models/blocked_webhook' require 'bandwidth-sdk/models/bridge_complete_callback' require 'bandwidth-sdk/models/bridge_target_complete_callback' +require 'bandwidth-sdk/models/business_entity_type_enum' +require 'bandwidth-sdk/models/business_registration_type_enum' require 'bandwidth-sdk/models/call_direction_enum' require 'bandwidth-sdk/models/call_recording_metadata' require 'bandwidth-sdk/models/call_state' @@ -106,6 +108,7 @@ require 'bandwidth-sdk/models/opt_in_workflow' require 'bandwidth-sdk/models/page_info' require 'bandwidth-sdk/models/priority_enum' +require 'bandwidth-sdk/models/product_type_enum' require 'bandwidth-sdk/models/rbm_action_base' require 'bandwidth-sdk/models/rbm_action_dial' require 'bandwidth-sdk/models/rbm_action_open_url' diff --git a/lib/bandwidth-sdk/api/messages_api.rb b/lib/bandwidth-sdk/api/messages_api.rb index 864f53f5..608c19af 100644 --- a/lib/bandwidth-sdk/api/messages_api.rb +++ b/lib/bandwidth-sdk/api/messages_api.rb @@ -108,6 +108,18 @@ def create_message_with_http_info(account_id, message_request, opts = {}) # @option opts [String] :from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. # @option opts [String] :to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. # @option opts [String] :campaign_id The campaign ID of the message. + # @option opts [Integer] :from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + # @option opts [Boolean] :bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. + # @option opts [ProductTypeEnum] :product Messaging product associated with the message. + # @option opts [String] :location Location Id associated with the message. + # @option opts [Boolean] :carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + # @option opts [Integer] :from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + # @option opts [String] :calling_number_country_a3 Calling number country in A3 format. + # @option opts [String] :called_number_country_a3 Called number country in A3 format. + # @option opts [Integer] :from_segment_count Segment count (start range). + # @option opts [Integer] :to_segment_count Segment count (end range). + # @option opts [Integer] :from_message_size Message size (start range). + # @option opts [Integer] :to_message_size Message size (end range). # @option opts [String] :sort The field and direction to sort by combined with a colon. Direction is either asc or desc. # @option opts [String] :page_token A base64 encoded value used for pagination of results. # @option opts [Integer] :limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. @@ -133,6 +145,18 @@ def list_messages(account_id, opts = {}) # @option opts [String] :from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. # @option opts [String] :to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. # @option opts [String] :campaign_id The campaign ID of the message. + # @option opts [Integer] :from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + # @option opts [Boolean] :bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. + # @option opts [ProductTypeEnum] :product Messaging product associated with the message. + # @option opts [String] :location Location Id associated with the message. + # @option opts [Boolean] :carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + # @option opts [Integer] :from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + # @option opts [String] :calling_number_country_a3 Calling number country in A3 format. + # @option opts [String] :called_number_country_a3 Called number country in A3 format. + # @option opts [Integer] :from_segment_count Segment count (start range). + # @option opts [Integer] :to_segment_count Segment count (end range). + # @option opts [Integer] :from_message_size Message size (start range). + # @option opts [Integer] :to_message_size Message size (end range). # @option opts [String] :sort The field and direction to sort by combined with a colon. Direction is either asc or desc. # @option opts [String] :page_token A base64 encoded value used for pagination of results. # @option opts [Integer] :limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. @@ -162,6 +186,18 @@ def list_messages_with_http_info(account_id, opts = {}) query_params[:'fromDateTime'] = opts[:'from_date_time'] if !opts[:'from_date_time'].nil? query_params[:'toDateTime'] = opts[:'to_date_time'] if !opts[:'to_date_time'].nil? query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil? + query_params[:'fromBwLatency'] = opts[:'from_bw_latency'] if !opts[:'from_bw_latency'].nil? + query_params[:'bwQueued'] = opts[:'bw_queued'] if !opts[:'bw_queued'].nil? + query_params[:'product'] = opts[:'product'] if !opts[:'product'].nil? + query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil? + query_params[:'carrierQueued'] = opts[:'carrier_queued'] if !opts[:'carrier_queued'].nil? + query_params[:'fromCarrierLatency'] = opts[:'from_carrier_latency'] if !opts[:'from_carrier_latency'].nil? + query_params[:'callingNumberCountryA3'] = opts[:'calling_number_country_a3'] if !opts[:'calling_number_country_a3'].nil? + query_params[:'calledNumberCountryA3'] = opts[:'called_number_country_a3'] if !opts[:'called_number_country_a3'].nil? + query_params[:'fromSegmentCount'] = opts[:'from_segment_count'] if !opts[:'from_segment_count'].nil? + query_params[:'toSegmentCount'] = opts[:'to_segment_count'] if !opts[:'to_segment_count'].nil? + query_params[:'fromMessageSize'] = opts[:'from_message_size'] if !opts[:'from_message_size'].nil? + query_params[:'toMessageSize'] = opts[:'to_message_size'] if !opts[:'to_message_size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'pageToken'] = opts[:'page_token'] if !opts[:'page_token'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? diff --git a/lib/bandwidth-sdk/models/business_entity_type_enum.rb b/lib/bandwidth-sdk/models/business_entity_type_enum.rb new file mode 100644 index 00000000..0f01f9ec --- /dev/null +++ b/lib/bandwidth-sdk/models/business_entity_type_enum.rb @@ -0,0 +1,43 @@ +=begin +#Bandwidth + +#Bandwidth's Communication APIs + +The version of the OpenAPI document: 1.0.0 +Contact: letstalk@bandwidth.com +Generated by: https://openapi-generator.tech +Generator version: 7.8.0 + +=end + +require 'date' +require 'time' + +module Bandwidth + class BusinessEntityTypeEnum + SOLE_PROPRIETOR = 'SOLE_PROPRIETOR'.freeze + PRIVATE_PROFIT = 'PRIVATE_PROFIT'.freeze + PUBLIC_PROFIT = 'PUBLIC_PROFIT'.freeze + NON_PROFIT = 'NON_PROFIT'.freeze + GOVERNMENT = 'GOVERNMENT'.freeze + + def self.all_vars + @all_vars ||= [SOLE_PROPRIETOR, PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, GOVERNMENT].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if BusinessEntityTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #BusinessEntityTypeEnum" + end + end +end diff --git a/lib/bandwidth-sdk/models/business_registration_type_enum.rb b/lib/bandwidth-sdk/models/business_registration_type_enum.rb new file mode 100644 index 00000000..6b89e45b --- /dev/null +++ b/lib/bandwidth-sdk/models/business_registration_type_enum.rb @@ -0,0 +1,40 @@ +=begin +#Bandwidth + +#Bandwidth's Communication APIs + +The version of the OpenAPI document: 1.0.0 +Contact: letstalk@bandwidth.com +Generated by: https://openapi-generator.tech +Generator version: 7.8.0 + +=end + +require 'date' +require 'time' + +module Bandwidth + class BusinessRegistrationTypeEnum + EIN = 'EIN'.freeze + CBN = 'CBN'.freeze + + def self.all_vars + @all_vars ||= [EIN, CBN].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if BusinessRegistrationTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #BusinessRegistrationTypeEnum" + end + end +end diff --git a/lib/bandwidth-sdk/models/list_message_item.rb b/lib/bandwidth-sdk/models/list_message_item.rb index 43209cec..b121a706 100644 --- a/lib/bandwidth-sdk/models/list_message_item.rb +++ b/lib/bandwidth-sdk/models/list_message_item.rb @@ -63,6 +63,24 @@ class ListMessageItem # The campaign ID of the message if it has one. attr_accessor :campaign_id + # The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + attr_accessor :bw_latency + + # The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + attr_accessor :carrier_latency + + # The A3 country code of the calling number. + attr_accessor :calling_number_country_a3 + + # The A3 country code of the called number. + attr_accessor :called_number_country_a3 + + # The messaging product associated with the message. + attr_accessor :product + + # The location ID associated with this message. + attr_accessor :location + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -104,7 +122,13 @@ def self.attribute_map :'attachment_count' => :'attachmentCount', :'recipient_count' => :'recipientCount', :'campaign_class' => :'campaignClass', - :'campaign_id' => :'campaignId' + :'campaign_id' => :'campaignId', + :'bw_latency' => :'bwLatency', + :'carrier_latency' => :'carrierLatency', + :'calling_number_country_a3' => :'callingNumberCountryA3', + :'called_number_country_a3' => :'calledNumberCountryA3', + :'product' => :'product', + :'location' => :'location' } end @@ -132,7 +156,13 @@ def self.openapi_types :'attachment_count' => :'Integer', :'recipient_count' => :'Integer', :'campaign_class' => :'String', - :'campaign_id' => :'String' + :'campaign_id' => :'String', + :'bw_latency' => :'Integer', + :'carrier_latency' => :'Integer', + :'calling_number_country_a3' => :'String', + :'called_number_country_a3' => :'String', + :'product' => :'String', + :'location' => :'String' } end @@ -144,7 +174,13 @@ def self.openapi_nullable :'attachment_count', :'recipient_count', :'campaign_class', - :'campaign_id' + :'campaign_id', + :'bw_latency', + :'carrier_latency', + :'calling_number_country_a3', + :'called_number_country_a3', + :'product', + :'location' ]) end @@ -230,6 +266,30 @@ def initialize(attributes = {}) if attributes.key?(:'campaign_id') self.campaign_id = attributes[:'campaign_id'] end + + if attributes.key?(:'bw_latency') + self.bw_latency = attributes[:'bw_latency'] + end + + if attributes.key?(:'carrier_latency') + self.carrier_latency = attributes[:'carrier_latency'] + end + + if attributes.key?(:'calling_number_country_a3') + self.calling_number_country_a3 = attributes[:'calling_number_country_a3'] + end + + if attributes.key?(:'called_number_country_a3') + self.called_number_country_a3 = attributes[:'called_number_country_a3'] + end + + if attributes.key?(:'product') + self.product = attributes[:'product'] + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -268,7 +328,13 @@ def ==(o) attachment_count == o.attachment_count && recipient_count == o.recipient_count && campaign_class == o.campaign_class && - campaign_id == o.campaign_id + campaign_id == o.campaign_id && + bw_latency == o.bw_latency && + carrier_latency == o.carrier_latency && + calling_number_country_a3 == o.calling_number_country_a3 && + called_number_country_a3 == o.called_number_country_a3 && + product == o.product && + location == o.location end # @see the `==` method @@ -280,7 +346,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [message_id, account_id, source_tn, destination_tn, message_status, message_direction, message_type, segment_count, error_code, receive_time, carrier_name, message_size, message_length, attachment_count, recipient_count, campaign_class, campaign_id].hash + [message_id, account_id, source_tn, destination_tn, message_status, message_direction, message_type, segment_count, error_code, receive_time, carrier_name, message_size, message_length, attachment_count, recipient_count, campaign_class, campaign_id, bw_latency, carrier_latency, calling_number_country_a3, called_number_country_a3, product, location].hash end # Builds the object from hash diff --git a/lib/bandwidth-sdk/models/message_type_enum.rb b/lib/bandwidth-sdk/models/message_type_enum.rb index 158eceaa..1398db84 100644 --- a/lib/bandwidth-sdk/models/message_type_enum.rb +++ b/lib/bandwidth-sdk/models/message_type_enum.rb @@ -17,9 +17,10 @@ module Bandwidth class MessageTypeEnum SMS = 'sms'.freeze MMS = 'mms'.freeze + RCS = 'rcs'.freeze def self.all_vars - @all_vars ||= [SMS, MMS].freeze + @all_vars ||= [SMS, MMS, RCS].freeze end # Builds the enum from string diff --git a/lib/bandwidth-sdk/models/opt_in_workflow.rb b/lib/bandwidth-sdk/models/opt_in_workflow.rb index e4ea2df4..0bb00c69 100644 --- a/lib/bandwidth-sdk/models/opt_in_workflow.rb +++ b/lib/bandwidth-sdk/models/opt_in_workflow.rb @@ -19,11 +19,14 @@ class OptInWorkflow attr_accessor :image_urls + attr_accessor :confirmation_response + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'description' => :'description', - :'image_urls' => :'imageUrls' + :'image_urls' => :'imageUrls', + :'confirmation_response' => :'confirmationResponse' } end @@ -36,13 +39,15 @@ def self.acceptable_attributes def self.openapi_types { :'description' => :'String', - :'image_urls' => :'Array' + :'image_urls' => :'Array', + :'confirmation_response' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'confirmation_response' ]) end @@ -74,6 +79,10 @@ def initialize(attributes = {}) else self.image_urls = nil end + + if attributes.key?(:'confirmation_response') + self.confirmation_response = attributes[:'confirmation_response'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -97,6 +106,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "image_urls", image_urls cannot be nil.') end + if !@confirmation_response.nil? && @confirmation_response.to_s.length > 500 + invalid_properties.push('invalid value for "confirmation_response", the character length must be smaller than or equal to 500.') + end + + if !@confirmation_response.nil? && @confirmation_response.to_s.length < 0 + invalid_properties.push('invalid value for "confirmation_response", the character length must be great than or equal to 0.') + end + invalid_properties end @@ -108,6 +125,8 @@ def valid? return false if @description.to_s.length > 500 return false if @description.to_s.length < 1 return false if @image_urls.nil? + return false if !@confirmation_response.nil? && @confirmation_response.to_s.length > 500 + return false if !@confirmation_response.nil? && @confirmation_response.to_s.length < 0 true end @@ -129,13 +148,28 @@ def description=(description) @description = description end + # Custom attribute writer method with validation + # @param [Object] confirmation_response Value to be assigned + def confirmation_response=(confirmation_response) + if !confirmation_response.nil? && confirmation_response.to_s.length > 500 + fail ArgumentError, 'invalid value for "confirmation_response", the character length must be smaller than or equal to 500.' + end + + if !confirmation_response.nil? && confirmation_response.to_s.length < 0 + fail ArgumentError, 'invalid value for "confirmation_response", the character length must be great than or equal to 0.' + end + + @confirmation_response = confirmation_response + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && description == o.description && - image_urls == o.image_urls + image_urls == o.image_urls && + confirmation_response == o.confirmation_response end # @see the `==` method @@ -147,7 +181,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [description, image_urls].hash + [description, image_urls, confirmation_response].hash end # Builds the object from hash diff --git a/lib/bandwidth-sdk/models/product_type_enum.rb b/lib/bandwidth-sdk/models/product_type_enum.rb new file mode 100644 index 00000000..53bdbcb7 --- /dev/null +++ b/lib/bandwidth-sdk/models/product_type_enum.rb @@ -0,0 +1,47 @@ +=begin +#Bandwidth + +#Bandwidth's Communication APIs + +The version of the OpenAPI document: 1.0.0 +Contact: letstalk@bandwidth.com +Generated by: https://openapi-generator.tech +Generator version: 7.8.0 + +=end + +require 'date' +require 'time' + +module Bandwidth + class ProductTypeEnum + LOCAL_A2_P = 'LOCAL_A2P'.freeze + P2_P = 'P2P'.freeze + SHORT_CODE_REACH = 'SHORT_CODE_REACH'.freeze + TOLL_FREE = 'TOLL_FREE'.freeze + HOSTED_SHORT_CODE = 'HOSTED_SHORT_CODE'.freeze + ALPHA_NUMERIC = 'ALPHA_NUMERIC'.freeze + RBM_MEDIA = 'RBM_MEDIA'.freeze + RBM_RICH = 'RBM_RICH'.freeze + RBM_CONVERSATIONAL = 'RBM_CONVERSATIONAL'.freeze + + def self.all_vars + @all_vars ||= [LOCAL_A2_P, P2_P, SHORT_CODE_REACH, TOLL_FREE, HOSTED_SHORT_CODE, ALPHA_NUMERIC, RBM_MEDIA, RBM_RICH, RBM_CONVERSATIONAL].freeze + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + return value if ProductTypeEnum.all_vars.include?(value) + raise "Invalid ENUM value #{value} for class #ProductTypeEnum" + end + end +end diff --git a/lib/bandwidth-sdk/models/tfv_submission_info.rb b/lib/bandwidth-sdk/models/tfv_submission_info.rb index 39f610b9..e6bf148b 100644 --- a/lib/bandwidth-sdk/models/tfv_submission_info.rb +++ b/lib/bandwidth-sdk/models/tfv_submission_info.rb @@ -48,6 +48,35 @@ class TfvSubmissionInfo # The company 'Doing Business As'. attr_accessor :business_dba + # US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. + attr_accessor :business_registration_number + + attr_accessor :business_registration_type + + attr_accessor :business_entity_type + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -62,7 +91,10 @@ def self.attribute_map :'isv_reseller' => :'isvReseller', :'privacy_policy_url' => :'privacyPolicyUrl', :'terms_and_conditions_url' => :'termsAndConditionsUrl', - :'business_dba' => :'businessDba' + :'business_dba' => :'businessDba', + :'business_registration_number' => :'businessRegistrationNumber', + :'business_registration_type' => :'businessRegistrationType', + :'business_entity_type' => :'businessEntityType' } end @@ -85,7 +117,10 @@ def self.openapi_types :'isv_reseller' => :'String', :'privacy_policy_url' => :'String', :'terms_and_conditions_url' => :'String', - :'business_dba' => :'String' + :'business_dba' => :'String', + :'business_registration_number' => :'String', + :'business_registration_type' => :'BusinessRegistrationTypeEnum', + :'business_entity_type' => :'BusinessEntityTypeEnum' } end @@ -94,6 +129,9 @@ def self.openapi_nullable Set.new([ :'additional_information', :'isv_reseller', + :'business_registration_number', + :'business_registration_type', + :'business_entity_type' ]) end @@ -159,6 +197,18 @@ def initialize(attributes = {}) if attributes.key?(:'business_dba') self.business_dba = attributes[:'business_dba'] end + + if attributes.key?(:'business_registration_number') + self.business_registration_number = attributes[:'business_registration_number'] + end + + if attributes.key?(:'business_registration_type') + self.business_registration_type = attributes[:'business_registration_type'] + end + + if attributes.key?(:'business_entity_type') + self.business_entity_type = attributes[:'business_entity_type'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -214,6 +264,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.') end + if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500 + invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.') + end + invalid_properties end @@ -233,6 +287,7 @@ def valid? return false if !@additional_information.nil? && @additional_information.to_s.length < 0 return false if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500 return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0 + return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500 true end @@ -336,6 +391,16 @@ def isv_reseller=(isv_reseller) @isv_reseller = isv_reseller end + # Custom attribute writer method with validation + # @param [Object] business_registration_number Value to be assigned + def business_registration_number=(business_registration_number) + if !business_registration_number.nil? && business_registration_number.to_s.length > 500 + fail ArgumentError, 'invalid value for "business_registration_number", the character length must be smaller than or equal to 500.' + end + + @business_registration_number = business_registration_number + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -352,7 +417,10 @@ def ==(o) isv_reseller == o.isv_reseller && privacy_policy_url == o.privacy_policy_url && terms_and_conditions_url == o.terms_and_conditions_url && - business_dba == o.business_dba + business_dba == o.business_dba && + business_registration_number == o.business_registration_number && + business_registration_type == o.business_registration_type && + business_entity_type == o.business_entity_type end # @see the `==` method @@ -364,7 +432,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [business_address, business_contact, message_volume, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller, privacy_policy_url, terms_and_conditions_url, business_dba].hash + [business_address, business_contact, message_volume, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller, privacy_policy_url, terms_and_conditions_url, business_dba, business_registration_number, business_registration_type, business_entity_type].hash end # Builds the object from hash diff --git a/lib/bandwidth-sdk/models/verification_request.rb b/lib/bandwidth-sdk/models/verification_request.rb index 1dd90c1a..29364ba2 100644 --- a/lib/bandwidth-sdk/models/verification_request.rb +++ b/lib/bandwidth-sdk/models/verification_request.rb @@ -50,6 +50,41 @@ class VerificationRequest # The company 'Doing Business As'. attr_accessor :business_dba + # US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. + attr_accessor :business_registration_number + + attr_accessor :business_registration_type + + attr_accessor :business_entity_type + + # A message that gets sent to users requesting help. + attr_accessor :help_message_response + + # Indicates whether the content is age-gated. + attr_accessor :age_gated_content + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -65,7 +100,12 @@ def self.attribute_map :'isv_reseller' => :'isvReseller', :'privacy_policy_url' => :'privacyPolicyUrl', :'terms_and_conditions_url' => :'termsAndConditionsUrl', - :'business_dba' => :'businessDba' + :'business_dba' => :'businessDba', + :'business_registration_number' => :'businessRegistrationNumber', + :'business_registration_type' => :'businessRegistrationType', + :'business_entity_type' => :'businessEntityType', + :'help_message_response' => :'helpMessageResponse', + :'age_gated_content' => :'ageGatedContent' } end @@ -89,7 +129,12 @@ def self.openapi_types :'isv_reseller' => :'String', :'privacy_policy_url' => :'String', :'terms_and_conditions_url' => :'String', - :'business_dba' => :'String' + :'business_dba' => :'String', + :'business_registration_number' => :'String', + :'business_registration_type' => :'BusinessRegistrationTypeEnum', + :'business_entity_type' => :'BusinessEntityTypeEnum', + :'help_message_response' => :'String', + :'age_gated_content' => :'Boolean' } end @@ -98,6 +143,10 @@ def self.openapi_nullable Set.new([ :'additional_information', :'isv_reseller', + :'business_registration_number', + :'business_registration_type', + :'business_entity_type', + :'help_message_response', ]) end @@ -185,6 +234,26 @@ def initialize(attributes = {}) if attributes.key?(:'business_dba') self.business_dba = attributes[:'business_dba'] end + + if attributes.key?(:'business_registration_number') + self.business_registration_number = attributes[:'business_registration_number'] + end + + if attributes.key?(:'business_registration_type') + self.business_registration_type = attributes[:'business_registration_type'] + end + + if attributes.key?(:'business_entity_type') + self.business_entity_type = attributes[:'business_entity_type'] + end + + if attributes.key?(:'help_message_response') + self.help_message_response = attributes[:'help_message_response'] + end + + if attributes.key?(:'age_gated_content') + self.age_gated_content = attributes[:'age_gated_content'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -280,6 +349,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.') end + if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500 + invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.') + 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 + invalid_properties end @@ -309,6 +386,8 @@ def valid? return false if !@additional_information.nil? && @additional_information.to_s.length < 0 return false if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500 return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0 + return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500 + return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500 true end @@ -430,6 +509,26 @@ def isv_reseller=(isv_reseller) @isv_reseller = isv_reseller end + # Custom attribute writer method with validation + # @param [Object] business_registration_number Value to be assigned + def business_registration_number=(business_registration_number) + if !business_registration_number.nil? && business_registration_number.to_s.length > 500 + fail ArgumentError, 'invalid value for "business_registration_number", the character length must be smaller than or equal to 500.' + end + + @business_registration_number = business_registration_number + end + + # Custom attribute writer method with validation + # @param [Object] help_message_response Value to be assigned + def help_message_response=(help_message_response) + if !help_message_response.nil? && help_message_response.to_s.length > 500 + fail ArgumentError, 'invalid value for "help_message_response", the character length must be smaller than or equal to 500.' + end + + @help_message_response = help_message_response + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -447,7 +546,12 @@ def ==(o) isv_reseller == o.isv_reseller && privacy_policy_url == o.privacy_policy_url && terms_and_conditions_url == o.terms_and_conditions_url && - business_dba == o.business_dba + business_dba == o.business_dba && + business_registration_number == o.business_registration_number && + business_registration_type == o.business_registration_type && + business_entity_type == o.business_entity_type && + help_message_response == o.help_message_response && + age_gated_content == o.age_gated_content end # @see the `==` method @@ -459,7 +563,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [business_address, business_contact, message_volume, phone_numbers, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller, privacy_policy_url, terms_and_conditions_url, business_dba].hash + [business_address, business_contact, message_volume, phone_numbers, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller, privacy_policy_url, terms_and_conditions_url, business_dba, business_registration_number, business_registration_type, business_entity_type, help_message_response, age_gated_content].hash end # Builds the object from hash diff --git a/lib/bandwidth-sdk/models/verification_update_request.rb b/lib/bandwidth-sdk/models/verification_update_request.rb index 92baf20f..f46a45fc 100644 --- a/lib/bandwidth-sdk/models/verification_update_request.rb +++ b/lib/bandwidth-sdk/models/verification_update_request.rb @@ -48,6 +48,41 @@ class VerificationUpdateRequest # The company 'Doing Business As'. attr_accessor :business_dba + # US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025. + attr_accessor :business_registration_number + + attr_accessor :business_registration_type + + attr_accessor :business_entity_type + + # A message that gets sent to users requesting help. + attr_accessor :help_message_response + + # Indicates whether the content is age-gated. + attr_accessor :age_gated_content + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -62,7 +97,12 @@ def self.attribute_map :'isv_reseller' => :'isvReseller', :'privacy_policy_url' => :'privacyPolicyUrl', :'terms_and_conditions_url' => :'termsAndConditionsUrl', - :'business_dba' => :'businessDba' + :'business_dba' => :'businessDba', + :'business_registration_number' => :'businessRegistrationNumber', + :'business_registration_type' => :'businessRegistrationType', + :'business_entity_type' => :'businessEntityType', + :'help_message_response' => :'helpMessageResponse', + :'age_gated_content' => :'ageGatedContent' } end @@ -85,7 +125,12 @@ def self.openapi_types :'isv_reseller' => :'String', :'privacy_policy_url' => :'String', :'terms_and_conditions_url' => :'String', - :'business_dba' => :'String' + :'business_dba' => :'String', + :'business_registration_number' => :'String', + :'business_registration_type' => :'BusinessRegistrationTypeEnum', + :'business_entity_type' => :'BusinessEntityTypeEnum', + :'help_message_response' => :'String', + :'age_gated_content' => :'Boolean' } end @@ -94,6 +139,10 @@ def self.openapi_nullable Set.new([ :'additional_information', :'isv_reseller', + :'business_registration_number', + :'business_registration_type', + :'business_entity_type', + :'help_message_response', ]) end @@ -173,6 +222,26 @@ def initialize(attributes = {}) if attributes.key?(:'business_dba') self.business_dba = attributes[:'business_dba'] end + + if attributes.key?(:'business_registration_number') + self.business_registration_number = attributes[:'business_registration_number'] + end + + if attributes.key?(:'business_registration_type') + self.business_registration_type = attributes[:'business_registration_type'] + end + + if attributes.key?(:'business_entity_type') + self.business_entity_type = attributes[:'business_entity_type'] + end + + if attributes.key?(:'help_message_response') + self.help_message_response = attributes[:'help_message_response'] + end + + if attributes.key?(:'age_gated_content') + self.age_gated_content = attributes[:'age_gated_content'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -256,6 +325,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.') end + if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500 + invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.') + 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 + invalid_properties end @@ -282,6 +359,8 @@ def valid? return false if !@additional_information.nil? && @additional_information.to_s.length < 0 return false if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500 return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0 + return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500 + return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500 true end @@ -385,6 +464,26 @@ def isv_reseller=(isv_reseller) @isv_reseller = isv_reseller end + # Custom attribute writer method with validation + # @param [Object] business_registration_number Value to be assigned + def business_registration_number=(business_registration_number) + if !business_registration_number.nil? && business_registration_number.to_s.length > 500 + fail ArgumentError, 'invalid value for "business_registration_number", the character length must be smaller than or equal to 500.' + end + + @business_registration_number = business_registration_number + end + + # Custom attribute writer method with validation + # @param [Object] help_message_response Value to be assigned + def help_message_response=(help_message_response) + if !help_message_response.nil? && help_message_response.to_s.length > 500 + fail ArgumentError, 'invalid value for "help_message_response", the character length must be smaller than or equal to 500.' + end + + @help_message_response = help_message_response + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -401,7 +500,12 @@ def ==(o) isv_reseller == o.isv_reseller && privacy_policy_url == o.privacy_policy_url && terms_and_conditions_url == o.terms_and_conditions_url && - business_dba == o.business_dba + business_dba == o.business_dba && + business_registration_number == o.business_registration_number && + business_registration_type == o.business_registration_type && + business_entity_type == o.business_entity_type && + help_message_response == o.help_message_response && + age_gated_content == o.age_gated_content end # @see the `==` method @@ -413,7 +517,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [business_address, business_contact, message_volume, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller, privacy_policy_url, terms_and_conditions_url, business_dba].hash + [business_address, business_contact, message_volume, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller, privacy_policy_url, terms_and_conditions_url, business_dba, business_registration_number, business_registration_type, business_entity_type, help_message_response, age_gated_content].hash end # Builds the object from hash From 199690b251f78aa45b7d95db1e1f670d144ea0f5 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 2 Sep 2025 16:40:04 -0400 Subject: [PATCH 2/2] revert test changes --- spec/smoke/messages_api_spec.rb | 3 ++- spec/spec_helper.rb | 5 +++-- spec/unit/api/messages_api_spec.rb | 6 ++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/spec/smoke/messages_api_spec.rb b/spec/smoke/messages_api_spec.rb index 239d3c11..3e6b2c15 100644 --- a/spec/smoke/messages_api_spec.rb +++ b/spec/smoke/messages_api_spec.rb @@ -76,7 +76,8 @@ it 'lists messages' do get_opts = { source_tn: BW_NUMBER, - message_direction: list_message_direction + message_direction: list_message_direction, + calling_number_country_a3: 'USA' } data, status_code = @messaging_api_instance.list_messages_with_http_info(BW_ACCOUNT_ID, get_opts) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a790b41f..45a84305 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,9 +9,10 @@ else !(['/models/call_state_enum.rb', '/models/call_state.rb', - '/models/deferred_result.rb', + '/models/tfv_error.rb', '/models/message.rb', - '/models/verify_code_request.rb' + '/models/verify_code_request.rb', + '/models/verify_code_response.rb' ].any? { |name| source_file.filename.include?(name) }) end end diff --git a/spec/unit/api/messages_api_spec.rb b/spec/unit/api/messages_api_spec.rb index bde977f2..7032300f 100644 --- a/spec/unit/api/messages_api_spec.rb +++ b/spec/unit/api/messages_api_spec.rb @@ -75,6 +75,7 @@ expect(data.page_info.prev_page_token).to be_instance_of(String) expect(data.page_info.next_page_token).to be_instance_of(String) expect(data.messages).to be_instance_of(Array) + expect(data.messages[0]).to be_instance_of(Bandwidth::ListMessageItem) expect(data.messages[0].message_id.length).to eq(29) expect(data.messages[0].account_id.length).to eq(7) expect(data.messages[0].source_tn.length).to eq(12) @@ -92,6 +93,11 @@ expect(data.messages[0].recipient_count).to be_instance_of(Integer) expect(data.messages[0].campaign_class).to be_instance_of(String) expect(data.messages[0].campaign_id).to be_instance_of(String) + expect(data.messages[0].bw_latency).to be_instance_of(Integer) + expect(data.messages[0].calling_number_country_a3).to be_instance_of(String) + expect(data.messages[0].called_number_country_a3).to be_instance_of(String) + expect(data.messages[0].product).to be_one_of(Bandwidth::ProductTypeEnum.all_vars) + expect(data.messages[0].location).to be_instance_of(String) end it 'causes an ArgumentError for a missing account_id' do