Wallet magic
Summary: Show-case implementation of how to calculate until when a wallet's balance lasts.
Test Plan:
$ ./artisan user:wallets john@kolab.org 5337dced-7227-4cac-8c66-4b4720cca873 $ ./artisan wallet:expected expect charging wallet 5337dced-7227-4cac-8c66-4b4720cca873 for user john@kolab.org with 999 $ ./artisan wallet:until $(./artisan user:wallets john@kolab.org) 0 lasts until 2020-04-08 15:10:21 (a month costs 3541) $ ./artisan wallet:set-balance $(./artisan user:wallets john@kolab.org) $(( 999 + 3541 )) $ ./artisan wallet:until $(./artisan user:wallets john@kolab.org) 4540 lasts until 2020-05-08 15:10:21 (a month costs 3541) Reviewers: #hkccp_developers, machniak, vanmeeuwen Reviewed By: #hkccp_developers, vanmeeuwen Subscribers: machniak, #hkccp_developers Differential Revision: https://git.kolab.org/D1150