com.ibm.commerce.marketing.promotion.condition

Class PaymentTypeFilter

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.condition.PaymentTypeFilter
  • All Implemented Interfaces:
    Filter, XMLizable, java.io.Serializable


    public class PaymentTypeFilter
    extends java.lang.Object
    implements Filter
    PaymentTypeFilter class filters LineItemSet based on payment method of the order. It calls GetOrder service to get payment instruction information of the order and returns all input LineItem if the payment method used for an order is defined in the inclusion payment method list. Though multiple payment methods can be defined in the inclusion list, this implementation only supports single payment method to be used for the evaluated order. This class implements Filter interface. XML Snippet for this type of Filter.

    XML Snippet for this type of Filter:

     
     <Filter impl="com.ibm.commerce.marketing.promotion.condition.PaymentTypeFilter">
            <IncludePaymentType>
                            <PaymentMethodName>VISA</PaymentMethodName>
                    </IncludePaymentType>
     </Filter>
     
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      LineItemSet filter(LineItemSet input, PromotionContext context)
      This method returns the LineItemSet containing order items which are qualified for promotion through filtering payment method types.
      void fromXML(org.w3c.dom.Node anXMLNode)
      Transforms the XML node into its corresponding real Object.
      java.util.List getInclusionList()
      This method gets the list of payment method names in the inclusion list.
      java.lang.String toXML()
      Converts the object into its corresponding XML format representation.
      • 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
    • Constructor Detail

      • PaymentTypeFilter

        public PaymentTypeFilter()
        Constructor for PaymentTypeFilter.
    • Method Detail

      • getInclusionList

        public java.util.List getInclusionList()
        This method gets the list of payment method names in the inclusion list.
        Returns:
        list of payment method names in String
      • filter

        public LineItemSet filter(LineItemSet input,
                                  PromotionContext context)
        This method returns the LineItemSet containing order items which are qualified for promotion through filtering payment method types.
        Specified by:
        filter in interface Filter
        Parameters:
        input - LineItemSet
        context - PromotionContext
        Returns:
        the filtered LineItemSet
        See Also:
        com.ibm.commerce.marketing.promotion.condition.Filter#filter(LineItemSet)