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

feat: Add customer_type to Customers #2544

Merged
merged 13 commits into from
Sep 9, 2024
Merged

Conversation

brunomiguelpinto
Copy link
Contributor

@brunomiguelpinto brunomiguelpinto commented Sep 6, 2024

Context

We currently only create Lago customers as companies, but there is a need to support both companies and individuals. This change is motivated by scenarios where customers may be a mix of B2B and B2C, and where external integrations require handling both Contacts and Companies.

To address this, we are introducing a new field, customer_type, to distinguish whether a customer is a company or an individual. Existing customers will remain unaffected with customer_type set to the default nil.

Description

This pr is the first step we added the lastname, the firstanem and the customer_type to the models

@brunomiguelpinto brunomiguelpinto changed the title feat: added the fields and the display_name feat: Add customer_type to Customers Sep 6, 2024
@brunomiguelpinto brunomiguelpinto marked this pull request as draft September 6, 2024 16:13
@brunomiguelpinto brunomiguelpinto added the Customer Customer management label Sep 6, 2024
@ivannovosad ivannovosad marked this pull request as ready for review September 9, 2024 11:16
@ivannovosad ivannovosad self-requested a review September 9, 2024 11:16
app/models/customer.rb Outdated Show resolved Hide resolved
app/models/customer.rb Outdated Show resolved Hide resolved
spec/models/customer_spec.rb Outdated Show resolved Hide resolved
spec/models/customer_spec.rb Outdated Show resolved Hide resolved
spec/models/customer_spec.rb Outdated Show resolved Hide resolved
spec/models/customer_spec.rb Outdated Show resolved Hide resolved
spec/models/customer_spec.rb Outdated Show resolved Hide resolved
spec/models/customer_spec.rb Outdated Show resolved Hide resolved
spec/models/customer_spec.rb Outdated Show resolved Hide resolved
spec/models/customer_spec.rb Outdated Show resolved Hide resolved
@brunomiguelpinto brunomiguelpinto merged commit 6159706 into main Sep 9, 2024
6 checks passed
@brunomiguelpinto brunomiguelpinto deleted the feat-add-customer-type branch September 9, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Customer management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants