Class PriceTierDraftImpl

java.lang.Object
com.commercetools.api.models.common.PriceTierDraftImpl
All Implemented Interfaces:
PriceTierDraft, io.vrap.rmf.base.client.Draft<PriceTierDraft>, io.vrap.rmf.base.client.ModelBase

public class PriceTierDraftImpl extends Object implements PriceTierDraft, io.vrap.rmf.base.client.ModelBase

Specifies a Price tier that applies when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase

    io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
  • Constructor Summary

    Constructors
    Constructor
    Description
    create empty instance
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Minimum quantity this Price tier is valid for.
    Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.
    int
     
    void
    setMinimumQuantity(Long minimumQuantity)
    Minimum quantity this Price tier is valid for.
    void
    setValue(Money value)
    Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.vrap.rmf.base.client.ModelBase

    reflectionString, reflectionString

    Methods inherited from interface com.commercetools.api.models.common.PriceTierDraft

    withPriceTierDraft
  • Constructor Details

  • Method Details

    • getMinimumQuantity

      Minimum quantity this Price tier is valid for.

      The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same minimumQuantity. In the case one of the constraint is not met an InvalidField is returned.

      Specified by:
      getMinimumQuantity in interface PriceTierDraft
      Returns:
      minimumQuantity
    • getValue

      public Money getValue()

      Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

      The currencyCode of a Price tier must be the same as the currencyCode in the value of the related Price.

      Specified by:
      getValue in interface PriceTierDraft
      Returns:
      value
    • setMinimumQuantity

      public void setMinimumQuantity(Long minimumQuantity)
      Description copied from interface: PriceTierDraft

      Minimum quantity this Price tier is valid for.

      The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same minimumQuantity. In the case one of the constraint is not met an InvalidField is returned.

      Specified by:
      setMinimumQuantity in interface PriceTierDraft
      Parameters:
      minimumQuantity - value to be set
    • setValue

      public void setValue(Money value)
      Description copied from interface: PriceTierDraft

      Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

      The currencyCode of a Price tier must be the same as the currencyCode in the value of the related Price.

      Specified by:
      setValue in interface PriceTierDraft
      Parameters:
      value - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object