To better calculate usage, it would be better to calculate when a plan started.
[x] add "previous_payment_date" and "cache_date" column to table, change index to also index by "cache_date". We'll usually retrieve the most recent cache dated one
[x] Add property to class
[x] Set property when a plan expires and we fetch a new one
[x] ALSO if license has no expiry date, consult plan data to set a credit expiry a month from then or a year from then
[x] NOTE: do we create a new db entry for the updated license? or do we just log it? I'm inclined to create a new entry
[x] add unit tests scaffolding
[x] Create simple api client which maps routes to responses
[x] In test class, inject mock api client
[x] Setup test to have expiring license
[x] Test that when we recheck the license, we update the last expiry date
To better calculate usage, it would be better to calculate when a plan started.