Class CartDiscountSetStoresActionImpl

java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountSetStoresActionImpl
All Implemented Interfaces:
CartDiscountSetStoresAction, CartDiscountUpdateAction, ResourceUpdateAction<CartDiscountUpdateAction>, io.vrap.rmf.base.client.ModelBase

public class CartDiscountSetStoresActionImpl extends Object implements CartDiscountSetStoresAction, io.vrap.rmf.base.client.ModelBase

If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.

  • Constructor Details

  • Method Details

    • getAction

      public String getAction()
      Specified by:
      getAction in interface CartDiscountUpdateAction
      Specified by:
      getAction in interface ResourceUpdateAction<CartDiscountUpdateAction>
      Returns:
      action
    • getStores

      Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.

      A failed update can return the following errors:

      • If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
      • If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
      Specified by:
      getStores in interface CartDiscountSetStoresAction
      Returns:
      stores
    • setStores

      public void setStores(StoreResourceIdentifier... stores)
      Description copied from interface: CartDiscountSetStoresAction

      Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.

      A failed update can return the following errors:

      • If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
      • If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
      Specified by:
      setStores in interface CartDiscountSetStoresAction
      Parameters:
      stores - values to be set
    • setStores

      public void setStores(List<StoreResourceIdentifier> stores)
      Description copied from interface: CartDiscountSetStoresAction

      Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.

      A failed update can return the following errors:

      • If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
      • If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
      Specified by:
      setStores in interface CartDiscountSetStoresAction
      Parameters:
      stores - values to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object