public class

InvoiceItem

extends PayPalRetailObject
java.lang.Object
   ↳ PayPalRetailObject
     ↳ com.paypal.paypalretailsdk.InvoiceItem

Class Overview

A line item on an invoice. Can be positive, negative, or zero total/unit price. See https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_InvoicingAPIGuide.pdf for details on field length restrictions and formats.

Summary

Public Methods
BigDecimal discountAmountForDisplay()
Returns a decimal for the discount amount for this item, regardless of if it's specified as an amount or percentage.
InvoiceItem duplicate()
Create a true copy / duplicate of an item.
Date getDate()
Date on which the item or service was provided
String getDetailId()
A secondary unique identifier (e.g.
BigDecimal getDiscountAmount()
A flat amount discount for this line item
BigDecimal getDiscountPercentage()
A percentage discount for this line item
String getImageURL()
Image url of the item.
String getItemDescription()
A description for this line item
Integer getItemId()
A unique identifier for this item - not currently saved to the server but used for local uniqueness such that one line item per itemId.detailId pair will be stored on an invoice @readonly
String getName()
The name of this item
BigDecimal getQuantity()
The quantity of this item - up to three decimals
String getTaxName()
The name for the tax rate applied to this item, if any
BigDecimal getTaxRate()
The tax rate to be applied to this item.
String getUnitOfMeasure()
Unit of measure of the item being invoiced.
BigDecimal getUnitPrice()
The price of 1 unit of this item
Boolean isEqualToItem(InvoiceItem item)
check if an item is equal to this
void setDate(Date value)
Date on which the item or service was provided
void setDiscountAmount(BigDecimal value)
A flat amount discount for this line item
void setDiscountPercentage(BigDecimal value)
A percentage discount for this line item
void setImageURL(String value)
Image url of the item.
void setItemDescription(String value)
A description for this line item
void setName(String value)
The name of this item
void setQuantity(BigDecimal value)
The quantity of this item - up to three decimals
void setTaxName(String value)
The name for the tax rate applied to this item, if any
void setTaxRate(BigDecimal value)
The tax rate to be applied to this item.
void setUnitOfMeasure(String value)
Unit of measure of the item being invoiced.
void setUnitPrice(BigDecimal value)
The price of 1 unit of this item
String toString()
Returns a string representing the serialized state of the InvoiceItem object
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public BigDecimal discountAmountForDisplay ()

Returns a decimal for the discount amount for this item, regardless of if it's specified as an amount or percentage.

public InvoiceItem duplicate ()

Create a true copy / duplicate of an item. This is named duplicate instead of copy to avoid code gen issues on iOS

public Date getDate ()

Date on which the item or service was provided

public String getDetailId ()

A secondary unique identifier (e.g. for item options or sizes, or to create multiple items on the same invoice with a single detailId) @readonly

public BigDecimal getDiscountAmount ()

A flat amount discount for this line item

public BigDecimal getDiscountPercentage ()

A percentage discount for this line item

public String getImageURL ()

Image url of the item. 4000 characters max.

public String getItemDescription ()

A description for this line item

public Integer getItemId ()

A unique identifier for this item - not currently saved to the server but used for local uniqueness such that one line item per itemId.detailId pair will be stored on an invoice @readonly

public String getName ()

The name of this item

public BigDecimal getQuantity ()

The quantity of this item - up to three decimals

public String getTaxName ()

The name for the tax rate applied to this item, if any

public BigDecimal getTaxRate ()

The tax rate to be applied to this item. If non-zero, the taxName must also be set.

public String getUnitOfMeasure ()

Unit of measure of the item being invoiced.

public BigDecimal getUnitPrice ()

The price of 1 unit of this item

public Boolean isEqualToItem (InvoiceItem item)

check if an item is equal to this

public void setDate (Date value)

Date on which the item or service was provided

public void setDiscountAmount (BigDecimal value)

A flat amount discount for this line item

public void setDiscountPercentage (BigDecimal value)

A percentage discount for this line item

public void setImageURL (String value)

Image url of the item. 4000 characters max.

public void setItemDescription (String value)

A description for this line item

public void setName (String value)

The name of this item

public void setQuantity (BigDecimal value)

The quantity of this item - up to three decimals

public void setTaxName (String value)

The name for the tax rate applied to this item, if any

public void setTaxRate (BigDecimal value)

The tax rate to be applied to this item. If non-zero, the taxName must also be set.

public void setUnitOfMeasure (String value)

Unit of measure of the item being invoiced.

public void setUnitPrice (BigDecimal value)

The price of 1 unit of this item

public String toString ()

Returns a string representing the serialized state of the InvoiceItem object