src/main/java/com/squareup/connect/api/V1TransactionsApi.java
public CompleteResponse<List<V1Payment>>listPaymentsWithHttpInfo(String locationId, String order, String beginTime, String endTime, Integer limit, String batchToken, Boolean includePartial) 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 listPayments");
    }
    
    // create path and map variables
    String localVarPath = "/v1/{location_id}/payments"
      .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));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_partial", includePartial));

    
    
    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<V1Payment>> localVarReturnType = new GenericType<List<V1Payment>>() {};
    return (CompleteResponse<List<V1Payment>>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
/**
   * ListPayments
   * Provides summary information for all payments taken for a given Square account during a date range. Date ranges cannot exceed 1 year in length. See Date ranges for details of inclusive and exclusive dates.  *Note**: Details for payments processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline payments have a &#x60;created_at&#x60; value that reflects the time the payment was originally processed, not the time it was subsequently transmitted to Square. Consequently, the ListPayments endpoint might list an offline payment chronologically between online payments that were seen in a previous request.
   * @param locationId The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business&#39;s locations. (required)
   * @param order The 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 maximum number of payments to return in a single response. This value cannot exceed 200. (optional)
   * @param batchToken A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)
   * @param includePartial Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional)
   * @return CompleteResponse<List<V1Payment>>
   * @throws ApiException if fails to make API call
   */
ListPayments
Provides summary information for all payments taken for a given Square account during a date range. Date ranges cannot exceed 1 year in length. See Date ranges for details of inclusive and exclusive dates.  *Note**: Details for payments processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline payments have a `created_at` value that reflects the time the payment was originally processed, not the time it was subsequently transmitted to Square. Consequently, the ListPayments endpoint might list an offline payment chronologically between online payments that were seen in a previous request.
@param locationId The ID of the location to list payments for. If you specify me, this endpoint returns payments aggregated from all of the business's locations. (required)
@param order The 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 maximum number of payments to return in a single response. This value cannot exceed 200. (optional)
@param batchToken A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)
@param includePartial Indicates whether or not to include partial payments in the response. Partial payments will have the tenders collected so far, but the itemizations will be empty until the payment is completed. (optional)
@return CompleteResponse>
@throws ApiException if fails to make API call
ListPayments Provides summary information for all payments taken for a given Square account during a date range . Date ranges cannot exceed 1 year in length . See Date ranges for details of inclusive and exclusive dates . * Note ** : Details for payments processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours . Offline payments have a ` created_at ` value that reflects the time the payment was originally processed not the time it was subsequently transmitted to Square . Consequently the ListPayments endpoint might list an offline payment chronologically between online payments that were seen in a previous request . @param locationId The ID of the location to list payments for . If you specify me this endpoint returns payments aggregated from all of the business ' s locations . ( required ) @param order The 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 maximum number of payments to return in a single response . This value cannot exceed 200 . ( optional ) @param batchToken A pagination cursor to retrieve the next set of results for your original query to the endpoint . ( optional ) @param includePartial Indicates whether or not to include partial payments in the response . Partial payments will have the tenders collected so far but the itemizations will be empty until the payment is completed . ( optional ) @return CompleteResponse > @throws ApiException if fails to make API call
public CompleteResponse<List<V1Payment>>listPaymentsWithHttpInfo(String locationId, String order, String beginTime, String endTime, Integer limit, String batchToken, Boolean includePartial) throws ApiException {
    Object localVarPostBody = null;
    if (locationId == null) {
      throw new ApiException(400, "Missing the required parameter 'locationId' when calling listPayments");
    }
    String localVarPath = "/v1/{location_id}/payments"
      .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));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_partial", includePartial));
    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<V1Payment>> localVarReturnType = new GenericType<List<V1Payment>>() {};
    return (CompleteResponse<List<V1Payment>>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
public CompleteResponse < List < V1Payment > > listPaymentsWithHttpInfo ( String locationId , String order , String beginTime , String endTime , Integer limit , String batchToken , Boolean includePartial ) throws ApiException { Object localVarPostBody = null ; if ( locationId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'locationId' when calling listPayments" ) ; } String localVarPath = "/v1/{location_id}/payments" . 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 ) ) ; localVarQueryParams . addAll ( apiClient . parameterToPairs ( "" , "include_partial" , includePartial ) ) ; 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 < V1Payment > > localVarReturnType = new GenericType < List < V1Payment > > ( ) { } ; return ( CompleteResponse < List < V1Payment > > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; }
ListPayments
 Provides summary information for all payments taken for a given Square account during a date range.
ListPayments Provides summary information for all payments taken for a given Square account during a date range .
// verify the required parameter 'locationId' is set // create path and map variables // query params