Package com.clover.sdk.v3.order
Class DisplayLineItem
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.order.DisplayLineItem
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class DisplayLineItem extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DisplayLineItem.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<DisplayLineItem>
CREATOR
static JSONifiable.Creator<DisplayLineItem>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description DisplayLineItem()
Constructs a new empty instance.protected
DisplayLineItem(boolean noInit)
Constructs a new empty instance.DisplayLineItem(DisplayLineItem src)
Constructs a new instance that is a deep copy of the source instance.DisplayLineItem(String json)
Constructs a new instance from the given JSON String.DisplayLineItem(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAlternateName()
Clears the 'alternateName' field, the 'has' method for this field will now return falsevoid
clearBinName()
Clears the 'binName' field, the 'has' method for this field will now return falsevoid
clearDiscountAmount()
Clears the 'discountAmount' field, the 'has' method for this field will now return falsevoid
clearDiscounts()
Clears the 'discounts' field, the 'has' method for this field will now return falsevoid
clearExchanged()
Clears the 'exchanged' field, the 'has' method for this field will now return falsevoid
clearExchangedAmount()
Clears the 'exchangedAmount' field, the 'has' method for this field will now return falsevoid
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearModifications()
Clears the 'modifications' field, the 'has' method for this field will now return falsevoid
clearName()
Clears the 'name' field, the 'has' method for this field will now return falsevoid
clearNote()
Clears the 'note' field, the 'has' method for this field will now return falsevoid
clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return falsevoid
clearPercent()
Clears the 'percent' field, the 'has' method for this field will now return falsevoid
clearPrice()
Clears the 'price' field, the 'has' method for this field will now return falsevoid
clearPrinted()
Clears the 'printed' field, the 'has' method for this field will now return falsevoid
clearQuantity()
Clears the 'quantity' field, the 'has' method for this field will now return falsevoid
clearRefunded()
Clears the 'refunded' field, the 'has' method for this field will now return falsevoid
clearRefundedAmount()
Clears the 'refundedAmount' field, the 'has' method for this field will now return falsevoid
clearUnitPrice()
Clears the 'unitPrice' field, the 'has' method for this field will now return falsevoid
clearUnitQuantity()
Clears the 'unitQuantity' field, the 'has' method for this field will now return falsevoid
clearUserData()
Clears the 'userData' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.DisplayLineItem
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.String
getAlternateName()
Alternate name of the line itemString
getBinName()
String
getDiscountAmount()
List<DisplayDiscount>
getDiscounts()
Boolean
getExchanged()
String
getExchangedAmount()
Formatted exchanged amountprotected GenericClient
getGenericClient()
String
getId()
Unique identifierJSONObject
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be reflected in this instance and vice-versa.List<DisplayModification>
getModifications()
String
getName()
Line item nameString
getNote()
String
getOrderId()
The order with which the line item is associatedString
getPercent()
String
getPrice()
Formatted total price of the line itemBoolean
getPrinted()
String
getQuantity()
Formatted quantityBoolean
getRefunded()
String
getRefundedAmount()
Formatted refunded amountString
getUnitPrice()
Formatted unit price in cases if applicableString
getUnitQuantity()
Formatted unit quantity - such as 10 @ $1.99/ozString
getUserData()
boolean
hasAlternateName()
Checks whether the 'alternateName' field has been set, however the value could be nullboolean
hasBinName()
Checks whether the 'binName' field has been set, however the value could be nullboolean
hasDiscountAmount()
Checks whether the 'discountAmount' field has been set, however the value could be nullboolean
hasDiscounts()
Checks whether the 'discounts' field has been set, however the value could be nullboolean
hasExchanged()
Checks whether the 'exchanged' field has been set, however the value could be nullboolean
hasExchangedAmount()
Checks whether the 'exchangedAmount' field has been set, however the value could be nullboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasModifications()
Checks whether the 'modifications' field has been set, however the value could be nullboolean
hasName()
Checks whether the 'name' field has been set, however the value could be nullboolean
hasNote()
Checks whether the 'note' field has been set, however the value could be nullboolean
hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be nullboolean
hasPercent()
Checks whether the 'percent' field has been set, however the value could be nullboolean
hasPrice()
Checks whether the 'price' field has been set, however the value could be nullboolean
hasPrinted()
Checks whether the 'printed' field has been set, however the value could be nullboolean
hasQuantity()
Checks whether the 'quantity' field has been set, however the value could be nullboolean
hasRefunded()
Checks whether the 'refunded' field has been set, however the value could be nullboolean
hasRefundedAmount()
Checks whether the 'refundedAmount' field has been set, however the value could be nullboolean
hasUnitPrice()
Checks whether the 'unitPrice' field has been set, however the value could be nullboolean
hasUnitQuantity()
Checks whether the 'unitQuantity' field has been set, however the value could be nullboolean
hasUserData()
Checks whether the 'userData' field has been set, however the value could be nullboolean
isNotEmptyDiscounts()
Checks whether the 'discounts' field is set and is not null and is not emptyboolean
isNotEmptyModifications()
Checks whether the 'modifications' field is set and is not null and is not emptyboolean
isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not nullboolean
isNotNullBinName()
Checks whether the 'binName' field is set and is not nullboolean
isNotNullDiscountAmount()
Checks whether the 'discountAmount' field is set and is not nullboolean
isNotNullDiscounts()
Checks whether the 'discounts' field is set and is not nullboolean
isNotNullExchanged()
Checks whether the 'exchanged' field is set and is not nullboolean
isNotNullExchangedAmount()
Checks whether the 'exchangedAmount' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullModifications()
Checks whether the 'modifications' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullNote()
Checks whether the 'note' field is set and is not nullboolean
isNotNullOrderId()
Checks whether the 'orderId' field is set and is not nullboolean
isNotNullPercent()
Checks whether the 'percent' field is set and is not nullboolean
isNotNullPrice()
Checks whether the 'price' field is set and is not nullboolean
isNotNullPrinted()
Checks whether the 'printed' field is set and is not nullboolean
isNotNullQuantity()
Checks whether the 'quantity' field is set and is not nullboolean
isNotNullRefunded()
Checks whether the 'refunded' field is set and is not nullboolean
isNotNullRefundedAmount()
Checks whether the 'refundedAmount' field is set and is not nullboolean
isNotNullUnitPrice()
Checks whether the 'unitPrice' field is set and is not nullboolean
isNotNullUnitQuantity()
Checks whether the 'unitQuantity' field is set and is not nullboolean
isNotNullUserData()
Checks whether the 'userData' field is set and is not nullvoid
mergeChanges(DisplayLineItem src)
Copy all the changed fields from the given source to this instance.void
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.DisplayLineItem
setAlternateName(String alternateName)
Sets the field 'alternateName'.DisplayLineItem
setBinName(String binName)
Sets the field 'binName'.DisplayLineItem
setDiscountAmount(String discountAmount)
Sets the field 'discountAmount'.DisplayLineItem
setDiscounts(List<DisplayDiscount> discounts)
Sets the field 'discounts'.DisplayLineItem
setExchanged(Boolean exchanged)
Sets the field 'exchanged'.DisplayLineItem
setExchangedAmount(String exchangedAmount)
Sets the field 'exchangedAmount'.DisplayLineItem
setId(String id)
Sets the field 'id'.DisplayLineItem
setModifications(List<DisplayModification> modifications)
Sets the field 'modifications'.DisplayLineItem
setName(String name)
Sets the field 'name'.DisplayLineItem
setNote(String note)
Sets the field 'note'.DisplayLineItem
setOrderId(String orderId)
Sets the field 'orderId'.DisplayLineItem
setPercent(String percent)
Sets the field 'percent'.DisplayLineItem
setPrice(String price)
Sets the field 'price'.DisplayLineItem
setPrinted(Boolean printed)
Sets the field 'printed'.DisplayLineItem
setQuantity(String quantity)
Sets the field 'quantity'.DisplayLineItem
setRefunded(Boolean refunded)
Sets the field 'refunded'.DisplayLineItem
setRefundedAmount(String refundedAmount)
Sets the field 'refundedAmount'.DisplayLineItem
setUnitPrice(String unitPrice)
Sets the field 'unitPrice'.DisplayLineItem
setUnitQuantity(String unitQuantity)
Sets the field 'unitQuantity'.DisplayLineItem
setUserData(String userData)
Sets the field 'userData'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<DisplayLineItem> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<DisplayLineItem> JSON_CREATOR
-
-
Constructor Detail
-
DisplayLineItem
public DisplayLineItem()
Constructs a new empty instance.
-
DisplayLineItem
protected DisplayLineItem(boolean noInit)
Constructs a new empty instance.
-
DisplayLineItem
public DisplayLineItem(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
DisplayLineItem
public DisplayLineItem(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
DisplayLineItem
public DisplayLineItem(DisplayLineItem src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getId
public String getId()
Unique identifier
-
getOrderId
public String getOrderId()
The order with which the line item is associated
-
getName
public String getName()
Line item name
-
getAlternateName
public String getAlternateName()
Alternate name of the line item
-
getPrice
public String getPrice()
Formatted total price of the line item
-
getUnitPrice
public String getUnitPrice()
Formatted unit price in cases if applicable
-
getQuantity
public String getQuantity()
Formatted quantity
-
getUnitQuantity
public String getUnitQuantity()
Formatted unit quantity - such as 10 @ $1.99/oz
-
getNote
public String getNote()
-
getPrinted
public Boolean getPrinted()
-
getBinName
public String getBinName()
-
getUserData
public String getUserData()
-
getDiscounts
public List<DisplayDiscount> getDiscounts()
-
getDiscountAmount
public String getDiscountAmount()
-
getExchanged
public Boolean getExchanged()
-
getExchangedAmount
public String getExchangedAmount()
Formatted exchanged amount
-
getModifications
public List<DisplayModification> getModifications()
-
getRefunded
public Boolean getRefunded()
-
getRefundedAmount
public String getRefundedAmount()
Formatted refunded amount
-
getPercent
public String getPercent()
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
getJSONObject
public JSONObject getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be reflected in this instance and vice-versa.- Specified by:
getJSONObject
in interfaceJSONifiable
-
isNotNullId
public boolean isNotNullId()
Checks whether the 'id' field is set and is not null
-
isNotNullOrderId
public boolean isNotNullOrderId()
Checks whether the 'orderId' field is set and is not null
-
isNotNullName
public boolean isNotNullName()
Checks whether the 'name' field is set and is not null
-
isNotNullAlternateName
public boolean isNotNullAlternateName()
Checks whether the 'alternateName' field is set and is not null
-
isNotNullPrice
public boolean isNotNullPrice()
Checks whether the 'price' field is set and is not null
-
isNotNullUnitPrice
public boolean isNotNullUnitPrice()
Checks whether the 'unitPrice' field is set and is not null
-
isNotNullQuantity
public boolean isNotNullQuantity()
Checks whether the 'quantity' field is set and is not null
-
isNotNullUnitQuantity
public boolean isNotNullUnitQuantity()
Checks whether the 'unitQuantity' field is set and is not null
-
isNotNullNote
public boolean isNotNullNote()
Checks whether the 'note' field is set and is not null
-
isNotNullPrinted
public boolean isNotNullPrinted()
Checks whether the 'printed' field is set and is not null
-
isNotNullBinName
public boolean isNotNullBinName()
Checks whether the 'binName' field is set and is not null
-
isNotNullUserData
public boolean isNotNullUserData()
Checks whether the 'userData' field is set and is not null
-
isNotNullDiscounts
public boolean isNotNullDiscounts()
Checks whether the 'discounts' field is set and is not null
-
isNotEmptyDiscounts
public boolean isNotEmptyDiscounts()
Checks whether the 'discounts' field is set and is not null and is not empty
-
isNotNullDiscountAmount
public boolean isNotNullDiscountAmount()
Checks whether the 'discountAmount' field is set and is not null
-
isNotNullExchanged
public boolean isNotNullExchanged()
Checks whether the 'exchanged' field is set and is not null
-
isNotNullExchangedAmount
public boolean isNotNullExchangedAmount()
Checks whether the 'exchangedAmount' field is set and is not null
-
isNotNullModifications
public boolean isNotNullModifications()
Checks whether the 'modifications' field is set and is not null
-
isNotEmptyModifications
public boolean isNotEmptyModifications()
Checks whether the 'modifications' field is set and is not null and is not empty
-
isNotNullRefunded
public boolean isNotNullRefunded()
Checks whether the 'refunded' field is set and is not null
-
isNotNullRefundedAmount
public boolean isNotNullRefundedAmount()
Checks whether the 'refundedAmount' field is set and is not null
-
isNotNullPercent
public boolean isNotNullPercent()
Checks whether the 'percent' field is set and is not null
-
hasId
public boolean hasId()
Checks whether the 'id' field has been set, however the value could be null
-
hasOrderId
public boolean hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be null
-
hasName
public boolean hasName()
Checks whether the 'name' field has been set, however the value could be null
-
hasAlternateName
public boolean hasAlternateName()
Checks whether the 'alternateName' field has been set, however the value could be null
-
hasPrice
public boolean hasPrice()
Checks whether the 'price' field has been set, however the value could be null
-
hasUnitPrice
public boolean hasUnitPrice()
Checks whether the 'unitPrice' field has been set, however the value could be null
-
hasQuantity
public boolean hasQuantity()
Checks whether the 'quantity' field has been set, however the value could be null
-
hasUnitQuantity
public boolean hasUnitQuantity()
Checks whether the 'unitQuantity' field has been set, however the value could be null
-
hasNote
public boolean hasNote()
Checks whether the 'note' field has been set, however the value could be null
-
hasPrinted
public boolean hasPrinted()
Checks whether the 'printed' field has been set, however the value could be null
-
hasBinName
public boolean hasBinName()
Checks whether the 'binName' field has been set, however the value could be null
-
hasUserData
public boolean hasUserData()
Checks whether the 'userData' field has been set, however the value could be null
-
hasDiscounts
public boolean hasDiscounts()
Checks whether the 'discounts' field has been set, however the value could be null
-
hasDiscountAmount
public boolean hasDiscountAmount()
Checks whether the 'discountAmount' field has been set, however the value could be null
-
hasExchanged
public boolean hasExchanged()
Checks whether the 'exchanged' field has been set, however the value could be null
-
hasExchangedAmount
public boolean hasExchangedAmount()
Checks whether the 'exchangedAmount' field has been set, however the value could be null
-
hasModifications
public boolean hasModifications()
Checks whether the 'modifications' field has been set, however the value could be null
-
hasRefunded
public boolean hasRefunded()
Checks whether the 'refunded' field has been set, however the value could be null
-
hasRefundedAmount
public boolean hasRefundedAmount()
Checks whether the 'refundedAmount' field has been set, however the value could be null
-
hasPercent
public boolean hasPercent()
Checks whether the 'percent' field has been set, however the value could be null
-
setId
public DisplayLineItem setId(String id)
Sets the field 'id'.
-
setOrderId
public DisplayLineItem setOrderId(String orderId)
Sets the field 'orderId'.
-
setName
public DisplayLineItem setName(String name)
Sets the field 'name'.
-
setAlternateName
public DisplayLineItem setAlternateName(String alternateName)
Sets the field 'alternateName'.
-
setPrice
public DisplayLineItem setPrice(String price)
Sets the field 'price'.
-
setUnitPrice
public DisplayLineItem setUnitPrice(String unitPrice)
Sets the field 'unitPrice'.
-
setQuantity
public DisplayLineItem setQuantity(String quantity)
Sets the field 'quantity'.
-
setUnitQuantity
public DisplayLineItem setUnitQuantity(String unitQuantity)
Sets the field 'unitQuantity'.
-
setNote
public DisplayLineItem setNote(String note)
Sets the field 'note'.
-
setPrinted
public DisplayLineItem setPrinted(Boolean printed)
Sets the field 'printed'.
-
setBinName
public DisplayLineItem setBinName(String binName)
Sets the field 'binName'.
-
setUserData
public DisplayLineItem setUserData(String userData)
Sets the field 'userData'.
-
setDiscounts
public DisplayLineItem setDiscounts(List<DisplayDiscount> discounts)
Sets the field 'discounts'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setDiscountAmount
public DisplayLineItem setDiscountAmount(String discountAmount)
Sets the field 'discountAmount'.
-
setExchanged
public DisplayLineItem setExchanged(Boolean exchanged)
Sets the field 'exchanged'.
-
setExchangedAmount
public DisplayLineItem setExchangedAmount(String exchangedAmount)
Sets the field 'exchangedAmount'.
-
setModifications
public DisplayLineItem setModifications(List<DisplayModification> modifications)
Sets the field 'modifications'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setRefunded
public DisplayLineItem setRefunded(Boolean refunded)
Sets the field 'refunded'.
-
setRefundedAmount
public DisplayLineItem setRefundedAmount(String refundedAmount)
Sets the field 'refundedAmount'.
-
setPercent
public DisplayLineItem setPercent(String percent)
Sets the field 'percent'.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearOrderId
public void clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return false
-
clearName
public void clearName()
Clears the 'name' field, the 'has' method for this field will now return false
-
clearAlternateName
public void clearAlternateName()
Clears the 'alternateName' field, the 'has' method for this field will now return false
-
clearPrice
public void clearPrice()
Clears the 'price' field, the 'has' method for this field will now return false
-
clearUnitPrice
public void clearUnitPrice()
Clears the 'unitPrice' field, the 'has' method for this field will now return false
-
clearQuantity
public void clearQuantity()
Clears the 'quantity' field, the 'has' method for this field will now return false
-
clearUnitQuantity
public void clearUnitQuantity()
Clears the 'unitQuantity' field, the 'has' method for this field will now return false
-
clearNote
public void clearNote()
Clears the 'note' field, the 'has' method for this field will now return false
-
clearPrinted
public void clearPrinted()
Clears the 'printed' field, the 'has' method for this field will now return false
-
clearBinName
public void clearBinName()
Clears the 'binName' field, the 'has' method for this field will now return false
-
clearUserData
public void clearUserData()
Clears the 'userData' field, the 'has' method for this field will now return false
-
clearDiscounts
public void clearDiscounts()
Clears the 'discounts' field, the 'has' method for this field will now return false
-
clearDiscountAmount
public void clearDiscountAmount()
Clears the 'discountAmount' field, the 'has' method for this field will now return false
-
clearExchanged
public void clearExchanged()
Clears the 'exchanged' field, the 'has' method for this field will now return false
-
clearExchangedAmount
public void clearExchangedAmount()
Clears the 'exchangedAmount' field, the 'has' method for this field will now return false
-
clearModifications
public void clearModifications()
Clears the 'modifications' field, the 'has' method for this field will now return false
-
clearRefunded
public void clearRefunded()
Clears the 'refunded' field, the 'has' method for this field will now return false
-
clearRefundedAmount
public void clearRefundedAmount()
Clears the 'refundedAmount' field, the 'has' method for this field will now return false
-
clearPercent
public void clearPercent()
Clears the 'percent' field, the 'has' method for this field will now return false
-
containsChanges
public boolean containsChanges()
Returns true if this instance has any changes.
-
resetChangeLog
public void resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
-
copyChanges
public DisplayLineItem copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(DisplayLineItem src)
Copy all the changed fields from the given source to this instance.
-
-