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

misc: Refactor Customer::UpdateService #2645

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

vincent-pochet
Copy link
Collaborator

Context

This PR follows #2641 and keeps refactoring some old service to take advantage of the call pattern and to remove the user arguments used in BaseService#initialize.

Description

This PR:

  • Extract the Customers::UpdateService#update_currency method into a dedicated Customers::UpdateCurrencyService and adds specs
  • Turn the Customers::UpdateService#update method into a proper Customers::UpdateService#call one

@vincent-pochet vincent-pochet merged commit abaf8c9 into main Oct 1, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the misc_update_currency_service branch October 1, 2024 14:33
vincent-pochet added a commit that referenced this pull request Oct 3, 2024
## Context

This PR follows #2641 and
#2645 and keeps refactoring some
old service to take advantage of the `call` pattern and to remove the
`user` arguments used in `BaseService#initialize`.

## Description

This PR:
- Turn the `Plans::CreateService#create` method into a proper
`Plans::CreateService#call` one
- Remove the need for the `current_user` argument in
`Invites::CreateService` and move the arguments for the `call` method to
the `initializer`
- Refact `Invites::RevokeService` to take the `invite` as an argument
instead if the `id` and `current_organization` and move the argument for
the `call` method to the `initializer`
- Remove the `current_user` argument for the
`Invoices::CustomerUsageService`
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