Split CreditCardSale from Transaction
This is a refactor that involves pulling the Credit Card stuff (meaning
braintree) out of the Transaction stuff. This makes Transaction a more
generic implementation of our Transaction table.
This commit should maintain the status quo, though. The places that used
to call Transaction.sale now call CreditCardSale.create, and that got a
little easier because we now do the `.insert` inside the create, because
previously all the callsites just got the transaction out and then
inserted anyway.
So they got a little bit simpler, but the main value of this is that now
we can insert other kinds of transactions and not just credit card
transactions!
Merge branch 'low-balance-target'
* low-balance-target:
Fix linter, integrate patch feedback
Add low balance/auto top up with target amount
Fix linter, integrate patch feedback
Add low balance/auto top up with target amount
Merge branch 'longer-auto-top-up-block'
* longer-auto-top-up-block:
The secondary block should be longer than the main lock...
The secondary block should be longer than the main lock...
When an auto top up fails, don't retry that card soon
for any auto top up
Merge branch 'multi-account-billing'
* multi-account-billing:
Use billing customer for LowBalance notification
Get settled amount from billing customer for TrustLevelRepo
Use the multi account billing schema
Use billing customer for LowBalance notification
Merge branch 'monthly-billing'
* monthly-billing:
Allow the DB to notify us to bill a customer
Command.execution setter
Bill plan command
Clearer name for lock bypass factory
Clearer name for lock bypass factory
LowBalance returns amount added, if any
Merge branch 'overage-limit'
* overage-limit:
auto_top_up_amount and monthly_overage_limit from CustomerRepo
Move Bandwidth Tn remote operations to BandwidthTnRepo
Use value_semantics to DRY up CustomerRepo
Use NotFound exception for all customer not found cases
auto_top_up_amount and monthly_overage_limit from CustomerRepo
Move load of auto_top_up_amount to the repo, and load monthly_overage_limit in
the same operation.
No low balance if not registered
If cancelled or expired or not-yet-registered, don't auto top up or notify about
low balance.
Merge branch 'rubocop'
* rubocop:
Additional fixes for rubocop 1.10.1
Switch to rubocop 0.89.1
Switch to rubocop 0.89.1
This is the rubocop in new Debian stable
Bring in line with the key from billing_monthly_cronjob
Merge branch 'low-balance-auto-top-up'
* low-balance-auto-top-up:
Some people have exactly 5 who don't need to be told
On low balance, top-up or notify
ExpiringLock helper