/** * This code was auto-generated by a Codezu. * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. */ package com.mozu.api.resources.commerce.catalog.admin; import com.mozu.api.ApiContext; import java.util.List; import java.util.ArrayList; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import com.mozu.api.Headers; import org.joda.time.DateTime; import com.mozu.api.AsyncCallback; import java.util.concurrent.CountDownLatch; import com.mozu.api.security.AuthTicket; import org.apache.commons.lang.StringUtils; import com.mozu.api.DataViewMode; /** <summary> * Define and manage discounts to apply to products, product categories, or orders. The discounts can be a specified amount off the price, percentage off the price, or for free shipping. Create a coupon code that shoppers can use to redeem the discount. * </summary> */ public class DiscountResource { /// /// <see cref="Mozu.Api.ApiContext"/> /// private ApiContext _apiContext; private DataViewMode _dataViewMode; public DiscountResource(ApiContext apiContext) { _apiContext = apiContext; _dataViewMode = DataViewMode.Live; } public DiscountResource(ApiContext apiContext, DataViewMode dataViewMode) { _apiContext = apiContext; _dataViewMode = dataViewMode; } /** * Retrieves a list of discounts according to any specified filter criteria and sort options. * <p><pre><code> * Discount discount = new Discount(); * DiscountCollection discountCollection = discount.getDiscounts(); * </code></pre></p> * @return com.mozu.api.contracts.productadmin.DiscountCollection * @see com.mozu.api.contracts.productadmin.DiscountCollection */ public com.mozu.api.contracts.productadmin.DiscountCollection getDiscounts() throws Exception { return getDiscounts( null, null, null, null, null); } /** * Retrieves a list of discounts according to any specified filter criteria and sort options. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.getDiscounts( callback ); * latch.await() * </code></pre></p> * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.productadmin.DiscountCollection * @see com.mozu.api.contracts.productadmin.DiscountCollection */ public CountDownLatch getDiscountsAsync( AsyncCallback<com.mozu.api.contracts.productadmin.DiscountCollection> callback) throws Exception { return getDiscountsAsync( null, null, null, null, null, callback); } /** * Retrieves a list of discounts according to any specified filter criteria and sort options. * <p><pre><code> * Discount discount = new Discount(); * DiscountCollection discountCollection = discount.getDiscounts( startIndex, pageSize, sortBy, filter, responseFields); * </code></pre></p> * @param filter A set of expressions that consist of a field, operator, and value and represent search parameter syntax when filtering results of a query. Valid operators include equals (eq), does not equal (ne), greater than (gt), less than (lt), greater than or equal to (ge), less than or equal to (le), starts with (sw), or contains (cont). For example - "filter=IsDisplayed+eq+true" * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. * @param responseFields Use this field to include those fields which are not included by default. * @param sortBy * @param startIndex * @return com.mozu.api.contracts.productadmin.DiscountCollection * @see com.mozu.api.contracts.productadmin.DiscountCollection */ public com.mozu.api.contracts.productadmin.DiscountCollection getDiscounts(Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.DiscountCollection> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.getDiscountsClient(_dataViewMode, startIndex, pageSize, sortBy, filter, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Retrieves a list of discounts according to any specified filter criteria and sort options. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.getDiscounts( startIndex, pageSize, sortBy, filter, responseFields, callback ); * latch.await() * </code></pre></p> * @param filter A set of expressions that consist of a field, operator, and value and represent search parameter syntax when filtering results of a query. Valid operators include equals (eq), does not equal (ne), greater than (gt), less than (lt), greater than or equal to (ge), less than or equal to (le), starts with (sw), or contains (cont). For example - "filter=IsDisplayed+eq+true" * @param pageSize The number of results to display on each page when creating paged results from a query. The maximum value is 200. * @param responseFields Use this field to include those fields which are not included by default. * @param sortBy * @param startIndex * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.productadmin.DiscountCollection * @see com.mozu.api.contracts.productadmin.DiscountCollection */ public CountDownLatch getDiscountsAsync(Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.DiscountCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.DiscountCollection> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.getDiscountsClient(_dataViewMode, startIndex, pageSize, sortBy, filter, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Retrieves the localized content specified for the specified discount. * <p><pre><code> * Discount discount = new Discount(); * DiscountLocalizedContent discountLocalizedContent = discount.getDiscountContent( discountId); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @return com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent */ public com.mozu.api.contracts.productadmin.DiscountLocalizedContent getDiscountContent(Integer discountId) throws Exception { return getDiscountContent( discountId, null); } /** * Retrieves the localized content specified for the specified discount. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.getDiscountContent( discountId, callback ); * latch.await() * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent */ public CountDownLatch getDiscountContentAsync(Integer discountId, AsyncCallback<com.mozu.api.contracts.productadmin.DiscountLocalizedContent> callback) throws Exception { return getDiscountContentAsync( discountId, null, callback); } /** * Retrieves the localized content specified for the specified discount. * <p><pre><code> * Discount discount = new Discount(); * DiscountLocalizedContent discountLocalizedContent = discount.getDiscountContent( discountId, responseFields); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Use this field to include those fields which are not included by default. * @return com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent */ public com.mozu.api.contracts.productadmin.DiscountLocalizedContent getDiscountContent(Integer discountId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.DiscountLocalizedContent> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.getDiscountContentClient(_dataViewMode, discountId, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Retrieves the localized content specified for the specified discount. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.getDiscountContent( discountId, responseFields, callback ); * latch.await() * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent */ public CountDownLatch getDiscountContentAsync(Integer discountId, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.DiscountLocalizedContent> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.DiscountLocalizedContent> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.getDiscountContentClient(_dataViewMode, discountId, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Retrieves the details of a single discount. * <p><pre><code> * Discount discount = new Discount(); * Discount discount = discount.getDiscount( discountId); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public com.mozu.api.contracts.productadmin.Discount getDiscount(Integer discountId) throws Exception { return getDiscount( discountId, null); } /** * Retrieves the details of a single discount. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.getDiscount( discountId, callback ); * latch.await() * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public CountDownLatch getDiscountAsync(Integer discountId, AsyncCallback<com.mozu.api.contracts.productadmin.Discount> callback) throws Exception { return getDiscountAsync( discountId, null, callback); } /** * Retrieves the details of a single discount. * <p><pre><code> * Discount discount = new Discount(); * Discount discount = discount.getDiscount( discountId, responseFields); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Use this field to include those fields which are not included by default. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public com.mozu.api.contracts.productadmin.Discount getDiscount(Integer discountId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Discount> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.getDiscountClient(_dataViewMode, discountId, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Retrieves the details of a single discount. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.getDiscount( discountId, responseFields, callback ); * latch.await() * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public CountDownLatch getDiscountAsync(Integer discountId, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.Discount> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Discount> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.getDiscountClient(_dataViewMode, discountId, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Generates a random code for a coupon. * <p><pre><code> * Discount discount = new Discount(); * string string = discount.generateRandomCoupon(); * </code></pre></p> * @return string * @see string */ public String generateRandomCoupon() throws Exception { return generateRandomCoupon( null); } /** * Generates a random code for a coupon. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.generateRandomCoupon( callback ); * latch.await() * </code></pre></p> * @param callback callback handler for asynchronous operations * @return string * @see string */ public CountDownLatch generateRandomCouponAsync( AsyncCallback<String> callback) throws Exception { return generateRandomCouponAsync( null, callback); } /** * Generates a random code for a coupon. * <p><pre><code> * Discount discount = new Discount(); * string string = discount.generateRandomCoupon( responseFields); * </code></pre></p> * @param responseFields Use this field to include those fields which are not included by default. * @return string * @see string */ public String generateRandomCoupon(String responseFields) throws Exception { MozuClient<String> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.generateRandomCouponClient( responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Generates a random code for a coupon. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.generateRandomCoupon( responseFields, callback ); * latch.await() * </code></pre></p> * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @return string * @see string */ public CountDownLatch generateRandomCouponAsync(String responseFields, AsyncCallback<String> callback) throws Exception { MozuClient<String> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.generateRandomCouponClient( responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Creates a new discount or coupon to apply to a product, category, order, or shipping. * <p><pre><code> * Discount discount = new Discount(); * Discount discount = discount.createDiscount( discount); * </code></pre></p> * @param discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public com.mozu.api.contracts.productadmin.Discount createDiscount(com.mozu.api.contracts.productadmin.Discount discount) throws Exception { return createDiscount( discount, null); } /** * Creates a new discount or coupon to apply to a product, category, order, or shipping. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.createDiscount( discount, callback ); * latch.await() * </code></pre></p> * @param callback callback handler for asynchronous operations * @param discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public CountDownLatch createDiscountAsync(com.mozu.api.contracts.productadmin.Discount discount, AsyncCallback<com.mozu.api.contracts.productadmin.Discount> callback) throws Exception { return createDiscountAsync( discount, null, callback); } /** * Creates a new discount or coupon to apply to a product, category, order, or shipping. * <p><pre><code> * Discount discount = new Discount(); * Discount discount = discount.createDiscount( discount, responseFields); * </code></pre></p> * @param responseFields Use this field to include those fields which are not included by default. * @param discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public com.mozu.api.contracts.productadmin.Discount createDiscount(com.mozu.api.contracts.productadmin.Discount discount, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Discount> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.createDiscountClient( discount, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Creates a new discount or coupon to apply to a product, category, order, or shipping. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.createDiscount( discount, responseFields, callback ); * latch.await() * </code></pre></p> * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @param discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public CountDownLatch createDiscountAsync(com.mozu.api.contracts.productadmin.Discount discount, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.Discount> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Discount> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.createDiscountClient( discount, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Updates the localizable content for the specified discount or rename the discount without modifying its other properties. * <p><pre><code> * Discount discount = new Discount(); * DiscountLocalizedContent discountLocalizedContent = discount.updateDiscountContent( content, discountId); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param content The container for the language-specific name of the discount. A container exists for each supported language (LocaleCode). This parameter enables you to display the discount name in multiple languages yet manage it as a single discount internally. * @return com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent */ public com.mozu.api.contracts.productadmin.DiscountLocalizedContent updateDiscountContent(com.mozu.api.contracts.productadmin.DiscountLocalizedContent content, Integer discountId) throws Exception { return updateDiscountContent( content, discountId, null); } /** * Updates the localizable content for the specified discount or rename the discount without modifying its other properties. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.updateDiscountContent( content, discountId, callback ); * latch.await() * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param callback callback handler for asynchronous operations * @param content The container for the language-specific name of the discount. A container exists for each supported language (LocaleCode). This parameter enables you to display the discount name in multiple languages yet manage it as a single discount internally. * @return com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent */ public CountDownLatch updateDiscountContentAsync(com.mozu.api.contracts.productadmin.DiscountLocalizedContent content, Integer discountId, AsyncCallback<com.mozu.api.contracts.productadmin.DiscountLocalizedContent> callback) throws Exception { return updateDiscountContentAsync( content, discountId, null, callback); } /** * Updates the localizable content for the specified discount or rename the discount without modifying its other properties. * <p><pre><code> * Discount discount = new Discount(); * DiscountLocalizedContent discountLocalizedContent = discount.updateDiscountContent( content, discountId, responseFields); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Use this field to include those fields which are not included by default. * @param content The container for the language-specific name of the discount. A container exists for each supported language (LocaleCode). This parameter enables you to display the discount name in multiple languages yet manage it as a single discount internally. * @return com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent */ public com.mozu.api.contracts.productadmin.DiscountLocalizedContent updateDiscountContent(com.mozu.api.contracts.productadmin.DiscountLocalizedContent content, Integer discountId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.DiscountLocalizedContent> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.updateDiscountContentClient( content, discountId, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Updates the localizable content for the specified discount or rename the discount without modifying its other properties. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.updateDiscountContent( content, discountId, responseFields, callback ); * latch.await() * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @param content The container for the language-specific name of the discount. A container exists for each supported language (LocaleCode). This parameter enables you to display the discount name in multiple languages yet manage it as a single discount internally. * @return com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent * @see com.mozu.api.contracts.productadmin.DiscountLocalizedContent */ public CountDownLatch updateDiscountContentAsync(com.mozu.api.contracts.productadmin.DiscountLocalizedContent content, Integer discountId, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.DiscountLocalizedContent> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.DiscountLocalizedContent> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.updateDiscountContentClient( content, discountId, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Updates one or more properties of a defined discount. * <p><pre><code> * Discount discount = new Discount(); * Discount discount = discount.updateDiscount( discount, discountId); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public com.mozu.api.contracts.productadmin.Discount updateDiscount(com.mozu.api.contracts.productadmin.Discount discount, Integer discountId) throws Exception { return updateDiscount( discount, discountId, null); } /** * Updates one or more properties of a defined discount. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.updateDiscount( discount, discountId, callback ); * latch.await() * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param callback callback handler for asynchronous operations * @param discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public CountDownLatch updateDiscountAsync(com.mozu.api.contracts.productadmin.Discount discount, Integer discountId, AsyncCallback<com.mozu.api.contracts.productadmin.Discount> callback) throws Exception { return updateDiscountAsync( discount, discountId, null, callback); } /** * Updates one or more properties of a defined discount. * <p><pre><code> * Discount discount = new Discount(); * Discount discount = discount.updateDiscount( discount, discountId, responseFields); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Use this field to include those fields which are not included by default. * @param discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public com.mozu.api.contracts.productadmin.Discount updateDiscount(com.mozu.api.contracts.productadmin.Discount discount, Integer discountId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Discount> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.updateDiscountClient( discount, discountId, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Updates one or more properties of a defined discount. * <p><pre><code> * Discount discount = new Discount(); * CountDownLatch latch = discount.updateDiscount( discount, discountId, responseFields, callback ); * latch.await() * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @param discount Name of the discount added and applied to a shopping cart and order for a shopper's purchase. * @return com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount * @see com.mozu.api.contracts.productadmin.Discount */ public CountDownLatch updateDiscountAsync(com.mozu.api.contracts.productadmin.Discount discount, Integer discountId, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.Discount> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Discount> client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.updateDiscountClient( discount, discountId, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Deletes a discount specified by its discount ID. * <p><pre><code> * Discount discount = new Discount(); * discount.deleteDiscount( discountId); * </code></pre></p> * @param discountId discountId parameter description DOCUMENT_HERE * @return */ public void deleteDiscount(Integer discountId) throws Exception { MozuClient client = com.mozu.api.clients.commerce.catalog.admin.DiscountClient.deleteDiscountClient( discountId); client.setContext(_apiContext); client.executeRequest(); client.cleanupHttpConnection(); } }