From 1a552c09a02f4f692313f640f4a8114e2c8a35aa Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 2 Jun 2025 14:27:38 -0500 Subject: [PATCH] Back to rate center for now, city is not there --- lib/bandwidth_tn_repo.rb | 4 +--- test/test_admin_command.rb | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/bandwidth_tn_repo.rb b/lib/bandwidth_tn_repo.rb index afd7b9b50a83352fe7d877d97bd8a3693aa64759..29f5e3044d3ccbbb8f075d11fe6f54eebab0d897 100644 --- a/lib/bandwidth_tn_repo.rb +++ b/lib/bandwidth_tn_repo.rb @@ -49,9 +49,7 @@ class BandwidthTnRepo def stash_for_later(tel, btn) details = btn.get_rate_center region = details[:state] - raise "No city in: #{details.inspect}" unless details[:city] - - locality = details[:city] + locality = details[:rate_center] params = [tel, region, locality, CONFIG[:creds][:account]] DB.exec(STASH_QUERY, params) end diff --git a/test/test_admin_command.rb b/test/test_admin_command.rb index 313e2b3bb3a6906e7b02dfb1ab0a397ef8b7adb0..4bbee4c95c2e56230c39e8f5d16783403efb7e44 100644 --- a/test/test_admin_command.rb +++ b/test/test_admin_command.rb @@ -251,7 +251,6 @@ class AdminCommandTest < Minitest::Test def test_action_cancel_account_keep_number rate_center_response = { "TelephoneNumberDetails": { - City: "MANHATTAN", State: "NY", RateCenter: "NWYRCYZN01" } @@ -294,7 +293,7 @@ class AdminCommandTest < Minitest::Test sgx, admin = admin_command("+15566667777") - sql_params = ["+15566667777", "NY", "MANHATTAN", "test_bw_account"] + sql_params = ["+15566667777", "NY", "NWYRCYZN01", "test_bw_account"] BandwidthTnRepo::DB.expect( :exec,