Class CartDiscountValueFixedDraftImpl

java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountValueFixedDraftImpl
All Implemented Interfaces:
CartDiscountValueDraft, CartDiscountValueFixedDraft, io.vrap.rmf.base.client.Draft<CartDiscountValueFixedDraft>, io.vrap.rmf.base.client.ModelBase

public class CartDiscountValueFixedDraftImpl extends Object implements CartDiscountValueFixedDraft, io.vrap.rmf.base.client.ModelBase

Sets the DiscountedLineItemPrice of the CartDiscountLineItemsTarget or CartDiscountCustomLineItemsTarget to the value specified in the money field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the money field, this Discount is not applied.

  • Constructor Details

  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface CartDiscountValueDraft
      Returns:
      type
    • getMoney

      public List<Money> getMoney()

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Specified by:
      getMoney in interface CartDiscountValueFixedDraft
      Returns:
      money
    • setMoney

      public void setMoney(Money... money)
      Description copied from interface: CartDiscountValueFixedDraft

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Specified by:
      setMoney in interface CartDiscountValueFixedDraft
      Parameters:
      money - values to be set
    • setMoney

      public void setMoney(List<Money> money)
      Description copied from interface: CartDiscountValueFixedDraft

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Specified by:
      setMoney in interface CartDiscountValueFixedDraft
      Parameters:
      money - values to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object