WIP refactor: remove code duplication in billing controller#3281
Open
nelsonmestevao wants to merge 1 commit intoLogflare:mainfrom
Open
WIP refactor: remove code duplication in billing controller#3281nelsonmestevao wants to merge 1 commit intoLogflare:mainfrom
nelsonmestevao wants to merge 1 commit intoLogflare:mainfrom
Conversation
nelsonmestevao
commented
Mar 12, 2026
| %{"plan" => plan_id, "type" => "metered"} | ||
| ) do | ||
| %{"plan" => plan_id, "type" => type} | ||
| ) when billing_plan_type in ["standard", "metered"] and type in ["standard", "metered"] do |
Contributor
Author
There was a problem hiding this comment.
This is just 4 combinations of "standard" and "metered" billing types.
nelsonmestevao
commented
Mar 12, 2026
623cf8c to
8738499
Compare
Ziinc
reviewed
Mar 16, 2026
| end | ||
| end | ||
|
|
||
| def change_subscription( |
Contributor
There was a problem hiding this comment.
Do we have test coverage for this consolidation?
8738499 to
9550eea
Compare
Ziinc
requested changes
Mar 19, 2026
Contributor
Ziinc
left a comment
There was a problem hiding this comment.
billing controller needs tests before we can do this.
Contributor
Author
|
Hi @Ziinc. I will add those. I didn't before because there's some mocking of stripe calls involved. |
8e740a4 to
b7ea70e
Compare
b7ea70e to
1ed95de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.