public Charge retrieve(String chargeId) throws BaseException {

		logger.debug("Enter ChargeService::retrieve");
		
		if (StringUtils.isBlank(chargeId)) {
			logger.error("IllegalArgumentException {}", chargeId);
			throw new IllegalArgumentException("chargeId cannot be empty or null");
		}

		// prepare API url
		String apiUrl = requestContext.getBaseUrl() + "charges/{id}".replaceAll("\\{format\\}", "json")
				.replaceAll("\\{" + "id" + "\\}", chargeId.toString());
		logger.info("apiUrl - " + apiUrl);

		// assign TypeReference for deserialization
		TypeReference<Charge> typeReference = new TypeReference<Charge>() {
		};

		// prepare service request
		Request request = new Request.RequestBuilder(MethodType.GET, apiUrl).typeReference(typeReference)
				.context(requestContext).build();

		// make API call
		Response response = sendRequest(request);

		// retrieve response
		Charge chargeResponse = (Charge) response.getResponseObject();

		// set additional attributes
		prepareResponse(request, response, chargeResponse);
		return chargeResponse;
	}
public Charge retrieve ( String chargeId ) throws BaseException { logger . debug ( "Enter ChargeService::retrieve" ) ; if ( StringUtils . isBlank ( chargeId ) ) { logger . error ( "IllegalArgumentException {}" , chargeId ) ; throw new IllegalArgumentException ( "chargeId cannot be empty or null" ) ; } String apiUrl = requestContext . getBaseUrl ( ) + "charges/{id}" . replaceAll ( "\\{format\\}" , "json" ) . replaceAll ( "\\{" + "id" + "\\}" , chargeId . toString ( ) ) ; logger . info ( "apiUrl - " + apiUrl ) ; TypeReference < Charge > typeReference = new TypeReference < Charge > ( ) { } ; Request request = new Request . RequestBuilder ( MethodType . GET , apiUrl ) . typeReference ( typeReference ) . context ( requestContext ) . build ( ) ; Response response = sendRequest ( request ) ; Charge chargeResponse = ( Charge ) response . getResponseObject ( ) ; prepareResponse ( request , response , chargeResponse ) ; return chargeResponse ; }
Method to retrieve Charge

@param chargeId
@return
@throws BaseException