src/main/java/com/squareup/connect/api/MerchantsApi.java
public CompleteResponse<ListMerchantsResponse>listMerchantsWithHttpInfo(Integer cursor) throws ApiException {
    Object localVarPostBody = null;
    
    // create path and map variables
    String localVarPath = "/v2/merchants";

    // 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("", "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<ListMerchantsResponse> localVarReturnType = new GenericType<ListMerchantsResponse>() {};
    return (CompleteResponse<ListMerchantsResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
/**
   * ListMerchants
   * Returns &#x60;Merchant&#x60; information for a given access token.  If you don&#39;t know a &#x60;Merchant&#x60; ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the  merchant that granted you access.  If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
   * @param cursor The cursor generated by the previous response. (optional)
   * @return CompleteResponse<ListMerchantsResponse>
   * @throws ApiException if fails to make API call
   */
ListMerchants
Returns `Merchant` information for a given access token.  If you don't know a `Merchant` ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the  merchant that granted you access.  If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.
@param cursor The cursor generated by the previous response. (optional)
@return CompleteResponse
@throws ApiException if fails to make API call
ListMerchants Returns ` Merchant ` information for a given access token . If you don ' t know a ` Merchant ` ID you can use this endpoint to retrieve the merchant ID for an access token . You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access . If you know the merchant ID you can also use the [ RetrieveMerchant ] ( #endpoint - merchants - retrievemerchant ) endpoint to get the merchant information . @param cursor The cursor generated by the previous response . ( optional ) @return CompleteResponse @throws ApiException if fails to make API call
public CompleteResponse<ListMerchantsResponse>listMerchantsWithHttpInfo(Integer cursor) throws ApiException {
    Object localVarPostBody = null;
    String localVarPath = "/v2/merchants";
    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("", "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<ListMerchantsResponse> localVarReturnType = new GenericType<ListMerchantsResponse>() {};
    return (CompleteResponse<ListMerchantsResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
public CompleteResponse < ListMerchantsResponse > listMerchantsWithHttpInfo ( Integer cursor ) throws ApiException { Object localVarPostBody = null ; String localVarPath = "/v2/merchants" ; 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 ( "" , "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 < ListMerchantsResponse > localVarReturnType = new GenericType < ListMerchantsResponse > ( ) { } ; return ( CompleteResponse < ListMerchantsResponse > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; }
ListMerchants
 Returns &#x60;Merchant&#x60; information for a given access token.
ListMerchants Returns &#x60 ; Merchant&#x60 ; information for a given access token .
// create path and map variables // query params