src/main/java/com/squareup/connect/api/V1TransactionsApi.java
public CompleteResponse<List<V1Refund>>listRefundsWithHttpInfo(String locationId, String order, String beginTime, String endTime, Integer limit, String batchToken) 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 listRefunds");
    }
    
    // create path and map variables
    String localVarPath = "/v1/{location_id}/refunds"
      .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.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");
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "batch_token", batchToken));

    
    
    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<List<V1Refund>> localVarReturnType = new GenericType<List<V1Refund>>() {};
    return (CompleteResponse<List<V1Refund>>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
/**
   * ListRefunds
   * Provides the details for all refunds initiated by a merchant or any of the merchant&#39;s mobile staff during a date range. Date ranges cannot exceed one year in length.
   * @param locationId The ID of the location to list refunds for. (required)
   * @param order TThe order in which payments are listed in the response. (optional)
   * @param beginTime The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. (optional)
   * @param endTime The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional)
   * @param limit The approximate number of refunds to return in a single response. Default: 100. Max: 200. Response may contain more results than the prescribed limit when refunds are made simultaneously to multiple tenders in a payment or when refunds are generated in an exchange to account for the value of returned goods. (optional)
   * @param batchToken A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)
   * @return CompleteResponse<List<V1Refund>>
   * @throws ApiException if fails to make API call
   */
ListRefunds
Provides the details for all refunds initiated by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length.
@param locationId The ID of the location to list refunds for. (required)
@param order TThe order in which payments are listed in the response. (optional)
@param beginTime The beginning of the requested reporting period, in ISO 8601 format. If this value is before January 1, 2013 (2013-01-01T00:00:00Z), this endpoint returns an error. Default value: The current time minus one year. (optional)
@param endTime The end of the requested reporting period, in ISO 8601 format. If this value is more than one year greater than begin_time, this endpoint returns an error. Default value: The current time. (optional)
@param limit The approximate number of refunds to return in a single response.
ListRefunds Provides the details for all refunds initiated by a merchant or any of the merchant ' s mobile staff during a date range . Date ranges cannot exceed one year in length . @param locationId The ID of the location to list refunds for . ( required ) @param order TThe order in which payments are listed in the response . ( optional ) @param beginTime The beginning of the requested reporting period in ISO 8601 format . If this value is before January 1 2013 ( 2013 - 01 - 01T00 : 00 : 00Z ) this endpoint returns an error . Default value : The current time minus one year . ( optional ) @param endTime The end of the requested reporting period in ISO 8601 format . If this value is more than one year greater than begin_time this endpoint returns an error . Default value : The current time . ( optional ) @param limit The approximate number of refunds to return in a single response .
public CompleteResponse<List<V1Refund>>listRefundsWithHttpInfo(String locationId, String order, String beginTime, String endTime, Integer limit, String batchToken) throws ApiException {
    Object localVarPostBody = null;
    if (locationId == null) {
      throw new ApiException(400, "Missing the required parameter 'locationId' when calling listRefunds");
    }
    String localVarPath = "/v1/{location_id}/refunds"
      .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.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");
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "order", order));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "begin_time", beginTime));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "batch_token", batchToken));
    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<List<V1Refund>> localVarReturnType = new GenericType<List<V1Refund>>() {};
    return (CompleteResponse<List<V1Refund>>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
public CompleteResponse < List < V1Refund > > listRefundsWithHttpInfo ( String locationId , String order , String beginTime , String endTime , Integer limit , String batchToken ) throws ApiException { Object localVarPostBody = null ; if ( locationId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'locationId' when calling listRefunds" ) ; } String localVarPath = "/v1/{location_id}/refunds" . replaceAll ( "\\{" + "location_id" + "\\}" , apiClient . escapeString ( locationId . 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" ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "order" , order ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "begin_time" , beginTime ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "end_time" , endTime ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "limit" , limit ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "batch_token" , batchToken ) ) ; 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 < List < V1Refund > > localVarReturnType = new GenericType < List < V1Refund > > ( ) { } ; return ( CompleteResponse < List < V1Refund > > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; }
ListRefunds
 Provides the details for all refunds initiated by a merchant or any of the merchant&#39;s mobile staff during a date range.
ListRefunds Provides the details for all refunds initiated by a merchant or any of the merchant&#39 ; s mobile staff during a date range .
// verify the required parameter 'locationId' is set // create path and map variables // query params