Class CartDiscountAddStoreActionImpl

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

public class CartDiscountAddStoreActionImpl extends Object implements CartDiscountAddStoreAction, io.vrap.rmf.base.client.ModelBase

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

  • Constructor Details

    • CartDiscountAddStoreActionImpl

      public CartDiscountAddStoreActionImpl()
      create empty instance
  • Method Details

    • getAction

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

      public StoreResourceIdentifier getStore()

      Store to add.

      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:
      getStore in interface CartDiscountAddStoreAction
      Returns:
      store
    • setStore

      public void setStore(StoreResourceIdentifier store)
      Description copied from interface: CartDiscountAddStoreAction

      Store to add.

      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:
      setStore in interface CartDiscountAddStoreAction
      Parameters:
      store - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object