Move CustomerFwd behind Customer All the previously-lazy BackendSgx data is now either all loaded or all not loaded by swapping the sgx_repo used by your CustomerRepo instance. When not loaded the fields are filled with bottom values that explode when used. When loaded the values are present in RAM and not promises at all. Most code paths do not need any of the data, a few need most of it, so this seems like a good trade-off. Most code using this object will simply never touch those fields or care about how they are loaded, etc. Of course, most of this data isn't even SGX related and should move out of here, but that would take a data model refactor/migration on the catapult_* schema.
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
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 '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
Object representing the backend SGX to use This is what should know about things like the customer id -> jid mapping, etc.