Package com.clover.sdk.v3.order
Class Order
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.order.Order
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Order extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.The Order object is at the core of Clover’s transaction data. Almost every transaction either creates or updates an Order. When an order is created or updated via one of the Clover SDKs, the order data is automatically synchronized between the Clover Server and the merchant’s Clover devices.
Fields
id
currency
customers
employee
total
externalReferenceId
unpaidBalance
paymentState
title
note
orderType
taxRemoved
isVat
state
manualTransaction
groupLineItems
testMode
payType
createdTime
clientCreatedTime
modifiedTime
deletedTimestamp
serviceCharge
additionalCharges
discounts
lineItems
payments
refunds
credits
voids
preAuths
device
authorizations
merchant
onlineOrder
printGroups
orderFulfillmentEvent
- See Also:
IOrderService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Order.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 String
AUTHORITY
static Parcelable.Creator<Order>
CREATOR
static JSONifiable.Creator<Order>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Order()
Constructs a new empty instance.protected
Order(boolean noInit)
Constructs a new empty instance.Order(Order src)
Constructs a new instance that is a deep copy of the source instance.Order(String json)
Constructs a new instance from the given JSON String.Order(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
clearAdditionalCharges()
Clears the 'additionalCharges' field, the 'has' method for this field will now return falsevoid
clearAuthorizations()
Clears the 'authorizations' field, the 'has' method for this field will now return falsevoid
clearClientCreatedTime()
Clears the 'clientCreatedTime' field, the 'has' method for this field will now return falsevoid
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return falsevoid
clearCredits()
Clears the 'credits' field, the 'has' method for this field will now return falsevoid
clearCurrency()
Clears the 'currency' field, the 'has' method for this field will now return falsevoid
clearCustomers()
Clears the 'customers' field, the 'has' method for this field will now return falsevoid
clearDeletedTimestamp()
Clears the 'deletedTimestamp' field, the 'has' method for this field will now return falsevoid
clearDevice()
Clears the 'device' 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
clearEmployee()
Clears the 'employee' field, the 'has' method for this field will now return falsevoid
clearExternalReferenceId()
Clears the 'externalReferenceId' field, the 'has' method for this field will now return falsevoid
clearGroupLineItems()
Clears the 'groupLineItems' 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
clearIsVat()
Clears the 'isVat' field, the 'has' method for this field will now return falsevoid
clearLineItems()
Clears the 'lineItems' field, the 'has' method for this field will now return falsevoid
clearManualTransaction()
Clears the 'manualTransaction' field, the 'has' method for this field will now return falsevoid
clearMerchant()
Clears the 'merchant' field, the 'has' method for this field will now return falsevoid
clearModifiedTime()
Clears the 'modifiedTime' 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
clearOnlineOrder()
Clears the 'onlineOrder' field, the 'has' method for this field will now return falsevoid
clearOrderFulfillmentEvent()
Clears the 'orderFulfillmentEvent' field, the 'has' method for this field will now return falsevoid
clearOrderType()
Clears the 'orderType' field, the 'has' method for this field will now return falsevoid
clearPayments()
Clears the 'payments' field, the 'has' method for this field will now return falsevoid
clearPaymentState()
Clears the 'paymentState' field, the 'has' method for this field will now return falsevoid
clearPayType()
Clears the 'payType' field, the 'has' method for this field will now return falsevoid
clearPreAuths()
Clears the 'preAuths' field, the 'has' method for this field will now return falsevoid
clearPrintGroups()
Clears the 'printGroups' field, the 'has' method for this field will now return falsevoid
clearRefunds()
Clears the 'refunds' field, the 'has' method for this field will now return falsevoid
clearServiceCharge()
Clears the 'serviceCharge' field, the 'has' method for this field will now return falsevoid
clearState()
Clears the 'state' field, the 'has' method for this field will now return falsevoid
clearTaxRemoved()
Clears the 'taxRemoved' field, the 'has' method for this field will now return falsevoid
clearTestMode()
Clears the 'testMode' field, the 'has' method for this field will now return falsevoid
clearTitle()
Clears the 'title' field, the 'has' method for this field will now return falsevoid
clearTotal()
Clears the 'total' field, the 'has' method for this field will now return falsevoid
clearUnpaidBalance()
Clears the 'unpaidBalance' field, the 'has' method for this field will now return falsevoid
clearVoids()
Clears the 'voids' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.Order
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.List<AdditionalCharge>
getAdditionalCharges()
List<Authorization>
getAuthorizations()
Card authorizations associated with this orderLong
getClientCreatedTime()
The time at which the client created this orderLong
getCreatedTime()
Creation timestampList<Credit>
getCredits()
Credits associated with this order.String
getCurrency()
Currency of this order.List<Customer>
getCustomers()
List of customers associated with this order.Long
getDeletedTimestamp()
Reference
getDevice()
Device which created the order, a 128-bit UUID, not a normal base-13 Clover ID.List<Discount>
getDiscounts()
Amount or percentage discounts applied to the order subtotal.Reference
getEmployee()
The employee who took this orderString
getExternalReferenceId()
External reference id if present in the orderprotected GenericClient
getGenericClient()
Boolean
getGroupLineItems()
Whether similar line items should be grouped together on the receipt that this order generates.String
getId()
Unique identifierBoolean
getIsVat()
This order was created by merchant with VAT enabled.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.List<LineItem>
getLineItems()
Line items associated with this orderBoolean
getManualTransaction()
Whether this order represents a manual transaction.Reference
getMerchant()
Long
getModifiedTime()
Last modified time of the orderString
getNote()
An arbitrary string with information about this order, may be printed on the order receipt and displayed in appsOnlineOrder
getOnlineOrder()
LineItemEvent
getOrderFulfillmentEvent()
Latest order fulfillment event of this order.OrderType
getOrderType()
List<Payment>
getPayments()
Payments that were made for this order.PaymentState
getPaymentState()
Is this order paid or not?PayType
getPayType()
Possible values: SPLIT_GUEST, SPLIT_ITEM, SPLIT_CUSTOM, FULL.List<Payment>
getPreAuths()
Pre-authorizations associated with this orderList<PrintGroup>
getPrintGroups()
Print groups for line items of this order.List<Refund>
getRefunds()
Refunds that were made for this orderServiceCharge
getServiceCharge()
Optional service charge (gratuity) applied to this orderString
getState()
A String generally describing the state of the order.Boolean
getTaxRemoved()
If true then this order should not have taxes applied to itBoolean
getTestMode()
Whether this order was created in test mode.String
getTitle()
Long
getTotal()
Total price of the order in centsLong
getUnpaidBalance()
The net of orders with payment minus the amount collected.List<Payment>
getVoids()
Voided payments associated with this orderboolean
hasAdditionalCharges()
Checks whether the 'additionalCharges' field has been set, however the value could be nullboolean
hasAuthorizations()
Checks whether the 'authorizations' field has been set, however the value could be nullboolean
hasClientCreatedTime()
Checks whether the 'clientCreatedTime' field has been set, however the value could be nullboolean
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be nullboolean
hasCredits()
Checks whether the 'credits' field has been set, however the value could be nullboolean
hasCurrency()
Checks whether the 'currency' field has been set, however the value could be nullboolean
hasCustomers()
Checks whether the 'customers' field has been set, however the value could be nullboolean
hasDeletedTimestamp()
Checks whether the 'deletedTimestamp' field has been set, however the value could be nullboolean
hasDevice()
Checks whether the 'device' 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
hasEmployee()
Checks whether the 'employee' field has been set, however the value could be nullboolean
hasExternalReferenceId()
Checks whether the 'externalReferenceId' field has been set, however the value could be nullboolean
hasGroupLineItems()
Checks whether the 'groupLineItems' 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
hasIsVat()
Checks whether the 'isVat' field has been set, however the value could be nullboolean
hasLineItems()
Checks whether the 'lineItems' field has been set, however the value could be nullboolean
hasManualTransaction()
Checks whether the 'manualTransaction' field has been set, however the value could be nullboolean
hasMerchant()
Checks whether the 'merchant' field has been set, however the value could be nullboolean
hasModifiedTime()
Checks whether the 'modifiedTime' 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
hasOnlineOrder()
Checks whether the 'onlineOrder' field has been set, however the value could be nullboolean
hasOrderFulfillmentEvent()
Checks whether the 'orderFulfillmentEvent' field has been set, however the value could be nullboolean
hasOrderType()
Checks whether the 'orderType' field has been set, however the value could be nullboolean
hasPayments()
Checks whether the 'payments' field has been set, however the value could be nullboolean
hasPaymentState()
Checks whether the 'paymentState' field has been set, however the value could be nullboolean
hasPayType()
Checks whether the 'payType' field has been set, however the value could be nullboolean
hasPreAuths()
Checks whether the 'preAuths' field has been set, however the value could be nullboolean
hasPrintGroups()
Checks whether the 'printGroups' field has been set, however the value could be nullboolean
hasRefunds()
Checks whether the 'refunds' field has been set, however the value could be nullboolean
hasServiceCharge()
Checks whether the 'serviceCharge' field has been set, however the value could be nullboolean
hasState()
Checks whether the 'state' field has been set, however the value could be nullboolean
hasTaxRemoved()
Checks whether the 'taxRemoved' field has been set, however the value could be nullboolean
hasTestMode()
Checks whether the 'testMode' field has been set, however the value could be nullboolean
hasTitle()
Checks whether the 'title' field has been set, however the value could be nullboolean
hasTotal()
Checks whether the 'total' field has been set, however the value could be nullboolean
hasUnpaidBalance()
Checks whether the 'unpaidBalance' field has been set, however the value could be nullboolean
hasVoids()
Checks whether the 'voids' field has been set, however the value could be nullboolean
isNotEmptyAdditionalCharges()
Checks whether the 'additionalCharges' field is set and is not null and is not emptyboolean
isNotEmptyAuthorizations()
Checks whether the 'authorizations' field is set and is not null and is not emptyboolean
isNotEmptyCredits()
Checks whether the 'credits' field is set and is not null and is not emptyboolean
isNotEmptyCustomers()
Checks whether the 'customers' field is set and is not null and is not emptyboolean
isNotEmptyDiscounts()
Checks whether the 'discounts' field is set and is not null and is not emptyboolean
isNotEmptyLineItems()
Checks whether the 'lineItems' field is set and is not null and is not emptyboolean
isNotEmptyPayments()
Checks whether the 'payments' field is set and is not null and is not emptyboolean
isNotEmptyPreAuths()
Checks whether the 'preAuths' field is set and is not null and is not emptyboolean
isNotEmptyPrintGroups()
Checks whether the 'printGroups' field is set and is not null and is not emptyboolean
isNotEmptyRefunds()
Checks whether the 'refunds' field is set and is not null and is not emptyboolean
isNotEmptyVoids()
Checks whether the 'voids' field is set and is not null and is not emptyboolean
isNotNullAdditionalCharges()
Checks whether the 'additionalCharges' field is set and is not nullboolean
isNotNullAuthorizations()
Checks whether the 'authorizations' field is set and is not nullboolean
isNotNullClientCreatedTime()
Checks whether the 'clientCreatedTime' field is set and is not nullboolean
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not nullboolean
isNotNullCredits()
Checks whether the 'credits' field is set and is not nullboolean
isNotNullCurrency()
Checks whether the 'currency' field is set and is not nullboolean
isNotNullCustomers()
Checks whether the 'customers' field is set and is not nullboolean
isNotNullDeletedTimestamp()
Checks whether the 'deletedTimestamp' field is set and is not nullboolean
isNotNullDevice()
Checks whether the 'device' field is set and is not nullboolean
isNotNullDiscounts()
Checks whether the 'discounts' field is set and is not nullboolean
isNotNullEmployee()
Checks whether the 'employee' field is set and is not nullboolean
isNotNullExternalReferenceId()
Checks whether the 'externalReferenceId' field is set and is not nullboolean
isNotNullGroupLineItems()
Checks whether the 'groupLineItems' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullIsVat()
Checks whether the 'isVat' field is set and is not nullboolean
isNotNullLineItems()
Checks whether the 'lineItems' field is set and is not nullboolean
isNotNullManualTransaction()
Checks whether the 'manualTransaction' field is set and is not nullboolean
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not nullboolean
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not nullboolean
isNotNullNote()
Checks whether the 'note' field is set and is not nullboolean
isNotNullOnlineOrder()
Checks whether the 'onlineOrder' field is set and is not nullboolean
isNotNullOrderFulfillmentEvent()
Checks whether the 'orderFulfillmentEvent' field is set and is not nullboolean
isNotNullOrderType()
Checks whether the 'orderType' field is set and is not nullboolean
isNotNullPayments()
Checks whether the 'payments' field is set and is not nullboolean
isNotNullPaymentState()
Checks whether the 'paymentState' field is set and is not nullboolean
isNotNullPayType()
Checks whether the 'payType' field is set and is not nullboolean
isNotNullPreAuths()
Checks whether the 'preAuths' field is set and is not nullboolean
isNotNullPrintGroups()
Checks whether the 'printGroups' field is set and is not nullboolean
isNotNullRefunds()
Checks whether the 'refunds' field is set and is not nullboolean
isNotNullServiceCharge()
Checks whether the 'serviceCharge' field is set and is not nullboolean
isNotNullState()
Checks whether the 'state' field is set and is not nullboolean
isNotNullTaxRemoved()
Checks whether the 'taxRemoved' field is set and is not nullboolean
isNotNullTestMode()
Checks whether the 'testMode' field is set and is not nullboolean
isNotNullTitle()
Checks whether the 'title' field is set and is not nullboolean
isNotNullTotal()
Checks whether the 'total' field is set and is not nullboolean
isNotNullUnpaidBalance()
Checks whether the 'unpaidBalance' field is set and is not nullboolean
isNotNullVoids()
Checks whether the 'voids' field is set and is not nullvoid
mergeChanges(Order 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.Order
setAdditionalCharges(List<AdditionalCharge> additionalCharges)
Sets the field 'additionalCharges'.Order
setAuthorizations(List<Authorization> authorizations)
Sets the field 'authorizations'.Order
setClientCreatedTime(Long clientCreatedTime)
Sets the field 'clientCreatedTime'.Order
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.Order
setCredits(List<Credit> credits)
Sets the field 'credits'.Order
setCurrency(String currency)
Sets the field 'currency'.Order
setCustomers(List<Customer> customers)
Sets the field 'customers'.Order
setDeletedTimestamp(Long deletedTimestamp)
Sets the field 'deletedTimestamp'.Order
setDevice(Reference device)
Sets the field 'device'.Order
setDiscounts(List<Discount> discounts)
Sets the field 'discounts'.Order
setEmployee(Reference employee)
Sets the field 'employee'.Order
setExternalReferenceId(String externalReferenceId)
Sets the field 'externalReferenceId'.Order
setGroupLineItems(Boolean groupLineItems)
Sets the field 'groupLineItems'.Order
setId(String id)
Sets the field 'id'.Order
setIsVat(Boolean isVat)
Sets the field 'isVat'.Order
setLineItems(List<LineItem> lineItems)
Sets the field 'lineItems'.Order
setManualTransaction(Boolean manualTransaction)
Sets the field 'manualTransaction'.Order
setMerchant(Reference merchant)
Sets the field 'merchant'.Order
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.Order
setNote(String note)
Sets the field 'note'.Order
setOnlineOrder(OnlineOrder onlineOrder)
Sets the field 'onlineOrder'.Order
setOrderFulfillmentEvent(LineItemEvent orderFulfillmentEvent)
Sets the field 'orderFulfillmentEvent'.Order
setOrderType(OrderType orderType)
Sets the field 'orderType'.Order
setPayments(List<Payment> payments)
Sets the field 'payments'.Order
setPaymentState(PaymentState paymentState)
Sets the field 'paymentState'.Order
setPayType(PayType payType)
Sets the field 'payType'.Order
setPreAuths(List<Payment> preAuths)
Sets the field 'preAuths'.Order
setPrintGroups(List<PrintGroup> printGroups)
Sets the field 'printGroups'.Order
setRefunds(List<Refund> refunds)
Sets the field 'refunds'.Order
setServiceCharge(ServiceCharge serviceCharge)
Sets the field 'serviceCharge'.Order
setState(String state)
Sets the field 'state'.Order
setTaxRemoved(Boolean taxRemoved)
Sets the field 'taxRemoved'.Order
setTestMode(Boolean testMode)
Sets the field 'testMode'.Order
setTitle(String title)
Sets the field 'title'.Order
setTotal(Long total)
Sets the field 'total'.Order
setUnpaidBalance(Long unpaidBalance)
Sets the field 'unpaidBalance'.Order
setVoids(List<Payment> voids)
Sets the field 'voids'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
AUTHORITY
public static final String AUTHORITY
- See Also:
- Constant Field Values
-
CREATOR
public static final Parcelable.Creator<Order> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Order> JSON_CREATOR
-
-
Constructor Detail
-
Order
public Order()
Constructs a new empty instance.
-
Order
protected Order(boolean noInit)
Constructs a new empty instance.
-
Order
public Order(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Order
public Order(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.
-
Order
public Order(Order 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
-
getCurrency
public String getCurrency()
Currency of this order. For example, "USD"
-
getEmployee
public Reference getEmployee()
The employee who took this order
-
getTotal
public Long getTotal()
Total price of the order in cents
-
getExternalReferenceId
public String getExternalReferenceId()
External reference id if present in the order
-
getUnpaidBalance
public Long getUnpaidBalance()
The net of orders with payment minus the amount collected. Includes refunds, manual refunds, tax, tip, service charge, non-revenue items, paid gift card activations and loads and discounts
-
getPaymentState
public PaymentState getPaymentState()
Is this order paid or not?
-
getTitle
public String getTitle()
-
getNote
public String getNote()
An arbitrary string with information about this order, may be printed on the order receipt and displayed in apps
-
getOrderType
public OrderType getOrderType()
-
getTaxRemoved
public Boolean getTaxRemoved()
If true then this order should not have taxes applied to it
-
getIsVat
public Boolean getIsVat()
This order was created by merchant with VAT enabled.
-
getState
public String getState()
A String generally describing the state of the order. If no value is set, the state defaults to null, which indicates a hidden order. A hidden order is not displayed in user interfaces and can only be retrieved by its id. When creating an order via the REST API the value must be manually set to "open". When creating an order via the Android SDK the value must be left empty and the value will be updated to "open" and "locked" automatically when actions such as taking payments and adding line items occur. The state value is not checked or enforced by the Clover server, at this time it is used for visualization purposes only.
-
getManualTransaction
public Boolean getManualTransaction()
Whether this order represents a manual transaction. A manual transaction is a transaction that has an arbitrary amount defined and is not associated with any inventory items. For example, the Clover Sale App and Clover Manual Transaction App create manual transactions. A manual transactions will have a single associated line item to hold the sale amount, but the generated receipt will display this differently to indicate that it is not considered a typical order with inventory items.
-
getGroupLineItems
public Boolean getGroupLineItems()
Whether similar line items should be grouped together on the receipt that this order generates. Item "similarity" is based on items having matching values for a set of properties including price, modifiers, and discounts.
-
getTestMode
public Boolean getTestMode()
Whether this order was created in test mode. Payments made against test orders are not processed. Test mode orders can be deleted from the Orders App on the merchant's device or web dashboard (https://www.clover.com/orders/m/{mId}/orders). They will also be deleted when the device sends a POST to the /v2/merchant/{mId}/orders/delete_all_tests endpoint.
-
getPayType
public PayType getPayType()
Possible values: SPLIT_GUEST, SPLIT_ITEM, SPLIT_CUSTOM, FULL. During the payment flow, if the user chooses to split the payment for this order, this field will be set to one of the SPLIT_* values to indicate how the full amount should be split. If the user chooses to pay for the order in full with one payment, then this field will be FULL.
-
getCreatedTime
public Long getCreatedTime()
Creation timestamp
-
getClientCreatedTime
public Long getClientCreatedTime()
The time at which the client created this order
-
getModifiedTime
public Long getModifiedTime()
Last modified time of the order
-
getDeletedTimestamp
public Long getDeletedTimestamp()
-
getServiceCharge
public ServiceCharge getServiceCharge()
Optional service charge (gratuity) applied to this order
-
getAdditionalCharges
public List<AdditionalCharge> getAdditionalCharges()
-
getDiscounts
public List<Discount> getDiscounts()
Amount or percentage discounts applied to the order subtotal. To retrieve discounts applied to individual items, use the Get all line items for an order endpoint with the discounts field expanded (v3/merchants/{mId}/orders/{orderId}/line_items?expand=discounts).
-
getPayments
public List<Payment> getPayments()
Payments that were made for this order. If multiple payments were made, then the payType field should reflect the method used to split the total amount.
-
getDevice
public Reference getDevice()
Device which created the order, a 128-bit UUID, not a normal base-13 Clover ID.
-
getAuthorizations
public List<Authorization> getAuthorizations()
Card authorizations associated with this order
-
getMerchant
public Reference getMerchant()
-
getOnlineOrder
public OnlineOrder getOnlineOrder()
-
getPrintGroups
public List<PrintGroup> getPrintGroups()
Print groups for line items of this order.
-
getOrderFulfillmentEvent
public LineItemEvent getOrderFulfillmentEvent()
Latest order fulfillment event of this order.
-
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
-
isNotNullCurrency
public boolean isNotNullCurrency()
Checks whether the 'currency' field is set and is not null
-
isNotNullCustomers
public boolean isNotNullCustomers()
Checks whether the 'customers' field is set and is not null
-
isNotEmptyCustomers
public boolean isNotEmptyCustomers()
Checks whether the 'customers' field is set and is not null and is not empty
-
isNotNullEmployee
public boolean isNotNullEmployee()
Checks whether the 'employee' field is set and is not null
-
isNotNullTotal
public boolean isNotNullTotal()
Checks whether the 'total' field is set and is not null
-
isNotNullExternalReferenceId
public boolean isNotNullExternalReferenceId()
Checks whether the 'externalReferenceId' field is set and is not null
-
isNotNullUnpaidBalance
public boolean isNotNullUnpaidBalance()
Checks whether the 'unpaidBalance' field is set and is not null
-
isNotNullPaymentState
public boolean isNotNullPaymentState()
Checks whether the 'paymentState' field is set and is not null
-
isNotNullTitle
public boolean isNotNullTitle()
Checks whether the 'title' field is set and is not null
-
isNotNullNote
public boolean isNotNullNote()
Checks whether the 'note' field is set and is not null
-
isNotNullOrderType
public boolean isNotNullOrderType()
Checks whether the 'orderType' field is set and is not null
-
isNotNullTaxRemoved
public boolean isNotNullTaxRemoved()
Checks whether the 'taxRemoved' field is set and is not null
-
isNotNullIsVat
public boolean isNotNullIsVat()
Checks whether the 'isVat' field is set and is not null
-
isNotNullState
public boolean isNotNullState()
Checks whether the 'state' field is set and is not null
-
isNotNullManualTransaction
public boolean isNotNullManualTransaction()
Checks whether the 'manualTransaction' field is set and is not null
-
isNotNullGroupLineItems
public boolean isNotNullGroupLineItems()
Checks whether the 'groupLineItems' field is set and is not null
-
isNotNullTestMode
public boolean isNotNullTestMode()
Checks whether the 'testMode' field is set and is not null
-
isNotNullPayType
public boolean isNotNullPayType()
Checks whether the 'payType' field is set and is not null
-
isNotNullCreatedTime
public boolean isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
-
isNotNullClientCreatedTime
public boolean isNotNullClientCreatedTime()
Checks whether the 'clientCreatedTime' field is set and is not null
-
isNotNullModifiedTime
public boolean isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
-
isNotNullDeletedTimestamp
public boolean isNotNullDeletedTimestamp()
Checks whether the 'deletedTimestamp' field is set and is not null
-
isNotNullServiceCharge
public boolean isNotNullServiceCharge()
Checks whether the 'serviceCharge' field is set and is not null
-
isNotNullAdditionalCharges
public boolean isNotNullAdditionalCharges()
Checks whether the 'additionalCharges' field is set and is not null
-
isNotEmptyAdditionalCharges
public boolean isNotEmptyAdditionalCharges()
Checks whether the 'additionalCharges' field is set and is not null and is not empty
-
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
-
isNotNullLineItems
public boolean isNotNullLineItems()
Checks whether the 'lineItems' field is set and is not null
-
isNotEmptyLineItems
public boolean isNotEmptyLineItems()
Checks whether the 'lineItems' field is set and is not null and is not empty
-
isNotNullPayments
public boolean isNotNullPayments()
Checks whether the 'payments' field is set and is not null
-
isNotEmptyPayments
public boolean isNotEmptyPayments()
Checks whether the 'payments' field is set and is not null and is not empty
-
isNotNullRefunds
public boolean isNotNullRefunds()
Checks whether the 'refunds' field is set and is not null
-
isNotEmptyRefunds
public boolean isNotEmptyRefunds()
Checks whether the 'refunds' field is set and is not null and is not empty
-
isNotNullCredits
public boolean isNotNullCredits()
Checks whether the 'credits' field is set and is not null
-
isNotEmptyCredits
public boolean isNotEmptyCredits()
Checks whether the 'credits' field is set and is not null and is not empty
-
isNotNullVoids
public boolean isNotNullVoids()
Checks whether the 'voids' field is set and is not null
-
isNotEmptyVoids
public boolean isNotEmptyVoids()
Checks whether the 'voids' field is set and is not null and is not empty
-
isNotNullPreAuths
public boolean isNotNullPreAuths()
Checks whether the 'preAuths' field is set and is not null
-
isNotEmptyPreAuths
public boolean isNotEmptyPreAuths()
Checks whether the 'preAuths' field is set and is not null and is not empty
-
isNotNullDevice
public boolean isNotNullDevice()
Checks whether the 'device' field is set and is not null
-
isNotNullAuthorizations
public boolean isNotNullAuthorizations()
Checks whether the 'authorizations' field is set and is not null
-
isNotEmptyAuthorizations
public boolean isNotEmptyAuthorizations()
Checks whether the 'authorizations' field is set and is not null and is not empty
-
isNotNullMerchant
public boolean isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
-
isNotNullOnlineOrder
public boolean isNotNullOnlineOrder()
Checks whether the 'onlineOrder' field is set and is not null
-
isNotNullPrintGroups
public boolean isNotNullPrintGroups()
Checks whether the 'printGroups' field is set and is not null
-
isNotEmptyPrintGroups
public boolean isNotEmptyPrintGroups()
Checks whether the 'printGroups' field is set and is not null and is not empty
-
isNotNullOrderFulfillmentEvent
public boolean isNotNullOrderFulfillmentEvent()
Checks whether the 'orderFulfillmentEvent' 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
-
hasCurrency
public boolean hasCurrency()
Checks whether the 'currency' field has been set, however the value could be null
-
hasCustomers
public boolean hasCustomers()
Checks whether the 'customers' field has been set, however the value could be null
-
hasEmployee
public boolean hasEmployee()
Checks whether the 'employee' field has been set, however the value could be null
-
hasTotal
public boolean hasTotal()
Checks whether the 'total' field has been set, however the value could be null
-
hasExternalReferenceId
public boolean hasExternalReferenceId()
Checks whether the 'externalReferenceId' field has been set, however the value could be null
-
hasUnpaidBalance
public boolean hasUnpaidBalance()
Checks whether the 'unpaidBalance' field has been set, however the value could be null
-
hasPaymentState
public boolean hasPaymentState()
Checks whether the 'paymentState' field has been set, however the value could be null
-
hasTitle
public boolean hasTitle()
Checks whether the 'title' 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
-
hasOrderType
public boolean hasOrderType()
Checks whether the 'orderType' field has been set, however the value could be null
-
hasTaxRemoved
public boolean hasTaxRemoved()
Checks whether the 'taxRemoved' field has been set, however the value could be null
-
hasIsVat
public boolean hasIsVat()
Checks whether the 'isVat' field has been set, however the value could be null
-
hasState
public boolean hasState()
Checks whether the 'state' field has been set, however the value could be null
-
hasManualTransaction
public boolean hasManualTransaction()
Checks whether the 'manualTransaction' field has been set, however the value could be null
-
hasGroupLineItems
public boolean hasGroupLineItems()
Checks whether the 'groupLineItems' field has been set, however the value could be null
-
hasTestMode
public boolean hasTestMode()
Checks whether the 'testMode' field has been set, however the value could be null
-
hasPayType
public boolean hasPayType()
Checks whether the 'payType' field has been set, however the value could be null
-
hasCreatedTime
public boolean hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
-
hasClientCreatedTime
public boolean hasClientCreatedTime()
Checks whether the 'clientCreatedTime' field has been set, however the value could be null
-
hasModifiedTime
public boolean hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
-
hasDeletedTimestamp
public boolean hasDeletedTimestamp()
Checks whether the 'deletedTimestamp' field has been set, however the value could be null
-
hasServiceCharge
public boolean hasServiceCharge()
Checks whether the 'serviceCharge' field has been set, however the value could be null
-
hasAdditionalCharges
public boolean hasAdditionalCharges()
Checks whether the 'additionalCharges' 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
-
hasLineItems
public boolean hasLineItems()
Checks whether the 'lineItems' field has been set, however the value could be null
-
hasPayments
public boolean hasPayments()
Checks whether the 'payments' field has been set, however the value could be null
-
hasRefunds
public boolean hasRefunds()
Checks whether the 'refunds' field has been set, however the value could be null
-
hasCredits
public boolean hasCredits()
Checks whether the 'credits' field has been set, however the value could be null
-
hasVoids
public boolean hasVoids()
Checks whether the 'voids' field has been set, however the value could be null
-
hasPreAuths
public boolean hasPreAuths()
Checks whether the 'preAuths' field has been set, however the value could be null
-
hasDevice
public boolean hasDevice()
Checks whether the 'device' field has been set, however the value could be null
-
hasAuthorizations
public boolean hasAuthorizations()
Checks whether the 'authorizations' field has been set, however the value could be null
-
hasMerchant
public boolean hasMerchant()
Checks whether the 'merchant' field has been set, however the value could be null
-
hasOnlineOrder
public boolean hasOnlineOrder()
Checks whether the 'onlineOrder' field has been set, however the value could be null
-
hasPrintGroups
public boolean hasPrintGroups()
Checks whether the 'printGroups' field has been set, however the value could be null
-
hasOrderFulfillmentEvent
public boolean hasOrderFulfillmentEvent()
Checks whether the 'orderFulfillmentEvent' field has been set, however the value could be null
-
setCustomers
public Order setCustomers(List<Customer> customers)
Sets the field 'customers'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setEmployee
public Order setEmployee(Reference employee)
Sets the field 'employee'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setExternalReferenceId
public Order setExternalReferenceId(String externalReferenceId)
Sets the field 'externalReferenceId'.
-
setPaymentState
public Order setPaymentState(PaymentState paymentState)
Sets the field 'paymentState'.
-
setOrderType
public Order setOrderType(OrderType orderType)
Sets the field 'orderType'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setManualTransaction
public Order setManualTransaction(Boolean manualTransaction)
Sets the field 'manualTransaction'.
-
setGroupLineItems
public Order setGroupLineItems(Boolean groupLineItems)
Sets the field 'groupLineItems'.
-
setClientCreatedTime
public Order setClientCreatedTime(Long clientCreatedTime)
Sets the field 'clientCreatedTime'.
-
setDeletedTimestamp
public Order setDeletedTimestamp(Long deletedTimestamp)
Sets the field 'deletedTimestamp'.
-
setServiceCharge
public Order setServiceCharge(ServiceCharge serviceCharge)
Sets the field 'serviceCharge'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setAdditionalCharges
public Order setAdditionalCharges(List<AdditionalCharge> additionalCharges)
Sets the field 'additionalCharges'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setDiscounts
public Order setDiscounts(List<Discount> 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.
-
setLineItems
public Order setLineItems(List<LineItem> lineItems)
Sets the field 'lineItems'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setPayments
public Order setPayments(List<Payment> payments)
Sets the field 'payments'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setRefunds
public Order setRefunds(List<Refund> refunds)
Sets the field 'refunds'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setCredits
public Order setCredits(List<Credit> credits)
Sets the field 'credits'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setVoids
public Order setVoids(List<Payment> voids)
Sets the field 'voids'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setPreAuths
public Order setPreAuths(List<Payment> preAuths)
Sets the field 'preAuths'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setDevice
public Order setDevice(Reference device)
Sets the field 'device'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setAuthorizations
public Order setAuthorizations(List<Authorization> authorizations)
Sets the field 'authorizations'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setMerchant
public Order setMerchant(Reference merchant)
Sets the field 'merchant'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setOnlineOrder
public Order setOnlineOrder(OnlineOrder onlineOrder)
Sets the field 'onlineOrder'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setPrintGroups
public Order setPrintGroups(List<PrintGroup> printGroups)
Sets the field 'printGroups'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setOrderFulfillmentEvent
public Order setOrderFulfillmentEvent(LineItemEvent orderFulfillmentEvent)
Sets the field 'orderFulfillmentEvent'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearCurrency
public void clearCurrency()
Clears the 'currency' field, the 'has' method for this field will now return false
-
clearCustomers
public void clearCustomers()
Clears the 'customers' field, the 'has' method for this field will now return false
-
clearEmployee
public void clearEmployee()
Clears the 'employee' field, the 'has' method for this field will now return false
-
clearTotal
public void clearTotal()
Clears the 'total' field, the 'has' method for this field will now return false
-
clearExternalReferenceId
public void clearExternalReferenceId()
Clears the 'externalReferenceId' field, the 'has' method for this field will now return false
-
clearUnpaidBalance
public void clearUnpaidBalance()
Clears the 'unpaidBalance' field, the 'has' method for this field will now return false
-
clearPaymentState
public void clearPaymentState()
Clears the 'paymentState' field, the 'has' method for this field will now return false
-
clearTitle
public void clearTitle()
Clears the 'title' 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
-
clearOrderType
public void clearOrderType()
Clears the 'orderType' field, the 'has' method for this field will now return false
-
clearTaxRemoved
public void clearTaxRemoved()
Clears the 'taxRemoved' field, the 'has' method for this field will now return false
-
clearIsVat
public void clearIsVat()
Clears the 'isVat' field, the 'has' method for this field will now return false
-
clearState
public void clearState()
Clears the 'state' field, the 'has' method for this field will now return false
-
clearManualTransaction
public void clearManualTransaction()
Clears the 'manualTransaction' field, the 'has' method for this field will now return false
-
clearGroupLineItems
public void clearGroupLineItems()
Clears the 'groupLineItems' field, the 'has' method for this field will now return false
-
clearTestMode
public void clearTestMode()
Clears the 'testMode' field, the 'has' method for this field will now return false
-
clearPayType
public void clearPayType()
Clears the 'payType' field, the 'has' method for this field will now return false
-
clearCreatedTime
public void clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
-
clearClientCreatedTime
public void clearClientCreatedTime()
Clears the 'clientCreatedTime' field, the 'has' method for this field will now return false
-
clearModifiedTime
public void clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
-
clearDeletedTimestamp
public void clearDeletedTimestamp()
Clears the 'deletedTimestamp' field, the 'has' method for this field will now return false
-
clearServiceCharge
public void clearServiceCharge()
Clears the 'serviceCharge' field, the 'has' method for this field will now return false
-
clearAdditionalCharges
public void clearAdditionalCharges()
Clears the 'additionalCharges' 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
-
clearLineItems
public void clearLineItems()
Clears the 'lineItems' field, the 'has' method for this field will now return false
-
clearPayments
public void clearPayments()
Clears the 'payments' field, the 'has' method for this field will now return false
-
clearRefunds
public void clearRefunds()
Clears the 'refunds' field, the 'has' method for this field will now return false
-
clearCredits
public void clearCredits()
Clears the 'credits' field, the 'has' method for this field will now return false
-
clearVoids
public void clearVoids()
Clears the 'voids' field, the 'has' method for this field will now return false
-
clearPreAuths
public void clearPreAuths()
Clears the 'preAuths' field, the 'has' method for this field will now return false
-
clearDevice
public void clearDevice()
Clears the 'device' field, the 'has' method for this field will now return false
-
clearAuthorizations
public void clearAuthorizations()
Clears the 'authorizations' field, the 'has' method for this field will now return false
-
clearMerchant
public void clearMerchant()
Clears the 'merchant' field, the 'has' method for this field will now return false
-
clearOnlineOrder
public void clearOnlineOrder()
Clears the 'onlineOrder' field, the 'has' method for this field will now return false
-
clearPrintGroups
public void clearPrintGroups()
Clears the 'printGroups' field, the 'has' method for this field will now return false
-
clearOrderFulfillmentEvent
public void clearOrderFulfillmentEvent()
Clears the 'orderFulfillmentEvent' 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 Order copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Order src)
Copy all the changed fields from the given source to this instance.
-
-