public ECheck create ( ECheck eCheck ) throws BaseException { logger . debug ( "Enter ECheckService::create" ) ; // prepare API url String apiUrl = requestContext . getBaseUrl ( ) + "echecks" . replaceAll ( "\\{format\\}" , "json" ) ; logger . info ( "apiUrl - " + apiUrl ) ; // assign TypeReference for deserialization TypeReference < ECheck > typeReference = new TypeReference < ECheck > ( ) { } ; // prepare service request Request request = new Request . RequestBuilder ( MethodType . POST , apiUrl ) . requestObject ( eCheck ) . typeReference ( typeReference ) . context ( requestContext ) . build ( ) ; // make API call Response response = sendRequest ( request ) ; // retrieve response ECheck eCheckResponse = ( ECheck ) response . getResponseObject ( ) ; // set additional attributes prepareResponse ( request , response , eCheckResponse ) ; return eCheckResponse ; }
Method to create ECheck