src/main/java/com/squareup/connect/api/V1ItemsApi.java
@Deprecated
  public List<V1InventoryEntry> listInventory(String locationId, 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 listInventory");
    }
    
    // create path and map variables
    String localVarPath = "/v1/{location_id}/inventory"
      .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("", "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<V1InventoryEntry>> localVarReturnType = new GenericType<List<V1InventoryEntry>>() {};
    CompleteResponse<List<V1InventoryEntry>> completeResponse = (CompleteResponse<List<V1InventoryEntry>>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
/**
   * ListInventory
   * Provides inventory information for all inventory-enabled item variations.  ---  - __Deprecation date__: 2019-11-20 - [__Retirement date__](/build-basics/api-lifecycle#deprecated): 2020-11-18 - [Migration guide](/migrate-from-v1/guides/v1-items)  ---
   * @param locationId The ID of the item&#39;s associated location. (required)
   * @param limit The maximum number of inventory entries to return in a single response. This value cannot exceed 1000. (optional)
   * @param batchToken A pagination cursor to retrieve the next set of results for your original query to the endpoint. (optional)
   * @return List&lt;V1InventoryEntry&gt;
   * @throws ApiException if fails to make API call
   */
ListInventory
Provides inventory information for all inventory-enabled item variations.
ListInventory Provides inventory information for all inventory - enabled item variations .
@Deprecated
  public List<V1InventoryEntry> listInventory(String locationId, Integer limit, String batchToken) throws ApiException {
    Object localVarPostBody = null;
    if (locationId == null) {
      throw new ApiException(400, "Missing the required parameter 'locationId' when calling listInventory");
    }
    String localVarPath = "/v1/{location_id}/inventory"
      .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("", "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<V1InventoryEntry>> localVarReturnType = new GenericType<List<V1InventoryEntry>>() {};
    CompleteResponse<List<V1InventoryEntry>> completeResponse = (CompleteResponse<List<V1InventoryEntry>>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
@ Deprecated public List < V1InventoryEntry > listInventory ( String locationId , Integer limit , String batchToken ) throws ApiException { Object localVarPostBody = null ; if ( locationId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'locationId' when calling listInventory" ) ; } String localVarPath = "/v1/{location_id}/inventory" . 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 ( "" , "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 < V1InventoryEntry > > localVarReturnType = new GenericType < List < V1InventoryEntry > > ( ) { } ; CompleteResponse < List < V1InventoryEntry > > completeResponse = ( CompleteResponse < List < V1InventoryEntry > > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; return completeResponse . getData ( ) ; }
ListInventory
 Provides inventory information for all inventory-enabled item variations.
ListInventory Provides inventory information for all inventory - enabled item variations .
// verify the required parameter 'locationId' is set // create path and map variables // query params