-
Notifications
You must be signed in to change notification settings - Fork 0
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
Tidy supplementary billing code #197
Merged
Merged
Conversation
This file contains 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
We've been working quickly to get supplementary billing completed on time. This means we haven't always been able to spend as much time as we'd like on some of the finer details -- documentation, consistency of standards, naming conventions, etc. This PR is a first pass at spotting these things and amending them.
StuAA78
added
the
housekeeping
Refactoring, tidying up or other work which supports the project
label
Apr 24, 2023
We no longer require the `/check/supplementary` endpoint so we delete it along with its related controller, service and presenter.
The docs for `GenerateBillingInvoiceLicenceService` refer to us passing in and returning an array of billing invoice licence objects. This was true when the service was originally written but we now pass in and return a single billing invoice licence object. We therefore update the docs to reflect this
As with `GenerateBillingInvoiceLicenceService`, the docs for `GenerateBillingInvoiceService` referred to receiving and returning an array instead of a single instance of an object, so we update the docs to reflect this
We would normally put constants at the top of the file. We also rename it to make its meaning a little clearer
Since we only care about the number of results returned, we can use the `.select(1)` optimisation
We had a `TODO` to check if legacy code was correct in flagging minimum charge for a charge period starting April 1st. Since our new code is tested working, we are confident we can remove it.
A previous refactor meant we no longer needed `ProcessPreviousBillingTransactionsService`. We therefore delete it.
Jozzey
approved these changes
Apr 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cruikshanks
approved these changes
Apr 26, 2023
StuAA78
added a commit
that referenced
this pull request
May 9, 2023
We've been working quickly to get supplementary billing completed on time. This means we haven't always been able to spend as much time as we'd like on some of the finer details -- documentation, consistency of standards, naming conventions, etc. [Following our first pass](#197), this PR is a second pass at spotting these things and amending them. Note that while refactoring `ProcessBillingBatchService` we identified a couple of ways we can restructure the process. This will be handled in a separate PR; for now, we have simply refactored code into helper functions which more accurately describe the flow of the process.
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.
We've been working quickly to get supplementary billing completed on time. This means we haven't always been able to spend as much time as we'd like on some of the finer details -- documentation, consistency of standards, naming conventions, etc. This PR is a first pass at spotting these things and amending them.