Use billing customer for LowBalance notification

Stephen Paul Weber created

Change summary

lib/low_balance.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

lib/low_balance.rb 🔗

@@ -8,10 +8,10 @@ class LowBalance
 		return Locked.new unless customer.registered?
 
 		ExpiringLock.new(
-			"jmp_customer_low_balance-#{customer.customer_id}",
+			"jmp_customer_low_balance-#{customer.billing_customer_id}",
 			expiry: 60 * 60 * 24 * 7
 		).with(-> { Locked.new }) do
-			for_no_lock(customer)
+			customer.billing_customer.then(&method(:for_no_lock))
 		end
 	end