src/test/java/com/squareup/connect/api/CatalogApiTest.java
@Test
    public void updateItemTaxesTest() throws ApiException {
        String coffeeId = idMap.get("#Coffee");
        String salesTaxId = idMap.get("#SalesTax");

        RetrieveCatalogObjectResponse objectBefore = api.retrieveCatalogObject(coffeeId, false);
        assertEquals(1, objectBefore.getObject().getItemData().getTaxIds().size());

        UpdateItemTaxesRequest body = new UpdateItemTaxesRequest()
            .addItemIdsItem(coffeeId)
            .addTaxesToDisableItem(salesTaxId);
        UpdateItemTaxesResponse response = api.updateItemTaxes(body);

        RetrieveCatalogObjectResponse objectAfter = api.retrieveCatalogObject(coffeeId, false);
        assertEquals(0, objectAfter.getObject().getItemData().getTaxIds().size());
    }
/**
     * UpdateItemTaxes
     * <p>
     * Updates the [CatalogTax](#type-catalogtax) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item.
     *
     * @throws ApiException if the Api call fails
     */
UpdateItemTaxes

Updates the [CatalogTax](#type-catalogtax) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item.

@throws ApiException if the Api call fails
UpdateItemTaxes Updates the [ CatalogTax ] ( #type - catalogtax ) objects that apply to the targeted [ CatalogItem ] ( #type - catalogitem ) without having to perform an upsert on the entire item . @throws ApiException if the Api call fails
@Test
    public void updateItemTaxesTest() throws ApiException {
        String coffeeId = idMap.get("#Coffee");
        String salesTaxId = idMap.get("#SalesTax");
        RetrieveCatalogObjectResponse objectBefore = api.retrieveCatalogObject(coffeeId, false);
        assertEquals(1, objectBefore.getObject().getItemData().getTaxIds().size());
        UpdateItemTaxesRequest body = new UpdateItemTaxesRequest()
            .addItemIdsItem(coffeeId)
            .addTaxesToDisableItem(salesTaxId);
        UpdateItemTaxesResponse response = api.updateItemTaxes(body);
        RetrieveCatalogObjectResponse objectAfter = api.retrieveCatalogObject(coffeeId, false);
        assertEquals(0, objectAfter.getObject().getItemData().getTaxIds().size());
    }
@ Test public void updateItemTaxesTest ( ) throws ApiException { String coffeeId = idMap . get ( "#Coffee" ) ; String salesTaxId = idMap . get ( "#SalesTax" ) ; RetrieveCatalogObjectResponse objectBefore = api . retrieveCatalogObject ( coffeeId , false ) ; assertEquals ( 1 , objectBefore . getObject ( ) . getItemData ( ) . getTaxIds ( ) . size ( ) ) ; UpdateItemTaxesRequest body = new UpdateItemTaxesRequest ( ) . addItemIdsItem ( coffeeId ) . addTaxesToDisableItem ( salesTaxId ) ; UpdateItemTaxesResponse response = api . updateItemTaxes ( body ) ; RetrieveCatalogObjectResponse objectAfter = api . retrieveCatalogObject ( coffeeId , false ) ; assertEquals ( 0 , objectAfter . getObject ( ) . getItemData ( ) . getTaxIds ( ) . size ( ) ) ; }
UpdateItemTaxes
 <p>
 Updates the [CatalogTax](#type-catalogtax) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item.
UpdateItemTaxes <p > Updates the [ CatalogTax ] ( #type - catalogtax ) objects that apply to the targeted [ CatalogItem ] ( #type - catalogitem ) without having to perform an upsert on the entire item .