de973bb
Prevent SIM jobs from overdrawing balances
Click to expand commit body
Process actions serially and reload their balance before each action so
accounts sharing a balance can't spend the same funds in parallel.
Keep processing after individual failures, correct the arithmetic so
refills fit within the monthly limit, and retry annual renewal using the
balance returned by an automatic top-up.
customers without tels are no longer considered unknown.
the only other sensible definition of an unknown customer would
be "doesn't have a customer id," but the customer info command
will never return data that didnt come from a CustomerRepo.
anyway, this causes failed registrations to retry
Monthly data limit choices are in whole dollars, but a 5GB refill can
cost a fractional dollar amount. Round the refill price up when deriving
the step so valid choices cover the full refill charge.
Amolith
created
a3579a3
Merge branch 'monthly-data-limit-ux' of https://git.secluded.site/sgx-jmp
Click to expand commit body
* 'monthly-data-limit-ux' of https://git.secluded.site/sgx-jmp:
Flatten SIM job pricing config
Flatten main SIM pricing config
Improve data limit UX
Replace the main app's SIM pricing maps with fixed CAD/USD records for
SIM, eSIM, per-GB refill, and annual prices.
Derive the displayed plan label from the per-GB and annual prices so the
one-time SIM prices and ongoing plan pricing are not duplicated in
config.
Show the default data limit instead of a blank value and include
range/options metadata so clients can render a stepped slider.
Check submitted values against the price of a 5GB top-up in the
customer's currency and cap them at a fixed multiplier.
3458632
Merge branch 'add-oauth' of https://git.secluded.site/sgx-jmp
Click to expand commit body
* 'add-oauth' of https://git.secluded.site/sgx-jmp:
Switch BW clients from Basic to Client creds
Update bandwidth gems/use for OAuth
Stephen Paul Weber
created
e89c3df
Switch BW clients from Basic to Client creds
Click to expand commit body
Basic credentials are only usable for id.bandwidth.com, both gems prefer
api.bandwidth.com, and only iris seems to fall back to id. This adds the new
client cred fields to the config and uses them throughout.