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

Start processing the billing batch from Initiate #147

Merged
merged 3 commits into from
Mar 6, 2023

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Mar 6, 2023

https://eaflood.atlassian.net/browse/WATER-3906
https://eaflood.atlassian.net/browse/WATER-3929

Our InitiateBillingBatchService handles creating the initial WRLS and Charging Module bill runs. It then returns information about both to the water-abstraction-service which makes the create bill run request.

Using the same design as the charging-module-api, our intent is to perform a small action like this, and then return the result in less than a second. As the processing of the billing batch will take more than a second, this must happen in the background and not be something a user is left waiting for.

But we still need to kick it off and as the InitiateBillingBatchService has all the data we need to do that this change updates the service to call a new ProcessBillingBatchService.

Note: ProcessBillingBatchService will just be a placeholder for now; it'll do something to prove the design works and we'll update it later.

https://eaflood.atlassian.net/browse/WATER-3906
https://eaflood.atlassian.net/browse/WATER-3929

To create the billing invoice, invoice licence, and transaction records during an SROC supplementary bill run we need to know the billing period we're generating the bill run for. This is determined in the `InitiateBillingBatchService` but not returned in its result. This change adds billing period to the result so we can it pass onto a new `ProcessBillingBatchService` (coming soon!)
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Mar 6, 2023
@Cruikshanks Cruikshanks self-assigned this Mar 6, 2023
This is what we have been working on in a spike and intend to be the service which manages the process of populating the bill run, the charging module's bill run, and handing the process back to the legacy code.

We're adding this first so we can then call it from our InitiateBillingBatchService.
Now we have our placeholder service, we can make the necessary changes to InitiateBillingBatchService.
@Cruikshanks Cruikshanks changed the title Add billing period in InitiateBillingBatch result Start processing the billing batch from Initiate Mar 6, 2023
@Cruikshanks Cruikshanks added enhancement New feature or request and removed housekeeping Refactoring, tidying up or other work which supports the project labels Mar 6, 2023
@Cruikshanks Cruikshanks marked this pull request as ready for review March 6, 2023 09:38
@Cruikshanks Cruikshanks merged commit 690f80b into main Mar 6, 2023
@Cruikshanks Cruikshanks deleted the include-billing-period-in-initiate-result branch March 6, 2023 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant