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>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
PaymentTypeFilter()
Constructor for PaymentTypeFilter.
|
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.
|
public static final java.lang.String COPYRIGHT
public java.util.List getInclusionList()
public LineItemSet filter(LineItemSet input, PromotionContext context)
LineItemSet
containing order items
which are qualified for promotion through filtering payment method types.public void fromXML(org.w3c.dom.Node anXMLNode) throws DeXMLizationException
XMLizable
fromXML
in interface XMLizable
anXMLNode
- The node that represents an XMLizable objectDeXMLizationException
- when this process failsXMLizable.fromXML(Node)
public java.lang.String toXML() throws XMLizationException
XMLizable
toXML
in interface XMLizable
XMLizationException
- when this process failsXMLizable.toXML()