Class ProductDiscountValueAbsoluteDraftImpl

java.lang.Object
com.commercetools.api.models.product_discount.ProductDiscountValueAbsoluteDraftImpl
All Implemented Interfaces:
ProductDiscountValueAbsoluteDraft, ProductDiscountValueDraft, io.vrap.rmf.base.client.Draft<ProductDiscountValueAbsoluteDraft>, io.vrap.rmf.base.client.ModelBase

public class ProductDiscountValueAbsoluteDraftImpl extends Object implements ProductDiscountValueAbsoluteDraft, io.vrap.rmf.base.client.ModelBase

Discounts the Product Price by a fixed amount, defined by the money field.

  • Constructor Details

    • ProductDiscountValueAbsoluteDraftImpl

      public ProductDiscountValueAbsoluteDraftImpl()
      create empty instance
  • Method Details

    • getType

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

      public List<Money> getMoney()

      Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the array has multiple values of the same currency, the API returns an InvalidOperation error.

      If the array is empty, the discount does not apply.

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

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

      Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the array has multiple values of the same currency, the API returns an InvalidOperation error.

      If the array is empty, the discount does not apply.

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

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

      Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the array has multiple values of the same currency, the API returns an InvalidOperation error.

      If the array is empty, the discount does not apply.

      Specified by:
      setMoney in interface ProductDiscountValueAbsoluteDraft
      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