~singpolyma/sgx-jmp

ref: 9440485fcd93b619a22e729cf591264b6569dcd4 sgx-jmp/lib/customer.rb -rw-r--r-- 3.1 KiB
Merge branch 'more-admin-info'

* more-admin-info:
  Test Admin Info with Numbers
  Refetch Customer on Repeated Customer Info Calls
  Trust Level in Customer Info
  Show Callability State in Customer Info
  PromiseHash
  No Settled Transactions is 0, not Null
Trust Level in Customer Info

We have this thing, so we should probably be able to see it
Merge branch 'activate-with-balance'

* activate-with-balance:
  If customer already has enough balance, just bill them and finish
  New BillPay registration step
  Save plan to DB as soon as it is selected
  Move credit_to lookup into relevant class
Save plan to DB as soon as it is selected

Customer will appear as instantly expired (having been active for 1 second in
the immediate past).

This can replace the pending_plan key for BTC activations. It also serves as a
record for mail-in activation of what plan they had selected.

Once the account is really activated the tiny row is removed.
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
Bill plan command

Implements the full logic of the billing_monthly_cronjob for one customer by
reusing code that has been written more robustly in sgx-jmp for some time.  This
will allow the cronjob to just execute this command once a day for each expiring
customer to get all the correct billing behaviours.
Merge branch 'tx-list'

* tx-list:
  Admin Command Menu + Admin Financial View
  Transactions List
  Customer Financials
  Telephone Link
Customer Financials

I've pulled out information about payment methods and bitcoin into its
own thing. It's kind of a repository, except that it only exposes
fetchers and doesn't load anything generally.

There's also a few new methods here that aren't used yet, but will be
shortly.
Try auto top up / low balance notify when not enough balance for a call

There is an edge case where a customer might not have auto-topped up yet but
they don't have enough balance for this call, so try to charge their card first
before telling them the call is a no go.
Represent plan limit details as a useful object
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.
Move Bandwidth Tn remote operations to BandwidthTnRepo
Customer Info Forms and More Info

There's a bit extra info I wanted about users, so since I was doing this
anyway I figured I may as well port the existing forms to the new form
renderer.

Then, in order to fit within the guidelines I needed subforms, so
partials were added.
Show CNAM in customer info
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
Merge branch 'configure-calls-v2'

* configure-calls-v2:
  New configure calls command
  Move more persistence into the repo layer
  Easy DSL for adding XEP-0122 validation to fields
  CustomerFwd uses ValueSemantics, translates old XMPP-SIP URI
New configure calls command

Uses only v2 APIs and sets things up in the new way.
Move more persistence into the repo layer

BackendSGX shouldn't touch Redis, instead get one of the repos to save the data
we want saved wherever that repo saves it (in this case, those same Redis keys).
Next