src/main/java/com/squareup/connect/api/InventoryApi.java
public RetrieveInventoryCountResponse retrieveInventoryCount(String catalogObjectId, String locationIds, String cursor) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'catalogObjectId' is set
    if (catalogObjectId == null) {
      throw new ApiException(400, "Missing the required parameter 'catalogObjectId' when calling retrieveInventoryCount");
    }
    
    // create path and map variables
    String localVarPath = "/v2/inventory/{catalog_object_id}"
      .replaceAll("\\{" + "catalog_object_id" + "\\}", apiClient.escapeString(catalogObjectId.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("", "location_ids", locationIds));
    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<RetrieveInventoryCountResponse> localVarReturnType = new GenericType<RetrieveInventoryCountResponse>() {};
    CompleteResponse<RetrieveInventoryCountResponse> completeResponse = (CompleteResponse<RetrieveInventoryCountResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
/**
   * RetrieveInventoryCount
   * Retrieves the current calculated stock count for a given [CatalogObject](#type-catalogobject) at a given set of [Location](#type-location)s. Responses are paginated and unsorted. For more sophisticated queries, use a batch endpoint.
   * @param catalogObjectId ID of the &#x60;CatalogObject&#x60; to retrieve. (required)
   * @param locationIds The &#x60;Location&#x60; IDs to look up as a comma-separated list. An empty list queries all locations. (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 the [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination) guide for more information. (optional)
   * @return RetrieveInventoryCountResponse
   * @throws ApiException if fails to make API call
   */
RetrieveInventoryCount
Retrieves the current calculated stock count for a given [CatalogObject](#type-catalogobject) at a given set of [Location](#type-location)s. Responses are paginated and unsorted. For more sophisticated queries, use a batch endpoint.
@param catalogObjectId ID of the `CatalogObject` to retrieve. (required)
@param locationIds The `Location` IDs to look up as a comma-separated list. An empty list queries all locations. (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 the [Pagination] guide for more information. (optional)
@return RetrieveInventoryCountResponse
@throws ApiException if fails to make API call
RetrieveInventoryCount Retrieves the current calculated stock count for a given [ CatalogObject ] ( #type - catalogobject ) at a given set of [ Location ] ( #type - location ) s . Responses are paginated and unsorted . For more sophisticated queries use a batch endpoint . @param catalogObjectId ID of the ` CatalogObject ` to retrieve . ( required ) @param locationIds The ` Location ` IDs to look up as a comma - separated list . An empty list queries all locations . ( 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 the [ Pagination ] guide for more information . ( optional ) @return RetrieveInventoryCountResponse @throws ApiException if fails to make API call
public RetrieveInventoryCountResponse retrieveInventoryCount(String catalogObjectId, String locationIds, String cursor) throws ApiException {
    Object localVarPostBody = null;
    if (catalogObjectId == null) {
      throw new ApiException(400, "Missing the required parameter 'catalogObjectId' when calling retrieveInventoryCount");
    }
    String localVarPath = "/v2/inventory/{catalog_object_id}"
      .replaceAll("\\{" + "catalog_object_id" + "\\}", apiClient.escapeString(catalogObjectId.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("", "location_ids", locationIds));
    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<RetrieveInventoryCountResponse> localVarReturnType = new GenericType<RetrieveInventoryCountResponse>() {};
    CompleteResponse<RetrieveInventoryCountResponse> completeResponse = (CompleteResponse<RetrieveInventoryCountResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
public RetrieveInventoryCountResponse retrieveInventoryCount ( String catalogObjectId , String locationIds , String cursor ) throws ApiException { Object localVarPostBody = null ; if ( catalogObjectId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'catalogObjectId' when calling retrieveInventoryCount" ) ; } String localVarPath = "/v2/inventory/{catalog_object_id}" . replaceAll ( "\\{" + "catalog_object_id" + "\\}" , apiClient . escapeString ( catalogObjectId . 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 ( "" , "location_ids" , locationIds ) ) ; 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 < RetrieveInventoryCountResponse > localVarReturnType = new GenericType < RetrieveInventoryCountResponse > ( ) { } ; CompleteResponse < RetrieveInventoryCountResponse > completeResponse = ( CompleteResponse < RetrieveInventoryCountResponse > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; return completeResponse . getData ( ) ; }
RetrieveInventoryCount
 Retrieves the current calculated stock count for a given [CatalogObject](#type-catalogobject) at a given set of [Location](#type-location)s. Responses are paginated and unsorted.
RetrieveInventoryCount Retrieves the current calculated stock count for a given [ CatalogObject ] ( #type - catalogobject ) at a given set of [ Location ] ( #type - location ) s . Responses are paginated and unsorted .
// verify the required parameter 'catalogObjectId' is set // create path and map variables // query params