Outbound call logic for overages If cannot find an acceptable rate for the number, cannot call. If balance is too low, cannot call. If too close to limit, warn. Else, call.
Represent plan limit details as a useful object
Remove BigDecimal.new It turns out in newer versions of Ruby this isn't cool anymore. The new way is BigDecimal(value), which is dumb, but whatever...
monthly_price is in 10000ths of a dollar, not 1000ths
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.
Merge branch 'register-command-first-pass' * register-command-first-pass: Add sourcehut CI Add Rakefile to run all tests Initial registration flow for Bitcoin Registrations that start on the web will have a tel selected already Helpers for doing Electrum RPC Add helper to fetch current BTC sell prices Allow skipping tests without being caught in pry
Initial registration flow for Bitcoin This is the Bitcoin "happy path" where there is already a tel and a customer_id. Gets all the way to generating a BTC address for payment and quoting an amount. Stubs out flows for credit card and activation code as well, but does not implement those flows. TBD: after bitcoin payment comes in and jmp-pay activates the account, we should come back here to actually buy the number, select a new one if no longer available, etc.
Split logic out into testable objects Rubocop clean. Good test coverage of helper objects.