Detailed changes
@@ -17,7 +17,13 @@
, churnbuster : { account_id : Text, api_key : Text }
, component : { jid : Text, secret : Text }
, credit_card_url : forall (jid : Text) -> forall (customer_id : Text) -> Text
-, creds : { account : Text, password : Text, username : Text }
+, creds :
+ { account : Text
+ , client_id : Text
+ , client_secret : Text
+ , password : Text
+ , username : Text
+ }
, direct_sources : List { mapKey : Text, mapValue : Text }
, direct_targets : List { mapKey : Text, mapValue : Text }
, electrum :
@@ -19,6 +19,8 @@ in
],
creds = {
account = "00000",
+ client_id = "oauth client id",
+ client_secret = "oauth client secret",
username = "dashboard user",
password = "dashboard password"
},
@@ -25,8 +25,8 @@ class BandwidthTnRepo
@move_client =
BandwidthIris::Client.new(
account_id: CONFIG[:keep_area_codes_in][:account],
- username: CONFIG[:creds][:username],
- password: CONFIG[:creds][:password]
+ client_id: CONFIG[:creds][:client_id],
+ client_secret: CONFIG[:creds][:client_secret]
)
end
@@ -121,12 +121,12 @@ EM::Hiredis::Client.load_scripts_from("#{__dir__}/redis_lua")
Faraday.default_adapter = :em_synchrony
BandwidthIris::Client.global_options = {
account_id: CONFIG[:creds][:account],
- username: CONFIG[:creds][:username],
- password: CONFIG[:creds][:password]
+ client_id: CONFIG[:creds][:client_id],
+ client_secret: CONFIG[:creds][:client_secret]
}
Bandwidth.configure do |config|
- config.client_id = CONFIG[:creds][:username]
- config.client_secret = CONFIG[:creds][:password]
+ config.client_id = CONFIG[:creds][:client_id]
+ config.client_secret = CONFIG[:creds][:client_secret]
end
BANDWIDTH_VOICE = Bandwidth::CallsApi.new
@@ -85,6 +85,8 @@ CONFIG = {
},
creds: {
account: "test_bw_account",
+ client_id: "test_bw_client_id",
+ client_secret: "test_bw_client_secret",
username: "test_bw_user",
password: "test_bw_password"
},