src/main/java/com/squareup/connect/api/V1ItemsApi.java
@Deprecated
  public V1Item updateItem(String locationId, String itemId, V1Item body) throws ApiException {
    Object localVarPostBody = body;
    
    // verify the required parameter 'locationId' is set
    if (locationId == null) {
      throw new ApiException(400, "Missing the required parameter 'locationId' when calling updateItem");
    }
    
    // verify the required parameter 'itemId' is set
    if (itemId == null) {
      throw new ApiException(400, "Missing the required parameter 'itemId' when calling updateItem");
    }
    
    // verify the required parameter 'body' is set
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling updateItem");
    }
    
    // create path and map variables
    String localVarPath = "/v1/{location_id}/items/{item_id}"
      .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString()))
      .replaceAll("\\{" + "item_id" + "\\}", apiClient.escapeString(itemId.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");

    
    
    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<V1Item> localVarReturnType = new GenericType<V1Item>() {};
    CompleteResponse<V1Item> completeResponse = (CompleteResponse<V1Item>)apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
/**
   * UpdateItem
   * Modifies the core details of an existing item.  ---  - __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 itemId The ID of the item to modify. (required)
   * @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
   * @return V1Item
   * @throws ApiException if fails to make API call
   */
UpdateItem
Modifies the core details of an existing item.
UpdateItem Modifies the core details of an existing item .
@Deprecated
  public V1Item updateItem(String locationId, String itemId, V1Item body) throws ApiException {
    Object localVarPostBody = body;
    if (locationId == null) {
      throw new ApiException(400, "Missing the required parameter 'locationId' when calling updateItem");
    }
    if (itemId == null) {
      throw new ApiException(400, "Missing the required parameter 'itemId' when calling updateItem");
    }
    if (body == null) {
      throw new ApiException(400, "Missing the required parameter 'body' when calling updateItem");
    }
    String localVarPath = "/v1/{location_id}/items/{item_id}"
      .replaceAll("\\{" + "location_id" + "\\}", apiClient.escapeString(locationId.toString()))
      .replaceAll("\\{" + "item_id" + "\\}", apiClient.escapeString(itemId.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");
    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<V1Item> localVarReturnType = new GenericType<V1Item>() {};
    CompleteResponse<V1Item> completeResponse = (CompleteResponse<V1Item>)apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
    return completeResponse.getData();
      }
@ Deprecated public V1Item updateItem ( String locationId , String itemId , V1Item body ) throws ApiException { Object localVarPostBody = body ; if ( locationId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'locationId' when calling updateItem" ) ; } if ( itemId == null ) { throw new ApiException ( 400 , "Missing the required parameter 'itemId' when calling updateItem" ) ; } if ( body == null ) { throw new ApiException ( 400 , "Missing the required parameter 'body' when calling updateItem" ) ; } String localVarPath = "/v1/{location_id}/items/{item_id}" . replaceAll ( "\\{" + "location_id" + "\\}" , apiClient . escapeString ( locationId . toString ( ) ) ) . replaceAll ( "\\{" + "item_id" + "\\}" , apiClient . escapeString ( itemId . 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" ) ; 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 < V1Item > localVarReturnType = new GenericType < V1Item > ( ) { } ; CompleteResponse < V1Item > completeResponse = ( CompleteResponse < V1Item > ) apiClient . invokeAPI ( localVarPath , "PUT" , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarAccept , localVarContentType , localVarAuthNames , localVarReturnType ) ; return completeResponse . getData ( ) ; }
UpdateItem
 Modifies the core details of an existing item.
UpdateItem Modifies the core details of an existing item .
// verify the required parameter 'locationId' is set // verify the required parameter 'itemId' is set // verify the required parameter 'body' is set // create path and map variables // query params