File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
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 ) { }
@@ -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}
You can’t perform that action at this time.
0 commit comments