Skip to content

Commit

Permalink
Clean SDK using Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
DX-Bandwidth committed Sep 24, 2024
1 parent 106c3e3 commit 545f162
Show file tree
Hide file tree
Showing 103 changed files with 144 additions and 299 deletions.
22 changes: 11 additions & 11 deletions bandwidth-sdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ Generator version: 7.8.0
=end

$:.push File.expand_path("../lib", __FILE__)
require "bandwidth-sdk/version"
$:.push File.expand_path('../lib', __FILE__)
require 'bandwidth-sdk/version'

Gem::Specification.new do |s|
s.name = "bandwidth-sdk"
s.name = 'bandwidth-sdk'
s.version = Bandwidth::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Bandwidth"]
s.email = ["[email protected]"]
s.homepage = "https://github.com/Bandwidth/ruby-sdk"
s.summary = "Bandwidth Ruby SDK"
s.description = "The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs"
s.license = "MIT"
s.required_ruby_version = ">=2.7"
s.authors = ['Bandwidth']
s.email = ['[email protected]']
s.homepage = 'https://github.com/Bandwidth/ruby-sdk'
s.summary = 'Bandwidth Ruby SDK'
s.description = 'The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs'
s.license = 'MIT'
s.required_ruby_version = '>=2.7'
s.metadata = {}

s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
Expand All @@ -38,5 +38,5 @@ Gem::Specification.new do |s|
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
s.test_files = `find spec/*`.split("\n")
s.executables = []
s.require_paths = ["lib"]
s.require_paths = ['lib']
end
6 changes: 3 additions & 3 deletions lib/bandwidth-sdk/api/calls_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create_call_with_http_info(account_id, create_call, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down Expand Up @@ -302,7 +302,7 @@ def update_call_with_http_info(account_id, call_id, update_call, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down Expand Up @@ -382,7 +382,7 @@ def update_call_bxml_with_http_info(account_id, call_id, body, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/xml'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down
6 changes: 3 additions & 3 deletions lib/bandwidth-sdk/api/conferences_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def update_conference_with_http_info(account_id, conference_id, update_conferenc
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down Expand Up @@ -596,7 +596,7 @@ def update_conference_bxml_with_http_info(account_id, conference_id, body, opts
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/xml'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down Expand Up @@ -682,7 +682,7 @@ def update_conference_member_with_http_info(account_id, conference_id, member_id
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/media_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def upload_media_with_http_info(account_id, media_id, body, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json', 'application/ogg', 'application/pdf', 'application/rtf', 'application/zip', 'application/x-tar', 'application/xml', 'application/gzip', 'application/x-bzip2', 'application/x-gzip', 'application/smil', 'application/javascript', 'audio/mp4', 'audio/mpeg', 'audio/ogg', 'audio/flac', 'audio/webm', 'audio/wav', 'audio/amr', 'audio/3gpp', 'image/bmp', 'image/gif', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/svg+xml', 'image/tiff', 'image/webp', 'image/x-icon', 'text/css', 'text/csv', 'text/calendar', 'text/plain', 'text/javascript', 'text/vcard', 'text/vnd.wap.wml', 'text/xml', 'video/avi', 'video/mp4', 'video/mpeg', 'video/ogg', 'video/quicktime', 'video/webm', 'video/x-ms-wmv'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end
header_params[:'Content-Type'] = opts[:'content_type'] if !opts[:'content_type'].nil?
header_params[:'Cache-Control'] = opts[:'cache_control'] if !opts[:'cache_control'].nil?
Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/messages_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create_message_with_http_info(account_id, message_request, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down
6 changes: 3 additions & 3 deletions lib/bandwidth-sdk/api/mfa_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def generate_messaging_code_with_http_info(account_id, code_request, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down Expand Up @@ -135,7 +135,7 @@ def generate_voice_code_with_http_info(account_id, code_request, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down Expand Up @@ -209,7 +209,7 @@ def verify_code_with_http_info(account_id, verify_code_request, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api/phone_number_lookup_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create_lookup_with_http_info(account_id, lookup_request, opts = {})
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down
4 changes: 2 additions & 2 deletions lib/bandwidth-sdk/api/recordings_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def transcribe_call_recording_with_http_info(account_id, call_id, recording_id,
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down Expand Up @@ -747,7 +747,7 @@ def update_call_recording_state_with_http_info(account_id, call_id, update_call_
# HTTP header 'Content-Type'
content_type = @api_client.select_header_content_type(['application/json'])
if !content_type.nil?
header_params['Content-Type'] = content_type
header_params['Content-Type'] = content_type
end

# form parameters
Expand Down
2 changes: 1 addition & 1 deletion lib/bandwidth-sdk/api_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def to_s

def message
if @message.nil?
msg = "Error message: the server returns an error"
msg = 'Error message: the server returns an error'
else
msg = @message
end
Expand Down
1 change: 0 additions & 1 deletion lib/bandwidth-sdk/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,5 @@ def configure_middleware(connection)
end
end
end

end
end
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/account_statistics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::AccountStatistics` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::AccountStatistics` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -219,7 +219,5 @@ def _to_hash(value)
value
end
end

end

end
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/answer_callback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::AnswerCallback` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::AnswerCallback` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -364,7 +364,5 @@ def _to_hash(value)
value
end
end

end

end
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/bridge_complete_callback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::BridgeCompleteCallback` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::BridgeCompleteCallback` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -386,7 +386,5 @@ def _to_hash(value)
value
end
end

end

end
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/bridge_target_complete_callback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::BridgeTargetCompleteCallback` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::BridgeTargetCompleteCallback` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -354,7 +354,5 @@ def _to_hash(value)
value
end
end

end

end
4 changes: 2 additions & 2 deletions lib/bandwidth-sdk/models/call_direction_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

module Bandwidth
class CallDirectionEnum
INBOUND = "inbound".freeze
OUTBOUND = "outbound".freeze
INBOUND = 'inbound'.freeze
OUTBOUND = 'outbound'.freeze

def self.all_vars
@all_vars ||= [INBOUND, OUTBOUND].freeze
Expand Down
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/call_recording_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::CallRecordingMetadata` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CallRecordingMetadata` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -410,7 +410,5 @@ def _to_hash(value)
value
end
end

end

end
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/call_state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::CallState` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CallState` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -412,7 +412,5 @@ def _to_hash(value)
value
end
end

end

end
4 changes: 2 additions & 2 deletions lib/bandwidth-sdk/models/call_state_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

module Bandwidth
class CallStateEnum
ACTIVE = "active".freeze
COMPLETED = "completed".freeze
ACTIVE = 'active'.freeze
COMPLETED = 'completed'.freeze

def self.all_vars
@all_vars ||= [ACTIVE, COMPLETED].freeze
Expand Down
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/call_transcription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::CallTranscription` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CallTranscription` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -287,7 +287,5 @@ def _to_hash(value)
value
end
end

end

end
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

module Bandwidth
class CallTranscriptionDetectedLanguageEnum
EN_US = "en-US".freeze
ES_US = "es-US".freeze
FR_FR = "fr-FR".freeze
EN_US = 'en-US'.freeze
ES_US = 'es-US'.freeze
FR_FR = 'fr-FR'.freeze

def self.all_vars
@all_vars ||= [EN_US, ES_US, FR_FR].freeze
Expand Down
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/call_transcription_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::CallTranscriptionMetadata` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CallTranscriptionMetadata` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -229,7 +229,5 @@ def _to_hash(value)
value
end
end

end

end
4 changes: 1 addition & 3 deletions lib/bandwidth-sdk/models/call_transcription_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def self.openapi_nullable
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::CallTranscriptionResponse` initialize method"
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CallTranscriptionResponse` initialize method'
end

# check to see if the attribute exists and convert string to symbol for hash key
Expand Down Expand Up @@ -240,7 +240,5 @@ def _to_hash(value)
value
end
end

end

end
4 changes: 2 additions & 2 deletions lib/bandwidth-sdk/models/call_transcription_track_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

module Bandwidth
class CallTranscriptionTrackEnum
INBOUND = "inbound".freeze
OUTBOUND = "outbound".freeze
INBOUND = 'inbound'.freeze
OUTBOUND = 'outbound'.freeze

def self.all_vars
@all_vars ||= [INBOUND, OUTBOUND].freeze
Expand Down
4 changes: 2 additions & 2 deletions lib/bandwidth-sdk/models/callback_method_enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

module Bandwidth
class CallbackMethodEnum
GET = "GET".freeze
POST = "POST".freeze
GET = 'GET'.freeze
POST = 'POST'.freeze

def self.all_vars
@all_vars ||= [GET, POST].freeze
Expand Down
Loading

0 comments on commit 545f162

Please sign in to comment.