From d1569a355b037a5ae9c243c667c9d25c8efe1fb1 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 2 Jun 2026 15:27:42 +0000 Subject: [PATCH] Generate SDK with OpenAPI Generator Version --- bandwidth.yml | 81 +++++++++++++------ docs/MultiChannelAction.md | 10 +-- docs/MultiChannelActionCalendarEvent.md | 4 +- docs/RbmActionBase.md | 2 +- docs/RbmActionOpenUrl.md | 2 +- docs/RbmActionViewLocation.md | 4 +- docs/RbmStandaloneCard.md | 2 +- docs/RbmSuggestionResponse.md | 2 +- docs/TfvStatus.md | 4 + lib/bandwidth-sdk/configuration.rb | 1 - .../multi_channel_action_calendar_event.rb | 4 +- .../models/rbm_action_open_url.rb | 2 +- .../models/rbm_action_view_location.rb | 4 +- lib/bandwidth-sdk/models/rbm_card_content.rb | 1 + .../models/rbm_message_carousel_card.rb | 9 +++ .../models/rbm_standalone_card.rb | 17 ---- lib/bandwidth-sdk/models/tfv_status.rb | 26 +++++- 17 files changed, 115 insertions(+), 60 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index 84e00b33..5e2bc9b3 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -2436,6 +2436,7 @@ components: - media rbmCardContent: type: object + description: Must contain at least one of title, description, or media to be valid. properties: title: type: string @@ -2478,7 +2479,6 @@ components: $ref: '#/components/schemas/multiChannelFullActions' required: - orientation - - thumbnailImageAlignment - cardContent standaloneCardOrientationEnum: type: string @@ -2489,8 +2489,8 @@ components: thumbnailAlignmentEnum: type: string description: >- - The alignment of the thumbnail image in the card. Only applicable if the - card using horizontal orientation. + The alignment of the thumbnail image in the card. Required when + orientation is HORIZONTAL. enum: - LEFT - RIGHT @@ -2505,6 +2505,7 @@ components: type: array items: $ref: '#/components/schemas/rbmCardContent' + minItems: 2 maxItems: 10 suggestions: $ref: '#/components/schemas/multiChannelFullActions' @@ -2568,7 +2569,11 @@ components: type: string description: >- Defines the layout of the WebView on a mobile device. It must be defined - when application is set to `WEBVIEW` + + when application is set to `WEBVIEW` and must not be set when + application + + is set to `BROWSER`. - `FULL` WebView takes the full screen. @@ -2626,12 +2631,16 @@ components: latitude: type: string format: double - description: The latitude of the location. + description: >- + The latitude of the location. Must be in range [-90.000000, + 90.000000]. example: '37.7749' longitude: type: string format: double - description: The longitude of the location. + description: >- + The longitude of the location. Must be in range [-180.000000, + 180.000000]. example: '-122.4194' label: type: string @@ -2655,12 +2664,16 @@ components: startTime: type: string format: date-time - description: The start time of the event. + description: >- + The start time of the event. Must be a valid RFC-3339 value, + e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. example: 2022-09-14T18:20:16.000Z endTime: type: string format: date-time - description: The end time of the event. + description: >- + The end time of the event. Must be a valid RFC-3339 value, e.g., + 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. example: 2022-09-14T18:20:16.000Z description: type: string @@ -2680,7 +2693,7 @@ components: url: type: string format: uri - description: The URL to open in browser. + description: The URL to open in browser. Must use http:// or https:// scheme. example: https://dev.bandwidth.com maxLength: 2048 application: @@ -6021,12 +6034,30 @@ components: description: Reason code for denial. type: integer example: 511 + denialStatusCodeNullable: + description: Reason code for denial. + nullable: true + type: integer + example: 511 resubmitAllowed: description: >- Whether a Toll-Free Verification request qualifies for resubmission via PUT. example: true type: boolean + additionalDenialReason: + type: object + properties: + statusCode: + $ref: '#/components/schemas/denialStatusCode' + reason: + $ref: '#/components/schemas/declineReasonDescription' + resubmitAllowed: + $ref: '#/components/schemas/resubmitAllowed' + required: + - statusCode + - reason + - resubmitAllowed blocked: description: >- Whether a Toll-Free Verification is blocked. This attribute will only be @@ -6181,19 +6212,6 @@ components: type: boolean description: Indicates whether the content is age-gated. example: false - additionalDenialReason: - properties: - statusCode: - $ref: '#/components/schemas/denialStatusCode' - reason: - $ref: '#/components/schemas/declineReasonDescription' - resubmitAllowed: - $ref: '#/components/schemas/resubmitAllowed' - required: - - statusCode - - reason - - resubmitAllowed - type: object internalTicketNumber: type: string description: >- @@ -6389,6 +6407,7 @@ components: description: >- An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. + type: array items: $ref: '#/components/schemas/additionalDenialReason' example: @@ -6398,7 +6417,6 @@ components: - statusCode: 513 reason: Reason B resubmitAllowed: true - type: array declineReasonDescription: $ref: '#/components/schemas/declineReasonDescription' denialStatusCode: @@ -6766,6 +6784,23 @@ components: $ref: '#/components/schemas/internalTicketNumber' declineReasonDescription: $ref: '#/components/schemas/declineReasonDescription' + denialStatusCode: + $ref: '#/components/schemas/denialStatusCodeNullable' + additionalDenialReasons: + description: >- + An optional list of denial reasons in addition to + declineReasonDescription when multiple reasons apply. + nullable: true + type: array + items: + $ref: '#/components/schemas/additionalDenialReason' + example: + - statusCode: 512 + reason: Reason A + resubmitAllowed: true + - statusCode: 513 + reason: Reason B + resubmitAllowed: true resubmitAllowed: $ref: '#/components/schemas/resubmitAllowed' createdDateTime: diff --git a/docs/MultiChannelAction.md b/docs/MultiChannelAction.md index 6209fce9..2dd71011 100644 --- a/docs/MultiChannelAction.md +++ b/docs/MultiChannelAction.md @@ -8,14 +8,14 @@ | **text** | **String** | Displayed text for user to click | | | **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | | | **phone_number** | **String** | The phone number to dial. Must be E164 format. | | -| **latitude** | **Float** | The latitude of the location. | | -| **longitude** | **Float** | The longitude of the location. | | +| **latitude** | **Float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | | +| **longitude** | **Float** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | | | **label** | **String** | The label of the location. | [optional] | | **title** | **String** | The title of the event. | | -| **start_time** | **Time** | The start time of the event. | | -| **end_time** | **Time** | The end time of the event. | | +| **start_time** | **Time** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | | +| **end_time** | **Time** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | | | **description** | **String** | The description of the event. | [optional] | -| **url** | **String** | The URL to open in browser. | | +| **url** | **String** | The URL to open in browser. Must use http:// or https:// scheme. | | | **application** | [**RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] | | **webview_view_mode** | [**RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] | diff --git a/docs/MultiChannelActionCalendarEvent.md b/docs/MultiChannelActionCalendarEvent.md index 210f98ca..d493b054 100644 --- a/docs/MultiChannelActionCalendarEvent.md +++ b/docs/MultiChannelActionCalendarEvent.md @@ -8,8 +8,8 @@ | **text** | **String** | Displayed text for user to click | | | **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | | | **title** | **String** | The title of the event. | | -| **start_time** | **Time** | The start time of the event. | | -| **end_time** | **Time** | The end time of the event. | | +| **start_time** | **Time** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | | +| **end_time** | **Time** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | | | **description** | **String** | The description of the event. | [optional] | ## Example diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md index a3e18df4..533a7bc4 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@1a99692 + postback_data: [B@24fb752f ) ``` diff --git a/docs/RbmActionOpenUrl.md b/docs/RbmActionOpenUrl.md index 806d991e..e03b865e 100644 --- a/docs/RbmActionOpenUrl.md +++ b/docs/RbmActionOpenUrl.md @@ -7,7 +7,7 @@ | **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | | | **text** | **String** | Displayed text for user to click | | | **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | | -| **url** | **String** | The URL to open in browser. | | +| **url** | **String** | The URL to open in browser. Must use http:// or https:// scheme. | | | **application** | [**RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] | | **webview_view_mode** | [**RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] | diff --git a/docs/RbmActionViewLocation.md b/docs/RbmActionViewLocation.md index e6239613..8457bbdc 100644 --- a/docs/RbmActionViewLocation.md +++ b/docs/RbmActionViewLocation.md @@ -7,8 +7,8 @@ | **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | | | **text** | **String** | Displayed text for user to click | | | **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | | -| **latitude** | **Float** | The latitude of the location. | | -| **longitude** | **Float** | The longitude of the location. | | +| **latitude** | **Float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | | +| **longitude** | **Float** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | | | **label** | **String** | The label of the location. | [optional] | ## Example diff --git a/docs/RbmStandaloneCard.md b/docs/RbmStandaloneCard.md index 35d88d26..2e94374a 100644 --- a/docs/RbmStandaloneCard.md +++ b/docs/RbmStandaloneCard.md @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **orientation** | [**StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | | -| **thumbnail_image_alignment** | [**ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | | +| **thumbnail_image_alignment** | [**ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] | | **card_content** | [**RbmCardContent**](RbmCardContent.md) | | | | **suggestions** | [**Array<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] | diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index 4730a012..36dea1f5 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@1a99692 + postback_data: [B@24fb752f ) ``` diff --git a/docs/TfvStatus.md b/docs/TfvStatus.md index 16ce6a09..89f6c29f 100644 --- a/docs/TfvStatus.md +++ b/docs/TfvStatus.md @@ -8,6 +8,8 @@ | **status** | [**TfvStatusEnum**](TfvStatusEnum.md) | | [optional] | | **internal_ticket_number** | **String** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook payloads. | [optional] | | **decline_reason_description** | **String** | Explanation for why a verification request was declined. | [optional] | +| **denial_status_code** | **Integer** | Reason code for denial. | [optional] | +| **additional_denial_reasons** | [**Array<AdditionalDenialReason>**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] | | **resubmit_allowed** | **Boolean** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | [optional] | | **created_date_time** | **Time** | Date and time the verification request was created. | [optional] | | **modified_date_time** | **Time** | Date and time the verification request was last modified. | [optional] | @@ -26,6 +28,8 @@ instance = Bandwidth::TfvStatus.new( status: null, internal_ticket_number: acde070d-8c4c-4f0d-9d8a-162843c10333, decline_reason_description: Invalid Information - Can't Validate URL - Website is not accessible / not available, + denial_status_code: 511, + additional_denial_reasons: [{"statusCode":512,"reason":"Reason A","resubmitAllowed":true},{"statusCode":513,"reason":"Reason B","resubmitAllowed":true}], resubmit_allowed: true, created_date_time: 2021-06-08T06:45:13Z, modified_date_time: 2021-06-08T06:45:13Z, diff --git a/lib/bandwidth-sdk/configuration.rb b/lib/bandwidth-sdk/configuration.rb index 751eda9a..010085e1 100644 --- a/lib/bandwidth-sdk/configuration.rb +++ b/lib/bandwidth-sdk/configuration.rb @@ -217,7 +217,6 @@ def initialize body = JSON.parse(response.body) @access_token = body['access_token'] @access_token_expiration = Time.now + body['expires_in'] - @access_token } yield(self) if block_given? diff --git a/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb b/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb index b1818806..0a7fa197 100644 --- a/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +++ b/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb @@ -26,10 +26,10 @@ class MultiChannelActionCalendarEvent < ApiModelBase # The title of the event. attr_accessor :title - # The start time of the event. + # The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. attr_accessor :start_time - # The end time of the event. + # The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. attr_accessor :end_time # The description of the event. diff --git a/lib/bandwidth-sdk/models/rbm_action_open_url.rb b/lib/bandwidth-sdk/models/rbm_action_open_url.rb index 0dbcf743..3fbebd70 100644 --- a/lib/bandwidth-sdk/models/rbm_action_open_url.rb +++ b/lib/bandwidth-sdk/models/rbm_action_open_url.rb @@ -23,7 +23,7 @@ class RbmActionOpenUrl < ApiModelBase # Base64 payload the customer receives when the reply is clicked. attr_accessor :postback_data - # The URL to open in browser. + # The URL to open in browser. Must use http:// or https:// scheme. attr_accessor :url attr_accessor :application diff --git a/lib/bandwidth-sdk/models/rbm_action_view_location.rb b/lib/bandwidth-sdk/models/rbm_action_view_location.rb index 90dd45f5..211a54b6 100644 --- a/lib/bandwidth-sdk/models/rbm_action_view_location.rb +++ b/lib/bandwidth-sdk/models/rbm_action_view_location.rb @@ -23,10 +23,10 @@ class RbmActionViewLocation < ApiModelBase # Base64 payload the customer receives when the reply is clicked. attr_accessor :postback_data - # The latitude of the location. + # The latitude of the location. Must be in range [-90.000000, 90.000000]. attr_accessor :latitude - # The longitude of the location. + # The longitude of the location. Must be in range [-180.000000, 180.000000]. attr_accessor :longitude # The label of the location. diff --git a/lib/bandwidth-sdk/models/rbm_card_content.rb b/lib/bandwidth-sdk/models/rbm_card_content.rb index bcbbe75b..64234a2e 100644 --- a/lib/bandwidth-sdk/models/rbm_card_content.rb +++ b/lib/bandwidth-sdk/models/rbm_card_content.rb @@ -14,6 +14,7 @@ require 'time' module Bandwidth + # Must contain at least one of title, description, or media to be valid. class RbmCardContent < ApiModelBase # The title of the card. Must be 200 characters or less. attr_accessor :title diff --git a/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb b/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb index 31e1e335..e402d3b1 100644 --- a/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +++ b/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb @@ -132,6 +132,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "card_contents", number of items must be less than or equal to 10.') end + if @card_contents.length < 2 + invalid_properties.push('invalid value for "card_contents", number of items must be greater than or equal to 2.') + end + if !@suggestions.nil? && @suggestions.length > 11 invalid_properties.push('invalid value for "suggestions", number of items must be less than or equal to 11.') end @@ -146,6 +150,7 @@ def valid? return false if @card_width.nil? return false if @card_contents.nil? return false if @card_contents.length > 10 + return false if @card_contents.length < 2 return false if !@suggestions.nil? && @suggestions.length > 11 true end @@ -171,6 +176,10 @@ def card_contents=(card_contents) fail ArgumentError, 'invalid value for "card_contents", number of items must be less than or equal to 10.' end + if card_contents.length < 2 + fail ArgumentError, 'invalid value for "card_contents", number of items must be greater than or equal to 2.' + end + @card_contents = card_contents end diff --git a/lib/bandwidth-sdk/models/rbm_standalone_card.rb b/lib/bandwidth-sdk/models/rbm_standalone_card.rb index e2dcc85a..4462b194 100644 --- a/lib/bandwidth-sdk/models/rbm_standalone_card.rb +++ b/lib/bandwidth-sdk/models/rbm_standalone_card.rb @@ -106,8 +106,6 @@ def initialize(attributes = {}) if attributes.key?(:'thumbnail_image_alignment') self.thumbnail_image_alignment = attributes[:'thumbnail_image_alignment'] - else - self.thumbnail_image_alignment = nil end if attributes.key?(:'card_content') @@ -132,10 +130,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "orientation", orientation cannot be nil.') end - if @thumbnail_image_alignment.nil? - invalid_properties.push('invalid value for "thumbnail_image_alignment", thumbnail_image_alignment cannot be nil.') - end - if @card_content.nil? invalid_properties.push('invalid value for "card_content", card_content cannot be nil.') end @@ -152,7 +146,6 @@ def list_invalid_properties def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @orientation.nil? - return false if @thumbnail_image_alignment.nil? return false if @card_content.nil? return false if !@suggestions.nil? && @suggestions.length > 11 true @@ -168,16 +161,6 @@ def orientation=(orientation) @orientation = orientation end - # Custom attribute writer method with validation - # @param [Object] thumbnail_image_alignment Value to be assigned - def thumbnail_image_alignment=(thumbnail_image_alignment) - if thumbnail_image_alignment.nil? - fail ArgumentError, 'thumbnail_image_alignment cannot be nil' - end - - @thumbnail_image_alignment = thumbnail_image_alignment - end - # Custom attribute writer method with validation # @param [Object] card_content Value to be assigned def card_content=(card_content) diff --git a/lib/bandwidth-sdk/models/tfv_status.rb b/lib/bandwidth-sdk/models/tfv_status.rb index a4ac44ef..5554a5d1 100644 --- a/lib/bandwidth-sdk/models/tfv_status.rb +++ b/lib/bandwidth-sdk/models/tfv_status.rb @@ -26,6 +26,12 @@ class TfvStatus < ApiModelBase # Explanation for why a verification request was declined. attr_accessor :decline_reason_description + # Reason code for denial. + attr_accessor :denial_status_code + + # An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. + attr_accessor :additional_denial_reasons + # Whether a Toll-Free Verification request qualifies for resubmission via PUT. attr_accessor :resubmit_allowed @@ -75,6 +81,8 @@ def self.attribute_map :'status' => :'status', :'internal_ticket_number' => :'internalTicketNumber', :'decline_reason_description' => :'declineReasonDescription', + :'denial_status_code' => :'denialStatusCode', + :'additional_denial_reasons' => :'additionalDenialReasons', :'resubmit_allowed' => :'resubmitAllowed', :'created_date_time' => :'createdDateTime', :'modified_date_time' => :'modifiedDateTime', @@ -102,6 +110,8 @@ def self.openapi_types :'status' => :'TfvStatusEnum', :'internal_ticket_number' => :'String', :'decline_reason_description' => :'String', + :'denial_status_code' => :'Integer', + :'additional_denial_reasons' => :'Array', :'resubmit_allowed' => :'Boolean', :'created_date_time' => :'Time', :'modified_date_time' => :'Time', @@ -115,6 +125,8 @@ def self.openapi_types # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'denial_status_code', + :'additional_denial_reasons', :'cv_token' ]) end @@ -151,6 +163,16 @@ def initialize(attributes = {}) self.decline_reason_description = attributes[:'decline_reason_description'] end + if attributes.key?(:'denial_status_code') + self.denial_status_code = attributes[:'denial_status_code'] + end + + if attributes.key?(:'additional_denial_reasons') + if (value = attributes[:'additional_denial_reasons']).is_a?(Array) + self.additional_denial_reasons = value + end + end + if attributes.key?(:'resubmit_allowed') self.resubmit_allowed = attributes[:'resubmit_allowed'] end @@ -267,6 +289,8 @@ def ==(o) status == o.status && internal_ticket_number == o.internal_ticket_number && decline_reason_description == o.decline_reason_description && + denial_status_code == o.denial_status_code && + additional_denial_reasons == o.additional_denial_reasons && resubmit_allowed == o.resubmit_allowed && created_date_time == o.created_date_time && modified_date_time == o.modified_date_time && @@ -285,7 +309,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, cv_token].hash + [phone_number, status, internal_ticket_number, decline_reason_description, denial_status_code, additional_denial_reasons, resubmit_allowed, created_date_time, modified_date_time, submission, blocked, blocked_reason, cv_token].hash end # Builds the object from hash