From 703ddcf05702bc18c2bbaa9bc7a7c6d2f734bc70 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 16 Oct 2023 15:52:29 -0500 Subject: [PATCH] Remove duplicate hardcoded fees --- bin/sim_job | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/sim_job b/bin/sim_job index b67f51687c9830a75e56ec04ed8d4a6d96fee77a..06816e3c66fcad08a175a1f8a6f3df8dcddffe03 100755 --- a/bin/sim_job +++ b/bin/sim_job @@ -204,20 +204,16 @@ class SimAnnual end def call - if customer.balance >= annual_fee + if customer.balance >= annual_price refill_and_bill(1024, annual_price, "Annual fee for #{iccid}") else - LowBalance.for(customer, refill_price).then(&:notify!).then do |result| + LowBalance.for(customer, annual_price).then(&:notify!).then do |result| next call if result.positive? notify end end end - - def annual_fee - customer.currency == :USD ? BigDecimal("5.50") : BigDecimal("7.50") - end end def fetch_customers(cids)