Skip to content

Fetch company number from waste-organisations API on declaration detail#41

Open
NickBuckland wants to merge 8 commits into
mainfrom
AMCR-252-fetch-company-number-from-org-api
Open

Fetch company number from waste-organisations API on declaration detail#41
NickBuckland wants to merge 8 commits into
mainfrom
AMCR-252-fetch-company-number-from-org-api

Conversation

@NickBuckland

@NickBuckland NickBuckland commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

AMCR-252

Summary

  1. Fetch company number on submitted declaration detail (pending, accepted, cancelled) from the Waste Organisations API via \GET /organisations/{id}, matching the existing not-submitted path instead of reading \organisation.companiesHouseNumber\ on the obligations declaration embed (that field is not in the obligations API contract).
  2. Extract shared \mapCompaniesHouseNumberFromWasteOrganisation\ and refactor waste-organisation detail field mapping into focused helpers (
    esolveWasteOrganisationRegistrationType, \mapRegistrationTypeToOrganisationType).
  3. Add mock waste-organisation data for the \mockDetailData\ org UUID and unit tests covering the parallel \getOrganisation\ call and company number mapping for submitted declarations.

@NickBuckland
NickBuckland force-pushed the AMCR-252-fetch-company-number-from-org-api branch 2 times, most recently from 9fab917 to f3765c6 Compare July 16, 2026 13:33
dashkatuk
dashkatuk previously approved these changes Jul 16, 2026
@NickBuckland
NickBuckland force-pushed the AMCR-252-fetch-company-number-from-org-api branch from 279bb6e to 41a3c1a Compare July 17, 2026 10:06
…th reusable constants and consolidate test cases for obligation handling
@sonarqubecloud

Copy link
Copy Markdown

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