From ebe332895d098e4da29ea3057a9cb1203d724a3d Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 15 Jan 2024 14:16:18 -0500 Subject: [PATCH] Need customer --- lib/low_balance.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/low_balance.rb b/lib/low_balance.rb index f946aad26206cdec298b49bdbd07870684b16330..2b10a460a2419a1abe2858778af112f8da323388 100644 --- a/lib/low_balance.rb +++ b/lib/low_balance.rb @@ -6,7 +6,7 @@ require_relative "credit_card_sale" class LowBalance def self.for(customer, transaction_amount=0) - locked_if_no_services.then do |locked| + locked_if_no_services(customer).then do |locked| locked || ExpiringLock.new( "jmp_customer_low_balance-#{customer.billing_customer_id}", expiry: 60 * 60 * 24 * 7 @@ -18,7 +18,7 @@ class LowBalance end end - def self.locked_if_no_services + def self.locked_if_no_services(customer) return if customer.registered? DB.query_defer(