Commit log

97df926 Merge branch 'cancel-account'

Click to expand commit body
* cancel-account:
  Admin command to cancel customer
  Move Customer factory/extractor to Customer

Stephen Paul Weber created

051be0a Admin command to cancel customer

Click to expand commit body
Notify customer
Deregister from SGX
Deregister from Cheogram
Disconnect from Bandwidth
	If on special list, move intead of disconnect

Stephen Paul Weber created

4e51ed4 Move Customer factory/extractor to Customer

Click to expand commit body
The repo's job is to get the data, constructing the object can be a factory's job.

Stephen Paul Weber created

9440485 Merge branch 'more-admin-info'

Click to expand commit body
* 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

Stephen Paul Weber created

84c77d8 Test Admin Info with Numbers

Click to expand commit body
My current two AdminInfo tests have unregistered customers because it's
easier, but it means that some parts of the logic don't get tested.

This one digs a bit deeper to test this part of the forms, but it
requires injecting a repo

Christopher Vollick created

ebd6fcc Refetch Customer on Repeated Customer Info Calls

Click to expand commit body
This means if I fetch a user, make a change (add a transaction, set
their trust level, etc), I can re-run info from the menu to get the same
user with up-to-date info, so you can see the thing I just did reflected
back to me.

Christopher Vollick created

8041a50 Trust Level in Customer Info

Click to expand commit body
We have this thing, so we should probably be able to see it

Christopher Vollick created

dbf8df7 Show Callability State in Customer Info

Click to expand commit body
This shows relatively easily which class a given user finds themselves
in.

Whether they can't call because they have no balance, or if they have
lots of room, or if they're being asked.

Hopefully this will make it easier to tell at a glance if a calling
issue is due to a few things.

Christopher Vollick created

fd7951d PromiseHash

Click to expand commit body
Here in info I'm doing a lot of this pattern:

    EMPromise.all([one, two three]).then { |one, two, three|
    	new(one: one, two: two, three: three)
    }

Which felt really noisy for what is a pretty logical operation.
So now I can keep the keys and values together and do:

    PromiseHash.all(one: one, two: two, three:three).then(&method(:new))

It's smaller, but more importantly it's more meaningful to me.
It keeps the declaration of the meaning together with the sourcing of
the value.
And because it uses EMPromise.all in the guts it's not a problem if some
of the keys are not promises.
Easy-peasy!

Christopher Vollick created

5f30fd7 No Settled Transactions is 0, not Null

Click to expand commit body
Unexpectedly this doesn't return either no columns or a column with a
value of 0, but instead a column with no value...

Christopher Vollick created

c3f3220 Merge branch 'message-limits'

Click to expand commit body
* message-limits:
  Block outgoing messages when expired
  Contacting support is not billable
  Use TrustLevel to determine daily quota
  Refactor message limits, change to 500/day

Stephen Paul Weber created

5dfee34 Block outgoing messages when expired

Stephen Paul Weber created

0925ae7 Contacting support is not billable

Stephen Paul Weber created

94cef4e Use TrustLevel to determine daily quota

Stephen Paul Weber created

9daaf10 Refactor message limits, change to 500/day

Stephen Paul Weber created

4b5310c CallAttempt needs customer

Stephen Paul Weber created

15a0f77 JID Switch

Click to expand commit body
This allows a customer to change their JID, but it's a bit raw.
In practice I don't expect anyone to actually run this directly, instead
cheogram covers with with a friendlier and safer version.

This is just the business.

Christopher Vollick created

d4d9e6c Merge branch 'block-calls-when-expired'

Click to expand commit body
* block-calls-when-expired:
  Block voice calls when account is expired
  Refactor CallAttempt factory to use registration pattern

Stephen Paul Weber created

0db4192 Revert "Merge branch 'three_d_secure'"

Click to expand commit body
This reverts commit 36f441c031a5318385ec78d7d2e021a8e2fab186, reversing
changes made to 3b0ae3c9387d3be41b30bd6dd4552ff0a841d8ed.

Stephen Paul Weber created

36f441c Merge branch 'three_d_secure'

Click to expand commit body
* three_d_secure:
  Send 3DS id when making a transaction

Stephen Paul Weber created

b1c4110 Block voice calls when account is expired

Click to expand commit body
Allow for "transitional" (no plan) users for now, because we still have a bunch
of those.

Stephen Paul Weber created

982324b Refactor CallAttempt factory to use registration pattern

Stephen Paul Weber created

3b0ae3c Need repo too during bill plan command

Stephen Paul Weber created

45d76a6 Wrap the connection yielded from a transaction

Stephen Paul Weber created

d3a8cab Use trampoline instead of custom fiber

Stephen Paul Weber created

125227e Merge branch 'change-billing-lock'

Click to expand commit body
* change-billing-lock:
  ExpiringLock instead of require expired
  Atomic ExpiringLock

Stephen Paul Weber created

bb9f4f1 Send 3DS id when making a transaction

Stephen Paul Weber created

7a49aaf ExpiringLock instead of require expired

Click to expand commit body
We *want* to try billing a little before expiry, to prevent the account lapsing.
So use an ExpiringLock to prevent double-billing races.

Stephen Paul Weber created

adc801c Atomic ExpiringLock

Stephen Paul Weber created

c5447fe Merge branch 'only-bill-if-expired'

Click to expand commit body
* only-bill-if-expired:
  Only bill customer if they for sure have balance and are expired
  Allow an in-transaction condition for billing
  Change multiline chain style

Stephen Paul Weber created

0d1a200 Merge branch 'sip-concurrency'

Click to expand commit body
* sip-concurrency:
  Limit call concurrency for outbound SIP

Stephen Paul Weber created

b47b7d0 Merge branch 'fwd-cleanup'

Click to expand commit body
* fwd-cleanup:
  Try to classify URI before saving, even if timeout.zero?
  v1 is dead and everyone has been moved
  Allow finishing adming command

Stephen Paul Weber created

17d9b2f Only bill customer if they for sure have balance and are expired

Stephen Paul Weber created

6a7c0e9 Allow an in-transaction condition for billing

Stephen Paul Weber created

dc2c141 Change multiline chain style

Stephen Paul Weber created

85a7a4e Limit call concurrency for outbound SIP

Stephen Paul Weber created

acd8226 CustomerPlan.extract

Click to expand commit body
To allow building from a hash with extra keys. Makes the CustomerRepo more readable.

Stephen Paul Weber created

f571b5e Postgres#query_one

Click to expand commit body
Helper for queries that only return a single row.

Stephen Paul Weber created

da30c37 Allow finishing admin command

Stephen Paul Weber created

18258dd Try to classify URI before saving, even if timeout.zero?

Stephen Paul Weber created

016d8c4 v1 is dead and everyone has been moved

Stephen Paul Weber created

9827b8b Allow finishing adming command

Stephen Paul Weber created

c92ea39 Say what customer was affected

Stephen Paul Weber created

74b3ab7 NoCustomer is not registered

Stephen Paul Weber created

688e78b Merge branch 'max-call-length'

Click to expand commit body
* max-call-length:
  Calculate the maximum allowable call length

Stephen Paul Weber created

39e3b0f Merge branch 'credit-card-blacklist'

Click to expand commit body
* credit-card-blacklist:
  Credit card blacklist

Stephen Paul Weber created

72b4436 Credit card blacklist

Click to expand commit body
Any card on the list is just treated as though it is not present, preventing it
from being used.

Stephen Paul Weber created

e636c33 Calculate the maximum allowable call length

Click to expand commit body
Asterisk could use this to actually limit the call, for example.

Stephen Paul Weber created

c3bd04f Merge branch 'trustlevel-repo'

Click to expand commit body
* trustlevel-repo:
  TrustLevel{,Repo}

Stephen Paul Weber created

b16e8df TrustLevel{,Repo}

Click to expand commit body
To determine how much permission a customer account should have to take risky
actions.  Seperate from their plan, this is not how much they could do in
theory, but how much the system will allow in practise due to perceived risk.

Starts out with a simple model based on amount of settled payments, and being
used to decide what is an "expensive" route for outbound calls.

Stephen Paul Weber created