File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { IHttpClient } from "../../http";
22import { Transaction , TransactionResource , TransactionList } from "./types" ;
33import Resource , { ApiErrorResponse , ApiResponse } from "../resource" ;
44import { addRequestIdHeader } from "../../util" ;
5+ import Mapping from "../../mapping/mapping" ;
56
67export 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+ }
You can’t perform that action at this time.
0 commit comments