Skip to content

Commit

Permalink
Merge pull request #127 from companieshouse/lp-368-update-sdk-patch-c…
Browse files Browse the repository at this point in the history
…all-arguments

LP-368 Patch sdk function call - convert record data into lp model
  • Loading branch information
mattch1 authored Jan 8, 2025
2 parents 12f5ba4 + 1c08190 commit 8e4ad63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"license": "MIT",
"homepage": "https://github.com/companieshouse/limited-partnerships-web#readme",
"dependencies": {
"@companieshouse/api-sdk-node": "^2.0.219",
"@companieshouse/api-sdk-node": "^2.0.220",
"@companieshouse/ch-node-utils": "^1.3.13",
"@companieshouse/node-session-handler": "^5.0.1",
"@companieshouse/structured-logging-node": "^2.0.1",
Expand Down
13 changes: 5 additions & 8 deletions src/infrastructure/gateway/registration/RegistrationGateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,14 @@ class RegistrationGateway implements IRegistrationGateway {
registrationType: RegistrationPageType,
data: Record<string, any>
): Promise<void> {
const limitedPartnershipBuilder = new LimitedPartnershipGatewayBuilder();
limitedPartnershipBuilder.withData(registrationType, data);
const limitedPartnership = limitedPartnershipBuilder.build();

const apiCall = {
service: "limitedPartnershipsService",
method: "patchLimitedPartnership",
args: [
transactionId,
submissionId,
{
type: registrationType,
data,
},
],
args: [transactionId, submissionId, limitedPartnership.data],
};

const response = await makeApiCallWithRetry<
Expand Down

0 comments on commit 8e4ad63

Please sign in to comment.