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

Feature request: utility methods for subscription status #246

Open
Fjan opened this issue Sep 13, 2024 · 0 comments
Open

Feature request: utility methods for subscription status #246

Fjan opened this issue Sep 13, 2024 · 0 comments

Comments

@Fjan
Copy link

Fjan commented Sep 13, 2024

Is would be nice to have a utility method like is_active? on the Subscription object. For example, to check if a subscription is active we now write:

payment_method.subscriptions.any? do |subscription|
    subscription.status == Braintree::Subscription::Status::Active
end

It would improve our code if that could be replaced by something like payment_method.subscriptions.any?(&:is_active?)

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

No branches or pull requests

1 participant