From ff543078531b97a159a0d09329b35188caed9e50 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 3 Feb 2026 14:21:20 +0000 Subject: [PATCH] Generate SDK with OpenAPI Generator Version --- bandwidth.yml | 53 +++++++++++++++++-- docs/LookupResult.md | 4 +- docs/MessagesApi.md | 2 +- docs/RbmActionBase.md | 2 +- docs/RbmMessageMedia.md | 2 +- docs/RbmSuggestionResponse.md | 2 +- docs/TfvStatus.md | 4 +- docs/VerificationRequest.md | 4 +- docs/VerificationUpdateRequest.md | 4 +- lib/bandwidth-sdk/api/messages_api.rb | 4 +- lib/bandwidth-sdk/models/rbm_message_media.rb | 6 ++- lib/bandwidth-sdk/models/tfv_status.rb | 43 +++++++++++++-- .../models/verification_request.rb | 43 +++++++++++++-- .../models/verification_update_request.rb | 43 +++++++++++++-- 14 files changed, 186 insertions(+), 30 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index d7c32953..4f0d9765 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -163,7 +163,13 @@ paths: /users/{accountId}/messages: get: summary: List Messages - description: Returns a list of messages based on query parameters. + description: > + Returns a list of messages based on query parameters. + + + **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 + minutes per Source IP address. Exceeding the limit returns HTTP 429 with + a `Retry-After` header. operationId: listMessages tags: - Messages @@ -207,10 +213,12 @@ paths: $ref: '#/components/responses/messagingForbiddenError' '404': $ref: '#/components/responses/messagingNotFoundError' + '405': + $ref: '#/components/responses/messagingMethodNotAllowedError' '415': $ref: '#/components/responses/messagingInvalidMediaTypeError' '429': - $ref: '#/components/responses/messagingTooManyRequestsError' + $ref: '#/components/responses/listMessagesTooManyRequestsError' '500': $ref: '#/components/responses/messagingInternalServerError' post: @@ -2257,7 +2265,9 @@ components: type: object properties: media: - $ref: '#/components/schemas/rbmMessageContentFile' + type: array + items: + $ref: '#/components/schemas/rbmMessageContentFile' suggestions: $ref: '#/components/schemas/multiChannelFullActions' required: @@ -5875,7 +5885,6 @@ components: type: object internalTicketNumber: type: string - format: uuid description: >- Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook @@ -5883,7 +5892,6 @@ components: example: acde070d-8c4c-4f0d-9d8a-162843c10333 internalTicketNumberForWebhook: type: string - format: uuid description: >- Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. @@ -5956,6 +5964,8 @@ components: $ref: '#/components/schemas/helpMessageResponse' ageGatedContent: $ref: '#/components/schemas/ageGatedContent' + cvToken: + $ref: '#/components/schemas/cvToken' verificationUpdateRequest: type: object required: @@ -6005,6 +6015,8 @@ components: $ref: '#/components/schemas/helpMessageResponse' ageGatedContent: $ref: '#/components/schemas/ageGatedContent' + cvToken: + $ref: '#/components/schemas/cvToken' tfvBasicAuthentication: type: object properties: @@ -6456,6 +6468,8 @@ components: $ref: '#/components/schemas/blocked' blockedReason: $ref: '#/components/schemas/blockedReason' + cvToken: + $ref: '#/components/schemas/cvToken' tfvSubmissionInfo: type: object properties: @@ -6520,6 +6534,18 @@ components: nullable: true pattern: ^[ -~]{16,64}$ type: string + cvToken: + type: string + description: >- + 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. If you pass an + empty string, it will be passed along and potentially rejected. + minLength: 0 + maxLength: 500 + nullable: true + example: >- + cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw responses: createMessageResponse: description: Accepted @@ -6734,6 +6760,23 @@ components: - type: internal-server-error description: Internal server error. No further information available source: {} + listMessagesTooManyRequestsError: + description: Too Many Requests + headers: + Retry-After: + description: The number of seconds to wait before retrying the request. + schema: + type: integer + example: 300 + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + example: + type: rate_limit_exceeded + description: >- + Rate limit exceeded. Wait for Retry-After time before sending + another request. createCallResponse: description: Created headers: diff --git a/docs/LookupResult.md b/docs/LookupResult.md index eab2940b..18d4fa4b 100644 --- a/docs/LookupResult.md +++ b/docs/LookupResult.md @@ -31,8 +31,8 @@ instance = Bandwidth::LookupResult.new( deactivation_date: 2025-06-20 18:35, deactivation_event: null, latest_message_delivery_status: null, - initial_message_delivery_status_date: Thu Jun 19 20:00:00 EDT 2025, - latest_message_delivery_status_date: Fri Jun 20 20:00:00 EDT 2025 + initial_message_delivery_status_date: Fri Jun 20 00:00:00 UTC 2025, + latest_message_delivery_status_date: Sat Jun 21 00:00:00 UTC 2025 ) ``` diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index e4920eff..3ab595ee 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -89,7 +89,7 @@ end List Messages -Returns a list of messages based on query parameters. +Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header. ### Examples diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md index 9c9b7d2f..3e29235a 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@13866865 + postback_data: [B@cc7909f ) ``` diff --git a/docs/RbmMessageMedia.md b/docs/RbmMessageMedia.md index 0732efba..85bc564e 100644 --- a/docs/RbmMessageMedia.md +++ b/docs/RbmMessageMedia.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **media** | [**RbmMessageContentFile**](RbmMessageContentFile.md) | | | +| **media** | [**Array<RbmMessageContentFile>**](RbmMessageContentFile.md) | | | | **suggestions** | [**Array<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] | ## Example diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index e712d726..d33881ba 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@13866865 + postback_data: [B@cc7909f ) ``` diff --git a/docs/TfvStatus.md b/docs/TfvStatus.md index 81b2f4ba..5b87e23b 100644 --- a/docs/TfvStatus.md +++ b/docs/TfvStatus.md @@ -14,6 +14,7 @@ | **submission** | [**TfvSubmissionInfo**](TfvSubmissionInfo.md) | | [optional] | | **blocked** | **Boolean** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] | | **blocked_reason** | **String** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [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. If you pass an empty string, it will be passed along and potentially rejected. | [optional] | ## Example @@ -30,7 +31,8 @@ instance = Bandwidth::TfvStatus.new( modified_date_time: 2021-06-08T06:45:13Z, submission: null, blocked: true, - blocked_reason: Toll-free number was used to send spam messages + blocked_reason: Toll-free number was used to send spam messages, + cv_token: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw ) ``` diff --git a/docs/VerificationRequest.md b/docs/VerificationRequest.md index 73e09f33..66249728 100644 --- a/docs/VerificationRequest.md +++ b/docs/VerificationRequest.md @@ -22,6 +22,7 @@ | **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] | +| **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. If you pass an empty string, it will be passed along and potentially rejected. | [optional] | ## Example @@ -46,7 +47,8 @@ instance = Bandwidth::VerificationRequest.new( business_registration_type: null, business_entity_type: null, help_message_response: Please contact support for assistance., - age_gated_content: false + age_gated_content: false, + cv_token: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw ) ``` diff --git a/docs/VerificationUpdateRequest.md b/docs/VerificationUpdateRequest.md index f7492d38..9f60d66d 100644 --- a/docs/VerificationUpdateRequest.md +++ b/docs/VerificationUpdateRequest.md @@ -21,6 +21,7 @@ | **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] | +| **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. If you pass an empty string, it will be passed along and potentially rejected. | [optional] | ## Example @@ -44,7 +45,8 @@ instance = Bandwidth::VerificationUpdateRequest.new( business_registration_type: null, business_entity_type: null, help_message_response: Please contact support for assistance., - age_gated_content: false + age_gated_content: false, + cv_token: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw ) ``` diff --git a/lib/bandwidth-sdk/api/messages_api.rb b/lib/bandwidth-sdk/api/messages_api.rb index b38beb87..6d18f4c4 100644 --- a/lib/bandwidth-sdk/api/messages_api.rb +++ b/lib/bandwidth-sdk/api/messages_api.rb @@ -94,7 +94,7 @@ def create_message_with_http_info(account_id, message_request, opts = {}) end # List Messages - # Returns a list of messages based on query parameters. + # Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header. # @param account_id [String] Your Bandwidth Account ID. # @param [Hash] opts the optional parameters # @option opts [String] :message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. @@ -131,7 +131,7 @@ def list_messages(account_id, opts = {}) end # List Messages - # Returns a list of messages based on query parameters. + # Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header. # @param account_id [String] Your Bandwidth Account ID. # @param [Hash] opts the optional parameters # @option opts [String] :message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. diff --git a/lib/bandwidth-sdk/models/rbm_message_media.rb b/lib/bandwidth-sdk/models/rbm_message_media.rb index 438dba18..bb881fa1 100644 --- a/lib/bandwidth-sdk/models/rbm_message_media.rb +++ b/lib/bandwidth-sdk/models/rbm_message_media.rb @@ -41,7 +41,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'media' => :'RbmMessageContentFile', + :'media' => :'Array', :'suggestions' => :'Array' } end @@ -69,7 +69,9 @@ def initialize(attributes = {}) } if attributes.key?(:'media') - self.media = attributes[:'media'] + if (value = attributes[:'media']).is_a?(Array) + self.media = value + end else self.media = nil end diff --git a/lib/bandwidth-sdk/models/tfv_status.rb b/lib/bandwidth-sdk/models/tfv_status.rb index bbb41089..1c02c948 100644 --- a/lib/bandwidth-sdk/models/tfv_status.rb +++ b/lib/bandwidth-sdk/models/tfv_status.rb @@ -43,6 +43,9 @@ class TfvStatus < ApiModelBase # The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. attr_accessor :blocked_reason + # 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. If you pass an empty string, it will be passed along and potentially rejected. + attr_accessor :cv_token + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -77,7 +80,8 @@ def self.attribute_map :'modified_date_time' => :'modifiedDateTime', :'submission' => :'submission', :'blocked' => :'blocked', - :'blocked_reason' => :'blockedReason' + :'blocked_reason' => :'blockedReason', + :'cv_token' => :'cvToken' } end @@ -103,13 +107,15 @@ def self.openapi_types :'modified_date_time' => :'Time', :'submission' => :'TfvSubmissionInfo', :'blocked' => :'Boolean', - :'blocked_reason' => :'String' + :'blocked_reason' => :'String', + :'cv_token' => :'String' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'cv_token' ]) end @@ -168,6 +174,10 @@ def initialize(attributes = {}) if attributes.key?(:'blocked_reason') self.blocked_reason = attributes[:'blocked_reason'] end + + if attributes.key?(:'cv_token') + self.cv_token = attributes[:'cv_token'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -188,6 +198,14 @@ def list_invalid_properties invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.") end + if !@cv_token.nil? && @cv_token.to_s.length > 500 + invalid_properties.push('invalid value for "cv_token", the character length must be smaller than or equal to 500.') + end + + if !@cv_token.nil? && @cv_token.to_s.length < 0 + invalid_properties.push('invalid value for "cv_token", the character length must be greater than or equal to 0.') + end + invalid_properties end @@ -198,6 +216,8 @@ def valid? return false if !@phone_number.nil? && @phone_number.to_s.length > 12 return false if !@phone_number.nil? && @phone_number.to_s.length < 12 return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$/) + return false if !@cv_token.nil? && @cv_token.to_s.length > 500 + return false if !@cv_token.nil? && @cv_token.to_s.length < 0 true end @@ -224,6 +244,20 @@ def phone_number=(phone_number) @phone_number = phone_number end + # Custom attribute writer method with validation + # @param [Object] cv_token Value to be assigned + def cv_token=(cv_token) + if !cv_token.nil? && cv_token.to_s.length > 500 + fail ArgumentError, 'invalid value for "cv_token", the character length must be smaller than or equal to 500.' + end + + if !cv_token.nil? && cv_token.to_s.length < 0 + fail ArgumentError, 'invalid value for "cv_token", the character length must be greater than or equal to 0.' + end + + @cv_token = cv_token + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -238,7 +272,8 @@ def ==(o) modified_date_time == o.modified_date_time && submission == o.submission && blocked == o.blocked && - blocked_reason == o.blocked_reason + blocked_reason == o.blocked_reason && + cv_token == o.cv_token end # @see the `==` method @@ -250,7 +285,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [phone_number, status, internal_ticket_number, decline_reason_description, resubmit_allowed, created_date_time, modified_date_time, submission, blocked, blocked_reason].hash + [phone_number, status, internal_ticket_number, decline_reason_description, resubmit_allowed, created_date_time, modified_date_time, submission, blocked, blocked_reason, cv_token].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 5d69597e..c42d3f2d 100644 --- a/lib/bandwidth-sdk/models/verification_request.rb +++ b/lib/bandwidth-sdk/models/verification_request.rb @@ -63,6 +63,9 @@ class VerificationRequest < ApiModelBase # Indicates whether the content is age-gated. attr_accessor :age_gated_content + # 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. If you pass an empty string, it will be passed along and potentially rejected. + attr_accessor :cv_token + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -105,7 +108,8 @@ def self.attribute_map :'business_registration_type' => :'businessRegistrationType', :'business_entity_type' => :'businessEntityType', :'help_message_response' => :'helpMessageResponse', - :'age_gated_content' => :'ageGatedContent' + :'age_gated_content' => :'ageGatedContent', + :'cv_token' => :'cvToken' } end @@ -139,7 +143,8 @@ def self.openapi_types :'business_registration_type' => :'BusinessRegistrationTypeEnum', :'business_entity_type' => :'BusinessEntityTypeEnum', :'help_message_response' => :'String', - :'age_gated_content' => :'Boolean' + :'age_gated_content' => :'Boolean', + :'cv_token' => :'String' } end @@ -152,6 +157,7 @@ def self.openapi_nullable :'business_registration_type', :'business_entity_type', :'help_message_response', + :'cv_token' ]) end @@ -260,6 +266,10 @@ def initialize(attributes = {}) if attributes.key?(:'age_gated_content') self.age_gated_content = attributes[:'age_gated_content'] end + + if attributes.key?(:'cv_token') + self.cv_token = attributes[:'cv_token'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -363,6 +373,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.') end + if !@cv_token.nil? && @cv_token.to_s.length > 500 + invalid_properties.push('invalid value for "cv_token", the character length must be smaller than or equal to 500.') + end + + if !@cv_token.nil? && @cv_token.to_s.length < 0 + invalid_properties.push('invalid value for "cv_token", the character length must be greater than or equal to 0.') + end + invalid_properties end @@ -394,6 +412,8 @@ def valid? 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 + return false if !@cv_token.nil? && @cv_token.to_s.length > 500 + return false if !@cv_token.nil? && @cv_token.to_s.length < 0 true end @@ -565,6 +585,20 @@ def help_message_response=(help_message_response) @help_message_response = help_message_response end + # Custom attribute writer method with validation + # @param [Object] cv_token Value to be assigned + def cv_token=(cv_token) + if !cv_token.nil? && cv_token.to_s.length > 500 + fail ArgumentError, 'invalid value for "cv_token", the character length must be smaller than or equal to 500.' + end + + if !cv_token.nil? && cv_token.to_s.length < 0 + fail ArgumentError, 'invalid value for "cv_token", the character length must be greater than or equal to 0.' + end + + @cv_token = cv_token + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -587,7 +621,8 @@ def ==(o) 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 + age_gated_content == o.age_gated_content && + cv_token == o.cv_token end # @see the `==` method @@ -599,7 +634,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, business_registration_number, business_registration_type, business_entity_type, help_message_response, age_gated_content].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, cv_token].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 ef6de9fe..433a81cf 100644 --- a/lib/bandwidth-sdk/models/verification_update_request.rb +++ b/lib/bandwidth-sdk/models/verification_update_request.rb @@ -61,6 +61,9 @@ class VerificationUpdateRequest < ApiModelBase # Indicates whether the content is age-gated. attr_accessor :age_gated_content + # 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. If you pass an empty string, it will be passed along and potentially rejected. + attr_accessor :cv_token + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -102,7 +105,8 @@ def self.attribute_map :'business_registration_type' => :'businessRegistrationType', :'business_entity_type' => :'businessEntityType', :'help_message_response' => :'helpMessageResponse', - :'age_gated_content' => :'ageGatedContent' + :'age_gated_content' => :'ageGatedContent', + :'cv_token' => :'cvToken' } end @@ -135,7 +139,8 @@ def self.openapi_types :'business_registration_type' => :'BusinessRegistrationTypeEnum', :'business_entity_type' => :'BusinessEntityTypeEnum', :'help_message_response' => :'String', - :'age_gated_content' => :'Boolean' + :'age_gated_content' => :'Boolean', + :'cv_token' => :'String' } end @@ -148,6 +153,7 @@ def self.openapi_nullable :'business_registration_type', :'business_entity_type', :'help_message_response', + :'cv_token' ]) end @@ -248,6 +254,10 @@ def initialize(attributes = {}) if attributes.key?(:'age_gated_content') self.age_gated_content = attributes[:'age_gated_content'] end + + if attributes.key?(:'cv_token') + self.cv_token = attributes[:'cv_token'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -339,6 +349,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.') end + if !@cv_token.nil? && @cv_token.to_s.length > 500 + invalid_properties.push('invalid value for "cv_token", the character length must be smaller than or equal to 500.') + end + + if !@cv_token.nil? && @cv_token.to_s.length < 0 + invalid_properties.push('invalid value for "cv_token", the character length must be greater than or equal to 0.') + end + invalid_properties end @@ -367,6 +385,8 @@ def valid? 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 + return false if !@cv_token.nil? && @cv_token.to_s.length > 500 + return false if !@cv_token.nil? && @cv_token.to_s.length < 0 true end @@ -520,6 +540,20 @@ def help_message_response=(help_message_response) @help_message_response = help_message_response end + # Custom attribute writer method with validation + # @param [Object] cv_token Value to be assigned + def cv_token=(cv_token) + if !cv_token.nil? && cv_token.to_s.length > 500 + fail ArgumentError, 'invalid value for "cv_token", the character length must be smaller than or equal to 500.' + end + + if !cv_token.nil? && cv_token.to_s.length < 0 + fail ArgumentError, 'invalid value for "cv_token", the character length must be greater than or equal to 0.' + end + + @cv_token = cv_token + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) @@ -541,7 +575,8 @@ def ==(o) 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 + age_gated_content == o.age_gated_content && + cv_token == o.cv_token end # @see the `==` method @@ -553,7 +588,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, business_registration_number, business_registration_type, business_entity_type, help_message_response, age_gated_content].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, cv_token].hash end # Builds the object from hash