Skip to content

Commit 4e6669c

Browse files
committed
Deploy
1 parent 927c7b8 commit 4e6669c

33 files changed

+321
-35
lines changed

bandwidth-sdk-3.10.0.gem

37.5 KB
Binary file not shown.

bandwidth-sdk-3.9.0.gem

-36 KB
Binary file not shown.

bandwidth.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'bandwidth-sdk'
3-
s.version = '3.9.0'
3+
s.version = '3.10.0'
44
s.summary = 'bandwidth'
55
s.description = 'Bandwidth\'s set of APIs'
66
s.authors = ['APIMatic SDK Generator']

lib/bandwidth/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def web_rtc_client
3030

3131
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
3232
backoff_factor: 1, environment: Environment::PRODUCTION,
33+
base_url: 'https://www.example.com',
3334
messaging_basic_auth_user_name: 'TODO: Replace',
3435
messaging_basic_auth_password: 'TODO: Replace',
3536
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
@@ -43,6 +44,7 @@ def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
4344
retry_interval: retry_interval,
4445
backoff_factor: backoff_factor,
4546
environment: environment,
47+
base_url: base_url,
4648
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
4749
messaging_basic_auth_password: messaging_basic_auth_password,
4850
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,

lib/bandwidth/configuration.rb

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module Bandwidth
77
# An enum for SDK environments.
88
class Environment
99
ENVIRONMENT = [
10-
PRODUCTION = 'production'.freeze
10+
PRODUCTION = 'production'.freeze,
11+
CUSTOM = 'custom'.freeze
1112
].freeze
1213
end
1314

@@ -32,6 +33,7 @@ class Configuration
3233
attr_reader :retry_interval
3334
attr_reader :backoff_factor
3435
attr_reader :environment
36+
attr_reader :base_url
3537
attr_reader :messaging_basic_auth_user_name
3638
attr_reader :messaging_basic_auth_password
3739
attr_reader :two_factor_auth_basic_auth_user_name
@@ -47,6 +49,7 @@ class << self
4749

4850
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
4951
backoff_factor: 1, environment: Environment::PRODUCTION,
52+
base_url: 'https://www.example.com',
5053
messaging_basic_auth_user_name: 'TODO: Replace',
5154
messaging_basic_auth_password: 'TODO: Replace',
5255
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
@@ -71,6 +74,9 @@ def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
7174
# Current API environment
7275
@environment = String(environment)
7376

77+
# baseUrl value
78+
@base_url = base_url
79+
7480
# The username to use with basic authentication
7581
@messaging_basic_auth_user_name = messaging_basic_auth_user_name
7682

@@ -100,7 +106,7 @@ def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
100106
end
101107

102108
def clone_with(timeout: nil, max_retries: nil, retry_interval: nil,
103-
backoff_factor: nil, environment: nil,
109+
backoff_factor: nil, environment: nil, base_url: nil,
104110
messaging_basic_auth_user_name: nil,
105111
messaging_basic_auth_password: nil,
106112
two_factor_auth_basic_auth_user_name: nil,
@@ -114,6 +120,7 @@ def clone_with(timeout: nil, max_retries: nil, retry_interval: nil,
114120
retry_interval ||= self.retry_interval
115121
backoff_factor ||= self.backoff_factor
116122
environment ||= self.environment
123+
base_url ||= self.base_url
117124
messaging_basic_auth_user_name ||= self.messaging_basic_auth_user_name
118125
messaging_basic_auth_password ||= self.messaging_basic_auth_password
119126
two_factor_auth_basic_auth_user_name ||= self.two_factor_auth_basic_auth_user_name
@@ -126,7 +133,7 @@ def clone_with(timeout: nil, max_retries: nil, retry_interval: nil,
126133
Configuration.new(
127134
timeout: timeout, max_retries: max_retries,
128135
retry_interval: retry_interval, backoff_factor: backoff_factor,
129-
environment: environment,
136+
environment: environment, base_url: base_url,
130137
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
131138
messaging_basic_auth_password: messaging_basic_auth_password,
132139
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,
@@ -152,6 +159,13 @@ def create_http_client
152159
Server::TWOFACTORAUTHDEFAULT => 'https://mfa.bandwidth.com/api/v1/',
153160
Server::VOICEDEFAULT => 'https://voice.bandwidth.com',
154161
Server::WEBRTCDEFAULT => 'https://api.webrtc.bandwidth.com/v1'
162+
},
163+
Environment::CUSTOM => {
164+
Server::DEFAULT => '{base_url}',
165+
Server::MESSAGINGDEFAULT => '{base_url}',
166+
Server::TWOFACTORAUTHDEFAULT => '{base_url}',
167+
Server::VOICEDEFAULT => '{base_url}',
168+
Server::WEBRTCDEFAULT => '{base_url}'
155169
}
156170
}.freeze
157171

@@ -160,7 +174,12 @@ def create_http_client
160174
# required.
161175
# @return [String] The base URI.
162176
def get_base_uri(server = Server::DEFAULT)
163-
ENVIRONMENTS[environment][server].clone
177+
parameters = {
178+
'base_url' => { 'value' => base_url, 'encode' => false }
179+
}
180+
APIHelper.append_url_with_template_parameters(
181+
ENVIRONMENTS[environment][server], parameters
182+
)
164183
end
165184
end
166185
end

lib/bandwidth/messaging_lib/messaging/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def client
1717

1818
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
1919
backoff_factor: 1, environment: Environment::PRODUCTION,
20+
base_url: 'https://www.example.com',
2021
messaging_basic_auth_user_name: 'TODO: Replace',
2122
messaging_basic_auth_password: 'TODO: Replace',
2223
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
@@ -32,6 +33,7 @@ def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
3233
retry_interval: retry_interval,
3334
backoff_factor: backoff_factor,
3435
environment: environment,
36+
base_url: base_url,
3537
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
3638
messaging_basic_auth_password: messaging_basic_auth_password,
3739
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,

lib/bandwidth/messaging_lib/messaging/controllers/base_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def initialize(config, http_call_back: nil)
1313
@http_call_back = http_call_back
1414

1515
@global_headers = {
16-
'user-agent' => 'ruby-sdk-refs/tags/ruby3.9.0'
16+
'user-agent' => 'ruby-sdk-refs/tags/ruby3.10.0'
1717
}
1818
end
1919

lib/bandwidth/two_factor_auth_lib/two_factor_auth/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def client
1717

1818
def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
1919
backoff_factor: 1, environment: Environment::PRODUCTION,
20+
base_url: 'https://www.example.com',
2021
messaging_basic_auth_user_name: 'TODO: Replace',
2122
messaging_basic_auth_password: 'TODO: Replace',
2223
two_factor_auth_basic_auth_user_name: 'TODO: Replace',
@@ -32,6 +33,7 @@ def initialize(timeout: 60, max_retries: 0, retry_interval: 1,
3233
retry_interval: retry_interval,
3334
backoff_factor: backoff_factor,
3435
environment: environment,
36+
base_url: base_url,
3537
messaging_basic_auth_user_name: messaging_basic_auth_user_name,
3638
messaging_basic_auth_password: messaging_basic_auth_password,
3739
two_factor_auth_basic_auth_user_name: two_factor_auth_basic_auth_user_name,

lib/bandwidth/two_factor_auth_lib/two_factor_auth/controllers/base_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def initialize(config, http_call_back: nil)
1313
@http_call_back = http_call_back
1414

1515
@global_headers = {
16-
'user-agent' => 'ruby-sdk-refs/tags/ruby3.9.0'
16+
'user-agent' => 'ruby-sdk-refs/tags/ruby3.10.0'
1717
}
1818
end
1919

lib/bandwidth/voice_lib/bxml/verbs/bridge.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ def to_bxml(xml)
1414
'bridgeTargetCompleteMethod' => bridge_target_complete_method,
1515
'username' => username,
1616
'password' => password,
17-
'tag' => tag
17+
'tag' => tag,
18+
'bridgeCompleteFallbackUrl' => bridge_complete_fallback_url,
19+
'bridgeCompleteFallbackMethod' => bridge_complete_fallback_method,
20+
'bridgeTargetCompleteFallbackUrl' => bridge_target_complete_fallback_url,
21+
'bridgeTargetCompleteFallbackMethod' => bridge_target_complete_fallback_method,
22+
'fallbackUsername' => fallback_username,
23+
'fallbackPassword' => fallback_password
1824
}))
1925
end
2026
end

0 commit comments

Comments
 (0)