Skip to content

WIP refactor: remove code duplication in billing controller#3281

Open
nelsonmestevao wants to merge 1 commit intoLogflare:mainfrom
nelsonmestevao:ne/billing-controller
Open

WIP refactor: remove code duplication in billing controller#3281
nelsonmestevao wants to merge 1 commit intoLogflare:mainfrom
nelsonmestevao:ne/billing-controller

Conversation

@nelsonmestevao
Copy link
Copy Markdown
Contributor

No description provided.

%{"plan" => plan_id, "type" => "metered"}
) do
%{"plan" => plan_id, "type" => type}
) when billing_plan_type in ["standard", "metered"] and type in ["standard", "metered"] do
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just 4 combinations of "standard" and "metered" billing types.

@nelsonmestevao nelsonmestevao force-pushed the ne/billing-controller branch 3 times, most recently from 623cf8c to 8738499 Compare March 13, 2026 16:59
end
end

def change_subscription(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have test coverage for this consolidation?

@nelsonmestevao nelsonmestevao force-pushed the ne/billing-controller branch from 8738499 to 9550eea Compare March 16, 2026 07:11
Copy link
Copy Markdown
Contributor

@Ziinc Ziinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

billing controller needs tests before we can do this.

@nelsonmestevao
Copy link
Copy Markdown
Contributor Author

Hi @Ziinc. I will add those. I didn't before because there's some mocking of stripe calls involved.

@nelsonmestevao nelsonmestevao changed the title refactor: remove code duplication in billing controller WIP refactor: remove code duplication in billing controller Mar 19, 2026
@nelsonmestevao nelsonmestevao force-pushed the ne/billing-controller branch 5 times, most recently from 8e740a4 to b7ea70e Compare March 27, 2026 14:45
@nelsonmestevao nelsonmestevao force-pushed the ne/billing-controller branch from b7ea70e to 1ed95de Compare March 31, 2026 22:27
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.

2 participants