src/main/java/com/squareup/connect/api/TransactionsApi.java
@Deprecated
  public ListRefundsResponse listRefunds(String locationId, String beginTime, String endTime, String sortOrder, String cursor) 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 = "/v2/locations/{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("", "begin_time", beginTime));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_order", sortOrder));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor));

    
    
    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<ListRefundsResponse> localVarReturnType = new GenericType<ListRefundsResponse>() {};
    CompleteResponse<ListRefundsResponse> completeResponse = (CompleteResponse<ListRefundsResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
/**
   * ListRefunds
   * Lists refunds for one of a business&#39;s locations.  Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders)  In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square&#39;s Point of Sale applications.  Refunds with a &#x60;status&#x60; of &#x60;PENDING&#x60; are not currently included in this endpoint&#39;s response.  Max results per [page](#paginatingresults): 50
   * @param locationId The ID of the location to list refunds for. (required)
   * @param beginTime The beginning of the requested reporting period, in RFC 3339 format.  See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.  Default value: The current time minus one year. (optional)
   * @param endTime The end of the requested reporting period, in RFC 3339 format.  See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.  Default value: The current time. (optional)
   * @param sortOrder The order in which results are listed in the response (&#x60;ASC&#x60; for oldest first, &#x60;DESC&#x60; for newest first).  Default value: &#x60;DESC&#x60; (optional)
   * @param cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.  See [Paginating results](#paginatingresults) for more information. (optional)
   * @return ListRefundsResponse
   * @throws ApiException if fails to make API call
   */
ListRefunds
Lists refunds for one of a business's locations.  Deprecated - recommend using [SearchOrders](#endpoint-orders-searchorders)  In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications.  Refunds with a `status` of `PENDING` are not currently included in this endpoint's response.  Max results per [page](#paginatingresults): 50
@param locationId The ID of the location to list refunds for. (required)
@param beginTime The beginning of the requested reporting period, in RFC 3339 format.  See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.  Default value: The current time minus one year. (optional)
@param endTime The end of the requested reporting period, in RFC 3339 format.  See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.  Default value: The current time. (optional)
@param sortOrder The order in which results are listed in the response (`ASC` for oldest first, `DESC` for newest first).  Default value: `DESC` (optional)
@param cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.  See [Paginating results](#paginatingresults) for more information. (optional)
@return ListRefundsResponse
@throws ApiException if fails to make API call
ListRefunds Lists refunds for one of a business ' s locations . Deprecated - recommend using [ SearchOrders ] ( #endpoint - orders - searchorders ) In addition to full or partial tender refunds processed through Square APIs refunds may result from itemized returns or exchanges through Square ' s Point of Sale applications . Refunds with a ` status ` of ` PENDING ` are not currently included in this endpoint ' s response . Max results per [ page ] ( #paginatingresults ) : 50 @param locationId The ID of the location to list refunds for . ( required ) @param beginTime The beginning of the requested reporting period in RFC 3339 format . See [ Date ranges ] ( #dateranges ) for details on date inclusivity / exclusivity . Default value : The current time minus one year . ( optional ) @param endTime The end of the requested reporting period in RFC 3339 format . See [ Date ranges ] ( #dateranges ) for details on date inclusivity / exclusivity . Default value : The current time . ( optional ) @param sortOrder The order in which results are listed in the response ( ` ASC ` for oldest first ` DESC ` for newest first ) . Default value : ` DESC ` ( optional ) @param cursor A pagination cursor returned by a previous call to this endpoint . Provide this to retrieve the next set of results for your original query . See [ Paginating results ] ( #paginatingresults ) for more information . ( optional ) @return ListRefundsResponse @throws ApiException if fails to make API call
@Deprecated
  public ListRefundsResponse listRefunds(String locationId, String beginTime, String endTime, String sortOrder, String cursor) throws ApiException {
    Object localVarPostBody = null;
    if (locationId == null) {
      throw new ApiException(400, "Missing the required parameter 'locationId' when calling listRefunds");
    }
    String localVarPath = "/v2/locations/{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("", "begin_time", beginTime));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_time", endTime));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_order", sortOrder));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor));
    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<ListRefundsResponse> localVarReturnType = new GenericType<ListRefundsResponse>() {};
    CompleteResponse<ListRefundsResponse> completeResponse = (CompleteResponse<ListRefundsResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
@ Deprecated public ListRefundsResponse listRefunds ( String locationId , String beginTime , String endTime , String sortOrder , String cursor ) throws ApiException { Object localVarPostBody = null ; if ( locationId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'locationId' when calling listRefunds" ) ; } String localVarPath = "/v2/locations/{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 ( "" , "begin_time" , beginTime ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "end_time" , endTime ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "sort_order" , sortOrder ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "cursor" , cursor ) ) ; 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 < ListRefundsResponse > localVarReturnType = new GenericType < ListRefundsResponse > ( ) { } ; CompleteResponse < ListRefundsResponse > completeResponse = ( CompleteResponse < ListRefundsResponse > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; return completeResponse . getData ( ) ; }
ListRefunds
 Lists refunds for one of a business&#39;s locations.
ListRefunds Lists refunds for one of a business&#39 ; s locations .
// verify the required parameter 'locationId' is set // create path and map variables // query params