diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index ce9ee26..be4cf51 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -100,6 +100,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 @@ -271,6 +272,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 97229bd..afed6c6 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,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 4b3681c..65afd41 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -179,6 +179,16 @@ 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/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 +1726,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 +1844,33 @@ 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 + 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 @@ -6940,6 +6992,90 @@ 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 + 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/ListMessageItem.md b/docs/ListMessageItem.md index f4ddf25..63dbfef 100644 --- a/docs/ListMessageItem.md +++ b/docs/ListMessageItem.md @@ -21,6 +21,11 @@ | **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] | +| **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 +49,12 @@ instance = Bandwidth::ListMessageItem.new( attachment_count: 1, recipient_count: 1, campaign_class: T, - campaign_id: CJEUMDK + campaign_id: CJEUMDK, + bw_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 b32f532..dad134d 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -114,6 +114,16 @@ 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. + 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 +173,16 @@ 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] | +| **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/ProductTypeEnum.md b/docs/ProductTypeEnum.md new file mode 100644 index 0000000..157f3fd --- /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 8a357c4..45bdee5 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@12ebfb2d ) ``` diff --git a/docs/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md index 96842d9..fa28ffb 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@12ebfb2d ) ``` diff --git a/lib/bandwidth-sdk.rb b/lib/bandwidth-sdk.rb index a0f6136..25d119a 100644 --- a/lib/bandwidth-sdk.rb +++ b/lib/bandwidth-sdk.rb @@ -106,6 +106,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 864f53f..079afbc 100644 --- a/lib/bandwidth-sdk/api/messages_api.rb +++ b/lib/bandwidth-sdk/api/messages_api.rb @@ -108,6 +108,16 @@ 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 [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 +143,16 @@ 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 [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 +182,16 @@ 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[:'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/list_message_item.rb b/lib/bandwidth-sdk/models/list_message_item.rb index 43209ce..0cb2be7 100644 --- a/lib/bandwidth-sdk/models/list_message_item.rb +++ b/lib/bandwidth-sdk/models/list_message_item.rb @@ -63,6 +63,21 @@ 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 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 +119,12 @@ def self.attribute_map :'attachment_count' => :'attachmentCount', :'recipient_count' => :'recipientCount', :'campaign_class' => :'campaignClass', - :'campaign_id' => :'campaignId' + :'campaign_id' => :'campaignId', + :'bw_latency' => :'bwLatency', + :'calling_number_country_a3' => :'callingNumberCountryA3', + :'called_number_country_a3' => :'calledNumberCountryA3', + :'product' => :'product', + :'location' => :'location' } end @@ -132,7 +152,12 @@ def self.openapi_types :'attachment_count' => :'Integer', :'recipient_count' => :'Integer', :'campaign_class' => :'String', - :'campaign_id' => :'String' + :'campaign_id' => :'String', + :'bw_latency' => :'Integer', + :'calling_number_country_a3' => :'String', + :'called_number_country_a3' => :'String', + :'product' => :'String', + :'location' => :'String' } end @@ -144,7 +169,12 @@ def self.openapi_nullable :'attachment_count', :'recipient_count', :'campaign_class', - :'campaign_id' + :'campaign_id', + :'bw_latency', + :'calling_number_country_a3', + :'called_number_country_a3', + :'product', + :'location' ]) end @@ -230,6 +260,26 @@ 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?(:'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 +318,12 @@ 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 && + 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 +335,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, 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 158ecea..1398db8 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/product_type_enum.rb b/lib/bandwidth-sdk/models/product_type_enum.rb new file mode 100644 index 0000000..53bdbcb --- /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