Page MenuHomekolab.org

Establish a month of free trial
ClosedPublic

Authored by vanmeeuwen on Aug 20 2020, 12:16 PM.

Details

Reviewers
machniak
Group Reviewers
Restricted Project
Commits
rK368428f6d299: Establish a month of free trial
Summary
  • New registrations get all the bells and whistles
  • Do not bill entitlement's first month compared against the wallet's creation date
Test Plan

None

Diff Detail

Repository
rK kolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vanmeeuwen requested review of this revision.Aug 20 2020, 12:16 PM
vanmeeuwen created this revision.
machniak requested changes to this revision.Aug 20 2020, 12:38 PM
machniak added a subscriber: machniak.
  1. Tests
  2. It will not create transaction records when $charges=0. See debit().
  3. So, if you rise your quota on the day after signup, it will not be free. I.e. free are only the default entitlement. Maybe that's good and maybe it will need some faq entry?
This revision now requires changes to proceed.Aug 20 2020, 12:38 PM
  1. Tests
  2. It will not create transaction records when $charges=0. See debit().
  3. So, if you rise your quota on the day after signup, it will not be free. I.e. free are only the default entitlement. Maybe that's good and maybe it will need some faq entry?

You would first hit 83, but yeah, maybe it's better to yet again compare not isSameDay but diffInMonths() <= 1 or something.

vanmeeuwen updated this revision to Diff 4111.Tue, Sep 15, 5:11 PM
  • Move forward any entitlements if we find the wallet is in the first month
vanmeeuwen updated this revision to Diff 4117.Wed, Sep 16, 11:41 AM

Rebase on current master;

  • Move forward any entitlements if we find the wallet is in the first month
  • Apply the first free month trial period, here too
machniak added inline comments.Tue, Sep 22, 2:17 PM
src/app/Wallet.php
64

Maybe it should be $this->owner->created_at? In case this is a second wallet created later.

vanmeeuwen updated this revision to Diff 4297.Tue, Sep 22, 2:36 PM
  • Fix tests
vanmeeuwen updated this revision to Diff 4303.Tue, Sep 22, 2:43 PM
  • Also fix wallet tests
vanmeeuwen marked an inline comment as done.Tue, Sep 22, 3:15 PM
machniak accepted this revision.Wed, Sep 23, 11:53 AM
This revision is now accepted and ready to land.Wed, Sep 23, 11:53 AM
This revision was automatically updated to reflect the committed changes.