Class LineItem
- java.lang.Object
-
- com.broadleafcommerce.paymentgateway.domain.LineItem
-
public class LineItem extends Object
- Author:
- Elbert Bautista (elbertbautista) Many Hosted solutions, (e.g. PayPal Express/Sagepay Form) allow you to pass in the contents of your cart to be displayed on their hosted pages. The following DTO represent the usual parameters that you may wish to pass: name: a Name for this Line Item description: a Description for this Line Item category: a Category for this Line Item (PayPal Express uses this to differentiate between Digital vs Physical) quantity: the Quantity for this Line Item amount: the unit cost of the item without tax tax: the tax applied to this unit item itemTotal: the cost of the unit item with tax total: the total cost of this line item (Quanity x Cost Including Tax)
-
-
Constructor Summary
Constructors Constructor Description LineItem(PaymentRequest parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LineItem
additionalField(String key, Object value)
LineItem
amount(javax.money.MonetaryAmount amount)
LineItem
category(String category)
LineItem
description(String description)
PaymentRequest
done()
Map<String,Object>
getAdditionalFields()
javax.money.MonetaryAmount
getAmount()
String
getCategory()
String
getDescription()
javax.money.MonetaryAmount
getItemTotal()
String
getName()
PaymentRequest
getParent()
int
getQuantity()
String
getShortDescription()
String
getSystemId()
javax.money.MonetaryAmount
getTax()
javax.money.MonetaryAmount
getTotal()
LineItem
itemTotal(javax.money.MonetaryAmount itemTotal)
LineItem
name(String name)
LineItem
quantity(int quantity)
LineItem
shortDescription(String shortDescription)
LineItem
systemId(String systemId)
LineItem
tax(javax.money.MonetaryAmount tax)
LineItem
total(javax.money.MonetaryAmount total)
-
-
-
Constructor Detail
-
LineItem
public LineItem(PaymentRequest parent)
-
-
Method Detail
-
done
public PaymentRequest done()
-
quantity
public LineItem quantity(int quantity)
-
amount
public LineItem amount(javax.money.MonetaryAmount amount)
-
tax
public LineItem tax(javax.money.MonetaryAmount tax)
-
itemTotal
public LineItem itemTotal(javax.money.MonetaryAmount itemTotal)
-
total
public LineItem total(javax.money.MonetaryAmount total)
-
getParent
public PaymentRequest getParent()
-
getName
public String getName()
-
getDescription
public String getDescription()
-
getShortDescription
public String getShortDescription()
-
getSystemId
public String getSystemId()
-
getCategory
public String getCategory()
-
getQuantity
public int getQuantity()
-
getAmount
public javax.money.MonetaryAmount getAmount()
-
getTax
public javax.money.MonetaryAmount getTax()
-
getItemTotal
public javax.money.MonetaryAmount getItemTotal()
-
getTotal
public javax.money.MonetaryAmount getTotal()
-
-