Skip to content

Commit 386710c

Browse files
authored
Merge pull request #791 from companieshouse/IDVA52197
IDVA5-2197 Register an ACSP - Allow Previously Closed/ Ceased ACSPs to Access Registration Service -using the camelCaseKeys method
2 parents 3ee7d9e + 4d2f6a9 commit 386710c

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/services/transaction/service.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { IHttpClient } from "../../http";
22
import { Transaction, TransactionResource, TransactionList } from "./types";
33
import Resource, { ApiErrorResponse, ApiResponse } from "../resource";
44
import { addRequestIdHeader } from "../../util";
5+
import Mapping from "../../mapping/mapping";
56

67
export default class TransactionService {
78
constructor (private readonly client: IHttpClient) { }
@@ -195,19 +196,7 @@ export default class TransactionService {
195196
httpStatusCode: resp.status
196197
};
197198

198-
resource.resource = {
199-
items: resp.body.items ? resp.body.items.map((i) => ({
200-
id: i.id,
201-
updatedAt: i.updated_at,
202-
status: i.status,
203-
filings: {
204-
status: i.filings.status,
205-
companyNumber: i.filings.company_number,
206-
type: i.filings.type
207-
},
208-
resumeJourneyUri: i.resume_journey_uri
209-
})) : []
210-
};
199+
resource.resource = Mapping.camelCaseKeys<TransactionList>(resp.body);
211200
return resource;
212201
}
213202
}

0 commit comments

Comments
 (0)