diff --git a/bandwidth.yml b/bandwidth.yml index 4b88b456..53949fed 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -8237,8 +8237,8 @@ components: in: path name: mediaId required: true - description: Media ID to retrieve. - example: 14762070468292kw2fuqty55yp2b2/0/bw.png + description: The ID of the media file. + example: bw.png schema: type: string contentType: diff --git a/custom_templates/gem.mustache b/custom_templates/gem.mustache index cd6eeb59..f9c90d1c 100644 --- a/custom_templates/gem.mustache +++ b/custom_templates/gem.mustache @@ -53,6 +53,7 @@ require 'bandwidth-sdk/models/bxml/verbs/phone_number' require 'bandwidth-sdk/models/bxml/verbs/play_audio' require 'bandwidth-sdk/models/bxml/verbs/record' require 'bandwidth-sdk/models/bxml/verbs/redirect' +require 'bandwidth-sdk/models/bxml/verbs/refer' require 'bandwidth-sdk/models/bxml/verbs/resume_recording' require 'bandwidth-sdk/models/bxml/verbs/ring' require 'bandwidth-sdk/models/bxml/verbs/send_dtmf' diff --git a/docs/MediaApi.md b/docs/MediaApi.md index 8cad64bb..ab6fd49f 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -35,7 +35,7 @@ end api_instance = Bandwidth::MediaApi.new account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** -media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve. +media_id = 'bw.png' # String | The ID of the media file. begin # Delete Media @@ -68,7 +68,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | -| **media_id** | **String** | Media ID to retrieve. | | +| **media_id** | **String** | The ID of the media file. | | ### Return type @@ -109,7 +109,7 @@ end api_instance = Bandwidth::MediaApi.new account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** -media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve. +media_id = 'bw.png' # String | The ID of the media file. begin # Get Media @@ -143,7 +143,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | -| **media_id** | **String** | Media ID to retrieve. | | +| **media_id** | **String** | The ID of the media file. | | ### Return type @@ -261,7 +261,7 @@ end api_instance = Bandwidth::MediaApi.new account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** -media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve. +media_id = 'bw.png' # String | The ID of the media file. body = File.new('/path/to/some/file') # File | opts = { content_type: 'audio/wav', # String | The media type of the entity-body. @@ -299,7 +299,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | -| **media_id** | **String** | Media ID to retrieve. | | +| **media_id** | **String** | The ID of the media file. | | | **body** | **File** | | | | **content_type** | **String** | The media type of the entity-body. | [optional] | | **cache_control** | **String** | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | [optional] | diff --git a/lib/bandwidth-sdk/api/media_api.rb b/lib/bandwidth-sdk/api/media_api.rb index 133cb66b..7ca88f54 100644 --- a/lib/bandwidth-sdk/api/media_api.rb +++ b/lib/bandwidth-sdk/api/media_api.rb @@ -22,7 +22,7 @@ def initialize(api_client = ApiClient.default) # Delete Media # Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name. # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** - # @param media_id [String] Media ID to retrieve. + # @param media_id [String] The ID of the media file. # @param [Hash] opts the optional parameters # @return [nil] def delete_media(account_id, media_id, opts = {}) @@ -33,7 +33,7 @@ def delete_media(account_id, media_id, opts = {}) # Delete Media # Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name. # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** - # @param media_id [String] Media ID to retrieve. + # @param media_id [String] The ID of the media file. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_media_with_http_info(account_id, media_id, opts = {}) @@ -91,7 +91,7 @@ def delete_media_with_http_info(account_id, media_id, opts = {}) # Get Media # Downloads a media file you previously uploaded. # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** - # @param media_id [String] Media ID to retrieve. + # @param media_id [String] The ID of the media file. # @param [Hash] opts the optional parameters # @return [File] def get_media(account_id, media_id, opts = {}) @@ -102,7 +102,7 @@ def get_media(account_id, media_id, opts = {}) # Get Media # Downloads a media file you previously uploaded. # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** - # @param media_id [String] Media ID to retrieve. + # @param media_id [String] The ID of the media file. # @param [Hash] opts the optional parameters # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers def get_media_with_http_info(account_id, media_id, opts = {}) @@ -226,7 +226,7 @@ def list_media_with_http_info(account_id, opts = {}) # Upload Media # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** - # @param media_id [String] Media ID to retrieve. + # @param media_id [String] The ID of the media file. # @param body [File] # @param [Hash] opts the optional parameters # @option opts [String] :content_type The media type of the entity-body. @@ -240,7 +240,7 @@ def upload_media(account_id, media_id, body, opts = {}) # Upload Media # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** - # @param media_id [String] Media ID to retrieve. + # @param media_id [String] The ID of the media file. # @param body [File] # @param [Hash] opts the optional parameters # @option opts [String] :content_type The media type of the entity-body. diff --git a/spec/smoke/media_api_spec.rb b/spec/smoke/media_api_spec.rb index 687bee36..3f31dd01 100644 --- a/spec/smoke/media_api_spec.rb +++ b/spec/smoke/media_api_spec.rb @@ -8,8 +8,8 @@ before(:all) do config = Bandwidth::Configuration.new config.configure do |config| - config.username = BW_USERNAME - config.password = BW_PASSWORD + config.client_id = BW_CLIENT_ID + config.client_secret = BW_CLIENT_SECRET config.return_binary_data = true end client = Bandwidth::ApiClient.new(config) diff --git a/spec/smoke/messages_api_spec.rb b/spec/smoke/messages_api_spec.rb index 43a9d704..09f8e8ac 100644 --- a/spec/smoke/messages_api_spec.rb +++ b/spec/smoke/messages_api_spec.rb @@ -12,8 +12,8 @@ before(:all) do config = Bandwidth::Configuration.new config.configure do |config| - config.username = BW_USERNAME - config.password = BW_PASSWORD + config.client_id = BW_CLIENT_ID + config.client_secret = BW_CLIENT_SECRET end client = Bandwidth::ApiClient.new(config) @messaging_api_instance = Bandwidth::MessagesApi.new(client)