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