src/main/java/com/squareup/connect/api/InventoryApi.java
public CompleteResponse<BatchRetrieveInventoryCountsResponse>batchRetrieveInventoryCountsWithHttpInfo(BatchRetrieveInventoryCountsRequest body) throws ApiException {
    Object localVarPostBody = body;
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling batchRetrieveInventoryCounts");
    }
    
    // create path and map variables
    String localVarPath = "/v2/inventory/batch-retrieve-counts";

    // 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");

    
    
    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<BatchRetrieveInventoryCountsResponse> localVarReturnType = new GenericType<BatchRetrieveInventoryCountsResponse>() {};
    return (CompleteResponse<BatchRetrieveInventoryCountsResponse>)apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
/**
   * BatchRetrieveInventoryCounts
   * Returns current counts for the provided [CatalogObject](#type-catalogobject)s at the requested [Location](#type-location)s.  Results are paginated and sorted in descending order according to their &#x60;calculated_at&#x60; timestamp (newest first).  When &#x60;updated_after&#x60; is specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a \&quot;sync\&quot; operation, for example in response to receiving a Webhook notification.
   * @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
   * @return CompleteResponse<BatchRetrieveInventoryCountsResponse>
   * @throws ApiException if fails to make API call
   */
BatchRetrieveInventoryCounts
Returns current counts for the provided [CatalogObject](#type-catalogobject)s at the requested [Location](#type-location)s.  Results are paginated and sorted in descending order according to their `calculated_at` timestamp (newest first).  When `updated_after` is specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a \"sync\" operation, for example in response to receiving a Webhook notification.
@param body An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
@return CompleteResponse
@throws ApiException if fails to make API call
BatchRetrieveInventoryCounts Returns current counts for the provided [ CatalogObject ] ( #type - catalogobject ) s at the requested [ Location ] ( #type - location ) s . Results are paginated and sorted in descending order according to their ` calculated_at ` timestamp ( newest first ) . When ` updated_after ` is specified only counts that have changed since that time ( based on the server timestamp for the most recent change ) are returned . This allows clients to perform a \ " sync \ " operation for example in response to receiving a Webhook notification . @param body An object containing the fields to POST for the request . See the corresponding object definition for field details . ( required ) @return CompleteResponse @throws ApiException if fails to make API call
public CompleteResponse<BatchRetrieveInventoryCountsResponse>batchRetrieveInventoryCountsWithHttpInfo(BatchRetrieveInventoryCountsRequest body) throws ApiException {
    Object localVarPostBody = body;
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling batchRetrieveInventoryCounts");
    }
    String localVarPath = "/v2/inventory/batch-retrieve-counts";
    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");
    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<BatchRetrieveInventoryCountsResponse> localVarReturnType = new GenericType<BatchRetrieveInventoryCountsResponse>() {};
    return (CompleteResponse<BatchRetrieveInventoryCountsResponse>)apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
  }
public CompleteResponse < BatchRetrieveInventoryCountsResponse > batchRetrieveInventoryCountsWithHttpInfo ( BatchRetrieveInventoryCountsRequest body ) throws ApiException { Object localVarPostBody = body ; if ( body == null ) { throw new ApiException ( 400 , "Missing the required parameter 'body' when calling batchRetrieveInventoryCounts" ) ; } String localVarPath = "/v2/inventory/batch-retrieve-counts" ; 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" ) ; 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 < BatchRetrieveInventoryCountsResponse > localVarReturnType = new GenericType < BatchRetrieveInventoryCountsResponse > ( ) { } ; return ( CompleteResponse < BatchRetrieveInventoryCountsResponse > ) apiClient . invokeAPI ( localVarPath , "POST" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; }
BatchRetrieveInventoryCounts
 Returns current counts for the provided [CatalogObject](#type-catalogobject)s at the requested [Location](#type-location)s.  Results are paginated and sorted in descending order according to their &#x60;calculated_at&#x60; timestamp (newest first).
BatchRetrieveInventoryCounts Returns current counts for the provided [ CatalogObject ] ( #type - catalogobject ) s at the requested [ Location ] ( #type - location ) s . Results are paginated and sorted in descending order according to their &#x60 ; calculated_at&#x60 ; timestamp ( newest first ) .
// verify the required parameter 'body' is set // create path and map variables // query params