src/main/java/com/squareup/connect/api/InventoryApi.java
public RetrieveInventoryChangesResponse retrieveInventoryChanges(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 retrieveInventoryChanges");
    }
    
    // create path and map variables
    String localVarPath = "/v2/inventory/{catalog_object_id}/changes"
      .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<RetrieveInventoryChangesResponse> localVarReturnType = new GenericType<RetrieveInventoryChangesResponse>() {};
    CompleteResponse<RetrieveInventoryChangesResponse> completeResponse = (CompleteResponse<RetrieveInventoryChangesResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
/**
   * RetrieveInventoryChanges
   * Returns a set of physical counts and inventory adjustments for the provided [CatalogObject](#type-catalogobject) at the requested [Location](#type-location)s.  Results are paginated and sorted in descending order according to their &#x60;occurred_at&#x60; timestamp (newest first).  There are no limits on how far back the caller can page. This endpoint is useful when displaying recent changes for a specific item. 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 RetrieveInventoryChangesResponse
   * @throws ApiException if fails to make API call
   */
RetrieveInventoryChanges
Returns a set of physical counts and inventory adjustments for the provided [CatalogObject](#type-catalogobject) at the requested [Location](#type-location)s.  Results are paginated and sorted in descending order according to their `occurred_at` timestamp (newest first).  There are no limits on how far back the caller can page. This endpoint is useful when displaying recent changes for a specific item. 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 RetrieveInventoryChangesResponse
@throws ApiException if fails to make API call
RetrieveInventoryChanges Returns a set of physical counts and inventory adjustments for the provided [ CatalogObject ] ( #type - catalogobject ) at the requested [ Location ] ( #type - location ) s . Results are paginated and sorted in descending order according to their ` occurred_at ` timestamp ( newest first ) . There are no limits on how far back the caller can page . This endpoint is useful when displaying recent changes for a specific item . 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 RetrieveInventoryChangesResponse @throws ApiException if fails to make API call
public RetrieveInventoryChangesResponse retrieveInventoryChanges(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 retrieveInventoryChanges");
    }
    String localVarPath = "/v2/inventory/{catalog_object_id}/changes"
      .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<RetrieveInventoryChangesResponse> localVarReturnType = new GenericType<RetrieveInventoryChangesResponse>() {};
    CompleteResponse<RetrieveInventoryChangesResponse> completeResponse = (CompleteResponse<RetrieveInventoryChangesResponse>)apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
public RetrieveInventoryChangesResponse retrieveInventoryChanges ( 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 retrieveInventoryChanges" ) ; } String localVarPath = "/v2/inventory/{catalog_object_id}/changes" . 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 < RetrieveInventoryChangesResponse > localVarReturnType = new GenericType < RetrieveInventoryChangesResponse > ( ) { } ; CompleteResponse < RetrieveInventoryChangesResponse > completeResponse = ( CompleteResponse < RetrieveInventoryChangesResponse > ) apiClient . invokeAPI ( localVarPath , "GET" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; return completeResponse . getData ( ) ; }
RetrieveInventoryChanges
 Returns a set of physical counts and inventory adjustments for the provided [CatalogObject](#type-catalogobject) at the requested [Location](#type-location)s.  Results are paginated and sorted in descending order according to their &#x60;occurred_at&#x60; timestamp (newest first).
RetrieveInventoryChanges Returns a set of physical counts and inventory adjustments for the provided [ CatalogObject ] ( #type - catalogobject ) at the requested [ Location ] ( #type - location ) s . Results are paginated and sorted in descending order according to their &#x60 ; occurred_at&#x60 ; timestamp ( newest first ) .
// verify the required parameter 'catalogObjectId' is set // create path and map variables // query params