Passthrough proto - #804
Draft
guyjackson-ch wants to merge 6 commits into
Draft
Conversation
…Dissolution check after pending
JAndrewCH
reviewed
Aug 20, 2026
| * payment status is reconciled before being returned. | ||
| */ | ||
| public Optional<DissolutionGetResponse> resolveDissolutionApplication(String userId, String companyNumber) { | ||
| var dissolutionDto = getByCompanyNumber(companyNumber) |
Contributor
There was a problem hiding this comment.
Can we rename getByCompanyNumber to something more descriptive like getActiveDissolution?
Would make it a lot easier to see the order of precedence for retrieving applications here
This file contains hidden or 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
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.
Description
This pull request introduces several important changes related to how dissolutions and their statuses are managed and retrieved, as well as improvements to API client handling and transaction management. The main highlights are the introduction of a status history for dissolutions, a new approach for retrieving authenticated API clients, and refactoring of transaction and dissolution logic for better clarity and maintainability.
Dissolution Status Tracking Enhancements:
statusHistoryfield and asubmittedAttimestamp to theDissolutionmodel, along with a newDissolutionStatusChangedclass to track changes in dissolution status over time. The status-changing logic now records each change with a timestamp. ([[1]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-ba2199bab74d25d8838ad8d686816bafba020f28796c770499cb1559f9c8849bR42-R47),[[2]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-ba2199bab74d25d8838ad8d686816bafba020f28796c770499cb1559f9c8849bL126-R144),[[3]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-280229d9fd7871aaf18e84e402c0775a4bf7d3d588f947b6373829f3aea73dccR1-R30))SUBMITTEDstatus in theDissolutionStatusenum, replacing the previousPROCESSEDstatus for improved clarity. ([src/main/java/uk/gov/companieshouse/model/enums/DissolutionStatus.javaL8-R8](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-a3278734a02bcd2371748463e5528cc7130d6214cd291a08ccab71a72326a0fcL8-R8))API Client and Transaction Handling Refactor:
ApiClientProviderinterface and a defaultRequestPassThroughApiClientProviderimplementation to encapsulate the logic for retrieving an authenticatedApiClientusing the Eric pass-through token from the current request. This abstracts away token handling from the rest of the codebase. ([[1]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-5f216fdcf88b274bc67632d05b98eac632deb91d030bceb30c5960f644952f77R1-R14),[[2]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-4b501443e6e2e1bbd4cd3da8f8566a85cf1b824f909d81146af4e09130e9a448R1-R38))TransactionServiceto useApiClientProviderinstead of directly depending onApiClientServiceand to remove the need to manually pass the pass-through token. Also added ahasVerdictBeenReachedmethod to check if a dissolution filing has been accepted or rejected. ([[1]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-f8016a283346e055d32f0a7272d85612f7b502d355ac118767e89fae9f27b659L9-R29),[[2]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-f8016a283346e055d32f0a7272d85612f7b502d355ac118767e89fae9f27b659L44-R59))Controller and Service Refactoring:
DissolutionControllerby removing direct dependencies onPaymentServiceandLogger, delegating more responsibility toDissolutionService. The logic for resolving and updating dissolution application status based on payment has been moved into the service layer. ([[1]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-dc9a10e974121b8b94870870d2e05b49bc8776c995d15f18d174bf7d1abe0751L22-L36),[[2]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-dc9a10e974121b8b94870870d2e05b49bc8776c995d15f18d174bf7d1abe0751L53-L68),[[3]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-dc9a10e974121b8b94870870d2e05b49bc8776c995d15f18d174bf7d1abe0751L113-L135))DissolutionServiceto include new dependencies (PaymentService,TransactionService,DissolutionResponseMapper,Logger) and to support the new status tracking and retrieval logic. ([[1]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-ce9b9ec557a5bff07749ff3461bfe567a11d8a17420966125bff8a4cc47cb766R8-R10),[[2]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-ce9b9ec557a5bff07749ff3461bfe567a11d8a17420966125bff8a4cc47cb766R20-R24),[[3]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-ce9b9ec557a5bff07749ff3461bfe567a11d8a17420966125bff8a4cc47cb766R38-R53))Repository and Constants Updates:
[[1]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-337c61af2a3268ccea69a981a0a39cf25f6c157d3e04b7f26ac80b37ac070271R30-R31),[[2]](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-39e4bbb4250d01bc026f8a991ec29033b757770007eb886572345fb8dfc2b9a2R51))Supporting Enums and Utilities:
FilingStatusenum to avoid magic strings when dealing with transaction filing statuses. ([src/main/java/uk/gov/companieshouse/service/FilingStatus.javaR1-R28](https://github.com/companieshouse/dissolution-api/pull/804/files#diff-290b341e55c1ab566759726042d6360debaa1e193dd0b4796388c87ea7b6b2f5R1-R28))These changes collectively improve the maintainability, clarity, and extensibility of the dissolution and transaction handling codebase, particularly around tracking dissolution status changes and managing authenticated API client access.