generated from UK-Export-Finance/nestjs-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(APIM-609): companies house - extend returned fields (#1089)
## Introduction ✏️ In order for Companies House to be consumed by other products/services, the integration needs to return some additional fields. Note: unfortunately, some methods in the Companies House service do not have unit test coverage as they are private methods. I would like to add unit tests for all private methods (likely needing to make them public or extracted into helper functions), but this would be a bigger change than introducing additional fields. ## Resolution ✔️ - Update Companies House types. - Update `CompaniesService` to return the following additional data: - `accounts` object - `dateOfCreation` - `registeredAddress.careOf` - `registeredAddress.premises` - `registeredAddress.region` - Updated test generator shapes. # Todo ❗ * Ensure tests are DRY and centralised helpers for types, DTO and interfaces. --------- Co-authored-by: Abhi Markan <amarkan>
- Loading branch information
Showing
8 changed files
with
402 additions
and
223 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
75 changes: 45 additions & 30 deletions
75
src/modules/companies/examples/example-response-for-get-company-by-registration-number.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,59 @@ | ||
{ | ||
"accounts": { | ||
"accountingReferenceDate": { | ||
"day": "31", | ||
"month": "12" | ||
}, | ||
"lastAccounts": { | ||
"madeUpTo": "2024-12-31", | ||
"periodEndOn": "2024-12-31", | ||
"periodStartOn": "2024-01-01", | ||
"type": "2024-01-01" | ||
}, | ||
"nextAccounts": { | ||
"dueOn": "2026-09-30", | ||
"overdue": false, | ||
"periodEndOn": "2024-12-31", | ||
"periodStartOn": "2024-01-01" | ||
}, | ||
"nextDue": "2026-09-30", | ||
"nextMadeUpTo": "2024-12-31", | ||
"overdue": false | ||
}, | ||
"companiesHouseRegistrationNumber": "00000001", | ||
"companyName": "TEST COMPANY LTD", | ||
"dateOfCreation": "1989-09-20", | ||
"registeredAddress": { | ||
"addressLine1": "1 Test Street", | ||
"locality": "Test City", | ||
"postalCode": "A1 2BC", | ||
"country": "United Kingdom" | ||
"addressLine1": "1 Test", | ||
"addressLine2": "Test", | ||
"country": "England", | ||
"locality": "London", | ||
"postalCode": "A12 3AB" | ||
}, | ||
"industries": [ | ||
{ | ||
"class": { | ||
"code": "59112", | ||
"name": "Video production activities" | ||
}, | ||
"code": "1009", | ||
"name": "Information and communication" | ||
}, | ||
{ | ||
"class": { | ||
"code": "62012", | ||
"name": "Business and domestic software development" | ||
}, | ||
"code": "1009", | ||
"name": "Information and communication" | ||
"code": "1003", | ||
"name": "Manufacturing", | ||
"class": { | ||
"code": "26110", | ||
"name": "Manufacture of electronic components" | ||
} | ||
}, | ||
{ | ||
"class": { | ||
"code": "62020", | ||
"name": "Information technology consultancy activities" | ||
}, | ||
"code": "1009", | ||
"name": "Information and communication" | ||
"code": "1003", | ||
"name": "Manufacturing", | ||
"class": { | ||
"code": "27120", | ||
"name": "Manufacture of electricity distribution and control apparatus" | ||
} | ||
}, | ||
{ | ||
"class": { | ||
"code": "62090", | ||
"name": "Other information technology service activities" | ||
}, | ||
"code": "1009", | ||
"name": "Information and communication" | ||
"code": "1006", | ||
"name": "Wholesale and retail trade; repair of motor vehicles and motorcycles", | ||
"class": { | ||
"code": "46520", | ||
"name": "Wholesale of electronic and telecommunications equipment and parts" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.