src/main/java/com/squareup/connect/api/TransactionsApi.java
public CompleteResponse<RetrieveTransactionResponse>retrieveTransactionWithHttpInfo(String locationId, String transactionId) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'locationId' is set
    if (locationId == null) {
      throw new ApiException(400, "Missing the required parameter 'locationId' when calling retrieveTransaction");
    }
    
    // verify the required parameter 'transactionId' is set
    if (transactionId == null) {
      throw new ApiException(400, "Missing the required parameter 'transactionId' when calling retrieveTransaction");
    }
    
    // create path and map variables
    String localVarPath = "/v2/locations/{location_id}/transactions/{transaction_id}"
      .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString()))
      .replaceAll("\\{" + "transaction_id" + "\\}", apiClient.escapeString(transactionId.toString()));

    // query params
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    localVarHeaderParams.put("Square-Version", "2019-11-20");

    
    
    final String[] localVarAccepts = {
      "application/json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

    final String[] localVarContentTypes = {
      "application/json"
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] { "oauth2" };

    GenericType<RetrieveTransactionResponse> localVarReturnType = new GenericType<RetrieveTransactionResponse>() {};
    return (CompleteResponse<RetrieveTransactionResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
/**
   * RetrieveTransaction
   * Retrieves details for a single transaction.  Deprecated - recommend using [BatchRetrieveOrders](#endpoint-batchretrieveorders)
   * @param locationId The ID of the transaction&#39;s associated location. (required)
   * @param transactionId The ID of the transaction to retrieve. (required)
   * @return CompleteResponse<RetrieveTransactionResponse>
   * @throws ApiException if fails to make API call
   */
RetrieveTransaction
Retrieves details for a single transaction.  Deprecated - recommend using [BatchRetrieveOrders](#endpoint-batchretrieveorders)
@param locationId The ID of the transaction's associated location. (required)
@param transactionId The ID of the transaction to retrieve. (required)
@return CompleteResponse
@throws ApiException if fails to make API call
RetrieveTransaction Retrieves details for a single transaction . Deprecated - recommend using [ BatchRetrieveOrders ] ( #endpoint - batchretrieveorders ) @param locationId The ID of the transaction ' s associated location . ( required ) @param transactionId The ID of the transaction to retrieve . ( required ) @return CompleteResponse @throws ApiException if fails to make API call
public CompleteResponse<RetrieveTransactionResponse>retrieveTransactionWithHttpInfo(String locationId, String transactionId) throws ApiException {
    Object localVarPostBody = null;
    if (locationId == null) {
      throw new ApiException(400, "Missing the required parameter 'locationId' when calling retrieveTransaction");
    }
    if (transactionId == null) {
      throw new ApiException(400, "Missing the required parameter 'transactionId' when calling retrieveTransaction");
    }
    String localVarPath = "/v2/locations/{location_id}/transactions/{transaction_id}"
      .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString()))
      .replaceAll("\\{" + "transaction_id" + "\\}", apiClient.escapeString(transactionId.toString()));
    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    localVarHeaderParams.put("Square-Version", "2019-11-20");
    final String[] localVarAccepts = {
      "application/json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
    final String[] localVarContentTypes = {
      "application/json"
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
    String[] localVarAuthNames = new String[] { "oauth2" };
    GenericType<RetrieveTransactionResponse> localVarReturnType = new GenericType<RetrieveTransactionResponse>() {};
    return (CompleteResponse<RetrieveTransactionResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
public CompleteResponse < RetrieveTransactionResponse > retrieveTransactionWithHttpInfo ( String locationId , String transactionId ) throws ApiException { Object localVarPostBody = null ; if ( locationId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'locationId' when calling retrieveTransaction" ) ; } if ( transactionId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'transactionId' when calling retrieveTransaction" ) ; } String localVarPath = "/v2/locations/{location_id}/transactions/{transaction_id}" . replaceAll ( "\\{" + "location_id" + "\\}" , apiClient . escapeString ( locationId . toString ( ) ) ) . replaceAll ( "\\{" + "transaction_id" + "\\}" , apiClient . escapeString ( transactionId . toString ( ) ) ) ; List < Pair > localVarQueryParams = new ArrayList < Pair > ( ) ; Map < String , String > localVarHeaderParams = new HashMap < String , String > ( ) ; Map < String , Object > localVarFormParams = new HashMap < String , Object > ( ) ; localVarHeaderParams . put ( "Square-Version" , "2019-11-20" ) ; final String [ ] localVarAccepts = { "application/json" } ; final String localVarAccept = apiClient . selectHeaderAccept ( localVarAccepts ) ; final String [ ] localVarContentTypes = { "application/json" } ; final String localVarContentType = apiClient . selectHeaderContentType ( localVarContentTypes ) ; String [ ] localVarAuthNames = new String [ ] { "oauth2" } ; GenericType < RetrieveTransactionResponse > localVarReturnType = new GenericType < RetrieveTransactionResponse > ( ) { } ; return ( CompleteResponse < RetrieveTransactionResponse > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; }
RetrieveTransaction
 Retrieves details for a single transaction.
RetrieveTransaction Retrieves details for a single transaction .
// verify the required parameter 'locationId' is set // verify the required parameter 'transactionId' is set // create path and map variables // query params