com.ibm.commerce.discount.rules

Class ServiceDiscount

  • java.lang.Object
    • com.ibm.commerce.discount.rules.ServiceDiscount


  • public class ServiceDiscount
    extends java.lang.Object
    This class represents a service discount type.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ServiceDiscount()
      Constructor for ServiceDiscount.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Integer getApplyType()
      Get the service discount apply type which is used to indicate the type of the Adjustment from which the ServiceDiscount was created.
      java.lang.String getInternalShippingMode()
      Get internal shipping mode in String type.
      java.lang.Integer getMode()
      Get the mode of the Adjustment for which the ServiceDiscount is created.
      java.lang.Long[] getOrderItemIds()
      Get the order item IDs for the order items to which the ServiceDiscount will apply.
      java.math.BigDecimal getQuantity()
      Get quantity.
      java.lang.String getServiceName()
      Get service name, for example "wcs_shipping".
      java.lang.Integer getShippingMode()
      Get shipping mode in Integer type.
      java.math.BigDecimal getStartsAt()
      Get the subset of the order item quantity referred to by the AssociatedOrderItem.
      java.math.BigDecimal getValue()
      Get the adjustment value associated with the ServiceDiscount.
      void setApplyType(java.lang.Integer newValue)
      Set the service discount apply type which is used to indicate the type of the Adjustment from which the ServiceDiscount was created.
      void setInternalShippingMode(java.lang.String newValue)
      Set internal shipping mode by passing String value.
      void setMode(java.lang.Integer newMode)
      Set the mode of the Adjustment for which the ServiceDiscount is created.
      void setOrderItemIds(java.lang.Long[] newOrderItemId)
      Set the order item IDs for the order items to which the ServiceDiscount will apply.
      void setQuantity(java.math.BigDecimal newQuantity)
      Set quantity.
      void setServiceName(java.lang.String newServiceName)
      Set the service name, for example "wcs_shipping".
      void setShippingMode(java.lang.Integer newShippingMode)
      Set shipping mode by passing Integer value.
      void setStartsAt(java.math.BigDecimal newStartsAt)
      Set the subset of the order item quantity referred to by the AssociatedOrderItem.
      void setValue(java.math.BigDecimal newValue)
      Set the adjustment value for the ServiceDiscount object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • DISCOUNT_APPLY_TYPE_WHOLEORDER

        public static final java.lang.Integer DISCOUNT_APPLY_TYPE_WHOLEORDER
        ApplyType for WholeOrder
      • DISCOUNT_APPLY_TYPE_ALLAFFECTED

        public static final java.lang.Integer DISCOUNT_APPLY_TYPE_ALLAFFECTED
        ApplyType for AllAffectedItems
      • DISCOUNT_APPLY_TYPE_INDIVIDUAL

        public static final java.lang.Integer DISCOUNT_APPLY_TYPE_INDIVIDUAL
        ApplyType for IndividualItems
    • Constructor Detail

      • ServiceDiscount

        public ServiceDiscount()
        Constructor for ServiceDiscount.
    • Method Detail

      • getMode

        public java.lang.Integer getMode()
        Get the mode of the Adjustment for which the ServiceDiscount is created. The value may be 1 - PercentageOff, 2 - FixedAmountOff, 3 - FixedCost.
        Returns:
        the mode of the adjustment.
      • getServiceName

        public java.lang.String getServiceName()
        Get service name, for example "wcs_shipping".
        Returns:
        The service name.
      • getShippingMode

        public java.lang.Integer getShippingMode()
        Get shipping mode in Integer type.
        Returns:
        The internal shipping mode.
      • getValue

        public java.math.BigDecimal getValue()
        Get the adjustment value associated with the ServiceDiscount.
        Returns:
        the adjustment value.
      • setMode

        public void setMode(java.lang.Integer newMode)
        Set the mode of the Adjustment for which the ServiceDiscount is created.
        Parameters:
        newMode - the mode of the adjustment. Possible values include 1 - PercentageOff, 2 - FixedAmountOff, 3 - FixedCost.
      • setServiceName

        public void setServiceName(java.lang.String newServiceName)
        Set the service name, for example "wcs_shipping".
        Parameters:
        newServiceName - The service name to set.
      • setShippingMode

        public void setShippingMode(java.lang.Integer newShippingMode)
        Set shipping mode by passing Integer value.
        Parameters:
        newShippingMode - java.lang.Integer
      • setValue

        public void setValue(java.math.BigDecimal newValue)
        Set the adjustment value for the ServiceDiscount object.
        Parameters:
        newValue - The new adjustment value to set.
      • setInternalShippingMode

        public void setInternalShippingMode(java.lang.String newValue)
        Set internal shipping mode by passing String value.
        Parameters:
        newValue - java.lang.String
      • getInternalShippingMode

        public java.lang.String getInternalShippingMode()
        Get internal shipping mode in String type.
        Returns:
        java.lang.String
      • setApplyType

        public void setApplyType(java.lang.Integer newValue)
        Set the service discount apply type which is used to indicate the type of the Adjustment from which the ServiceDiscount was created.
        Parameters:
        newValue - An Integer representing the service discount apply type.
      • getApplyType

        public java.lang.Integer getApplyType()
        Get the service discount apply type which is used to indicate the type of the Adjustment from which the ServiceDiscount was created.
        Returns:
        An Integer representing the service discount apply type.
      • getOrderItemIds

        public java.lang.Long[] getOrderItemIds()
        Get the order item IDs for the order items to which the ServiceDiscount will apply.
        Returns:
        An array of the order item IDs.
      • setOrderItemIds

        public void setOrderItemIds(java.lang.Long[] newOrderItemId)
        Set the order item IDs for the order items to which the ServiceDiscount will apply.
        Parameters:
        newOrderItemId - An array of the order item IDs to set.
      • getStartsAt

        public java.math.BigDecimal getStartsAt()
        Get the subset of the order item quantity referred to by the AssociatedOrderItem.
        Returns:
        the starts at quantity of the associated order item.
      • setStartsAt

        public void setStartsAt(java.math.BigDecimal newStartsAt)
        Set the subset of the order item quantity referred to by the AssociatedOrderItem.
        Parameters:
        newStartsAt - The starts at quantity of the associated order item to set.
      • getQuantity

        public java.math.BigDecimal getQuantity()
        Get quantity.
        Returns:
        java.math.BigDecimal
      • setQuantity

        public void setQuantity(java.math.BigDecimal newQuantity)
        Set quantity.
        Parameters:
        newQuantity - java.math.BigDecimal