Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(trial): Ignore subscription if there is no free trial set #1906

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

julienbourdeau
Copy link
Contributor

@julienbourdeau julienbourdeau commented Apr 22, 2024

Description

When a plan free trial has ended, we invoice the subscription, set subscription.trial_ended_at attribute and send the subscription.trial_ended webhook.

This fix will ensure we do this work only if the plan attached to the subscriptions has a free trial configured.

Note that in ruby, the subscription.trial_ended_datetime method already returns nil if there is no trial_period configured.

@julienbourdeau julienbourdeau self-assigned this Apr 22, 2024
@julienbourdeau julienbourdeau merged commit 750e091 into main Apr 22, 2024
6 checks passed
@julienbourdeau julienbourdeau deleted the fix/free-trial-ignore-no-trial branch April 22, 2024 15:27
drejc pushed a commit to fliqa-io/lago-api that referenced this pull request May 15, 2024
…o#1906)

## Description

When a plan free trial has ended, we invoice the subscription, set
`subscription.trial_ended_at` attribute and send the
`subscription.trial_ended` webhook.

This fix will ensure we do this work *only* if the plan attached to the
subscriptions has a free trial configured.

Note that in ruby, the `subscription.trial_ended_datetime` method
already returns nil if there is no trial_period configured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants