Skip to content

Commit fd8635b

Browse files
committed
IDVA5-2197 Register an ACSP - Allow Previously Closed/ Ceased ACSPs to Access Registration Service -using the camelCaseKeys method
1 parent 6c7f07c commit fd8635b

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/services/transaction/service.ts

Lines changed: 3 additions & 14 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) { }
@@ -194,19 +195,7 @@ export default class TransactionService {
194195
httpStatusCode: resp.status
195196
};
196197

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

0 commit comments

Comments
 (0)