~singpolyma/sgx-jmp

ref: a0bb2b95a26784aa54bf9cfbbf5a80f2fcc3ff12 sgx-jmp/test/test_customer.rb -rw-r--r-- 2.9 KiB
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.
Merge branch 'new-signup-add-credit-card'

* new-signup-add-credit-card:
  Happy path for credit card signup
  Panic should work on any value for error
  Allow getting default payment method, not just index
  Object representing the backend SGX to use
  Stop polluting Object namespace with Blather DSL
  Work in the presence of em-synchrony
  Helper to allow ordering phone number from Bandwidth v2
  Helper to get a promise that resolves after N seconds
  Every payment kind will need the plan, so put it at the top
  Use registration pattern for Payment kinds
  Method to bill the plan of a Customer
  Use Forwardable for simple delegations
  Helper to allow using sync-style code in a Promise context
  New signup: go to web to choose credit card
  OOB helper
  Reject promise on stanza error
  Fix typo
Method to bill the plan of a Customer

Bills their balance for the cost of one month of plan.
Activates the plan by insert into plan_log, unless already active in which case
extends current plan by one month.
Split logic out into testable objects

Rubocop clean. Good test coverage of helper objects.