Class CartValueTierImpl

java.lang.Object
com.commercetools.api.models.shipping_method.CartValueTierImpl
All Implemented Interfaces:
CartValueTier, ShippingRatePriceTier, io.vrap.rmf.base.client.ModelBase

public class CartValueTierImpl extends Object implements CartValueTier, io.vrap.rmf.base.client.ModelBase

Used when the ShippingRate maps to the sum of LineItem Prices. The value of the Cart is used to select a tier. If chosen, it is not possible to set a value for the shippingRateInput on the Cart. Tiers contain the centAmount (a value of 100 in the currency USD corresponds to $ 1.00), and start at 1.'

  • Constructor Details

    • CartValueTierImpl

      public CartValueTierImpl()
      create empty instance
  • Method Details

    • getType

      public ShippingRateTierType getType()
      Specified by:
      getType in interface ShippingRatePriceTier
      Returns:
      type
    • getMinimumCentAmount

      public Long getMinimumCentAmount()

      Minimum total price of a Cart for which a shipping rate applies.

      Specified by:
      getMinimumCentAmount in interface CartValueTier
      Returns:
      minimumCentAmount
    • getPrice

      public Money getPrice()

      Fixed shipping rate Price for a CartValue.

      Specified by:
      getPrice in interface CartValueTier
      Returns:
      price
    • getIsMatching

      public Boolean getIsMatching()

      Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.

      Specified by:
      getIsMatching in interface CartValueTier
      Returns:
      isMatching
    • setMinimumCentAmount

      public void setMinimumCentAmount(Long minimumCentAmount)
      Description copied from interface: CartValueTier

      Minimum total price of a Cart for which a shipping rate applies.

      Specified by:
      setMinimumCentAmount in interface CartValueTier
      Parameters:
      minimumCentAmount - value to be set
    • setPrice

      public void setPrice(Money price)
      Description copied from interface: CartValueTier

      Fixed shipping rate Price for a CartValue.

      Specified by:
      setPrice in interface CartValueTier
      Parameters:
      price - value to be set
    • setIsMatching

      public void setIsMatching(Boolean isMatching)
      Description copied from interface: CartValueTier

      Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.

      Specified by:
      setIsMatching in interface CartValueTier
      Parameters:
      isMatching - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object