~singpolyma/sgx-jmp

ref: a9ebca9a66da1fa0e10bee066a6ba71fe31177a3 sgx-jmp/test d---------
Usage command

Customer has a CustomerUsage which can fetch data to build a UsageReport
which returns a jabber:x:data form "table" as per spec for per-day in
the last month.

Minutes come from cdr table in postgresql.
Messages come from redis.
Add missing require

To allow these modules to be used in isolation (especially when
testing).
Refactor BuyAccountCreditForm

add_to_form no longer needs a promise or a network call, instead we use
a factory to get that data up front and inject the dependency.

New BuyAccountCreditForm#parse to get the relevant data back out of an
XMPP form.

Some changes to Transaction and sgx_jmp.rb to use the new method
semantics.
Merge branch 'wording'

* wording:
  Update instructions to be closer to what is in current web signup
Update instructions to be closer to what is in current web signup
Merge branch 'pass-messages'

* pass-messages:
  Pass messages to and from the SGX
Pass messages to and from the SGX

Rewriting the from/to as appropriate.
Merge branch 'create_customer_id'

* create_customer_id:
  Create customer_id if it does not exist before we start registration
  Break out CustomerPlan
  Inject BackendSgx per customer
Create customer_id if it does not exist before we start registration
Break out CustomerPlan

We had Plan and Customer but the relationship between the two lived
entirely in Customer, which was growing quite large. Break that
relationship out into its own concept and give it a name.
Inject BackendSgx per customer

Instead of being a singleton that represents the entire relationship
with the backend, the object is now per-customer (since any meaningful
method requires a customer anyway for the from JID at least) and can be
delegated to directly from Customer.
Merge branch 'invites'

* invites:
  Block repeated invite code tries by customer id
  Allow user to activate using invite code
Block repeated invite code tries by customer id

So it's not as trivial to brute-force the space and find an open one. Limit is
10 tries per hour.
Allow user to activate using invite code

Checks if the code is available and marks it used, then activates. Tracks who
invited and who used in the table for later reward or punishment.
Merge branch 'set-forwarding-on-finish'

* set-forwarding-on-finish:
  Configure number for inbound calls
Fixed code to expect 201 but forgot to update tests
Merge branch 'import-to-catapult'

* import-to-catapult:
  Import newly-purchased numbers to Catapult
Merge branch 'show-ratecenter-during-signup'

* show-ratecenter-during-signup:
  Show rate center during signup
Merge branch 'activated-users-to-finish'

* activated-users-to-finish:
  Test that registered users get the Registered step
  Already activated user goes straight to finish
Next