src/main/java/com/squareup/connect/api/PaymentsApi.java
public CompleteResponse<ListPaymentsResponse>listPaymentsWithHttpInfo(String beginTime, String endTime, String sortOrder, String cursor, String locationId, Long total, String last4, String cardBrand) throws ApiException {
    Object localVarPostBody = null;
    
    // create path and map variables
    String localVarPath = "/v2/payments";

    // 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));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "location_id", locationId));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "total", total));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "last_4", last4));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "card_brand", cardBrand));

    
    
    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<ListPaymentsResponse> localVarReturnType = new GenericType<ListPaymentsResponse>() {};
    return (CompleteResponse<ListPaymentsResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
/**
   * ListPayments
   * Retrieves a list of payments taken by the account making the request.  Max results per page: 100
   * @param beginTime Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. (optional)
   * @param endTime Timestamp for the end of the requested reporting period, in RFC 3339 format.  Default: The current time. (optional)
   * @param sortOrder The order in which results are listed. - &#x60;ASC&#x60; - oldest to newest - &#x60;DESC&#x60; - newest to oldest (default). (optional)
   * @param cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query.  See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. (optional)
   * @param locationId ID of location associated with payment (optional)
   * @param total The exact amount in the total_money for a &#x60;Payment&#x60;. (optional)
   * @param last4 The last 4 digits of &#x60;Payment&#x60; card. (optional)
   * @param cardBrand The brand of &#x60;Payment&#x60; card. For example, &#x60;VISA&#x60; (optional)
   * @return CompleteResponse<ListPaymentsResponse>
   * @throws ApiException if fails to make API call
   */
ListPayments
Retrieves a list of payments taken by the account making the request.  Max results per page: 100
@param beginTime Timestamp for the beginning of the reporting period, in RFC 3339 format. Inclusive. Default: The current time minus one year. (optional)
@param endTime Timestamp for the end of the requested reporting period, in RFC 3339 format.  Default: The current time. (optional)
@param sortOrder The order in which results are listed. - `ASC` - oldest to newest - `DESC` - newest to oldest (default). (optional)
@param cursor A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query.  See [Pagination] for more information. (optional)
@param locationId ID of location associated with payment (optional)
@param total The exact amount in the total_money for a `Payment`. (optional)
@param last4 The last 4 digits of `Payment` card. (optional)
@param cardBrand The brand of `Payment` card. For example, `VISA` (optional)
@return CompleteResponse
@throws ApiException if fails to make API call
ListPayments Retrieves a list of payments taken by the account making the request . Max results per page : 100 @param beginTime Timestamp for the beginning of the reporting period in RFC 3339 format . Inclusive . Default : The current time minus one year . ( optional ) @param endTime Timestamp for the end of the requested reporting period in RFC 3339 format . Default : The current time . ( optional ) @param sortOrder The order in which results are listed . - ` ASC ` - oldest to newest - ` DESC ` - newest to oldest ( default ) . ( optional ) @param cursor A pagination cursor returned by a previous call to this endpoint . Provide this to retrieve the next set of results for the original query . See [ Pagination ] for more information . ( optional ) @param locationId ID of location associated with payment ( optional ) @param total The exact amount in the total_money for a ` Payment ` . ( optional ) @param last4 The last 4 digits of ` Payment ` card . ( optional ) @param cardBrand The brand of ` Payment ` card . For example ` VISA ` ( optional ) @return CompleteResponse @throws ApiException if fails to make API call
public CompleteResponse<ListPaymentsResponse>listPaymentsWithHttpInfo(String beginTime, String endTime, String sortOrder, String cursor, String locationId, Long total, String last4, String cardBrand) throws ApiException {
    Object localVarPostBody = null;
    String localVarPath = "/v2/payments";
    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));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "location_id", locationId));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "total", total));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "last_4", last4));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "card_brand", cardBrand));
    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<ListPaymentsResponse> localVarReturnType = new GenericType<ListPaymentsResponse>() {};
    return (CompleteResponse<ListPaymentsResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
public CompleteResponse < ListPaymentsResponse > listPaymentsWithHttpInfo ( String beginTime , String endTime , String sortOrder , String cursor , String locationId , Long total , String last4 , String cardBrand ) throws ApiException { Object localVarPostBody = null ; String localVarPath = "/v2/payments" ; 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 ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "location_id" , locationId ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "total" , total ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "last_4" , last4 ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "card_brand" , cardBrand ) ) ; 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 < ListPaymentsResponse > localVarReturnType = new GenericType < ListPaymentsResponse > ( ) { } ; return ( CompleteResponse < ListPaymentsResponse > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; }
ListPayments
 Retrieves a list of payments taken by the account making the request.
ListPayments Retrieves a list of payments taken by the account making the request .
// create path and map variables // query params