Class ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyDelete

java.lang.Object
io.vrap.rmf.base.client.ApiMethod<T,TResult>
io.vrap.rmf.base.client.TypeApiMethod<ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyDelete,CartDiscount>
com.commercetools.api.client.ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyDelete
All Implemented Interfaces:
ConflictingTrait<ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyDelete>, Deprecatable200Trait<ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyDelete>, ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyDelete>, ExpandableTrait<ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyDelete>, VersionedTrait<ByProjectKeyInStoreKeyByStoreKeyCartDiscountsKeyByKeyDelete>, ClientRequestCommand<CartDiscount>, CreateHttpRequestCommand, HttpRequestCommand<CartDiscount>, RequestCommand<CartDiscount>

To delete a CartDiscount, specify the manage_cart_discounts:{projectKey}:{storeKey} scope for all Stores associated with the CartDiscount.

Deleting a Cart Discount produces the CartDiscountDeleted Message.



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.cart_discount.CartDiscount>> result = apiRoot
            .withProjectKey("{projectKey}")
            .inStoreKeyWithStoreKeyValue("{storeKey}")
            .cartDiscounts()
            .withKey("{key}")
            .delete()
            .withVersion(version)
            .execute()