public class OnlineOrder extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
OnlineOrder.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<OnlineOrder> |
CREATOR |
static JSONifiable.Creator<OnlineOrder> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
OnlineOrder()
Constructs a new empty instance.
|
protected |
OnlineOrder(boolean noInit)
Constructs a new empty instance.
|
|
OnlineOrder(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.
|
|
OnlineOrder(OnlineOrder src)
Constructs a new instance that is a deep copy of the source instance.
|
|
OnlineOrder(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearDeletedTime()
Clears the 'deletedTime' field, the 'has' method for this field will now return false
|
void |
clearDeliverTime()
Clears the 'deliverTime' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearLeadTime()
Clears the 'leadTime' field, the 'has' method for this field will now return false
|
void |
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
|
void |
clearNote()
Clears the 'note' field, the 'has' method for this field will now return false
|
void |
clearOnlineOrderCustomer()
Clears the 'onlineOrderCustomer' field, the 'has' method for this field will now return false
|
void |
clearOnlineOrderId()
Clears the 'onlineOrderId' field, the 'has' method for this field will now return false
|
void |
clearOrderState()
Clears the 'orderState' field, the 'has' method for this field will now return false
|
void |
clearProvider()
Clears the 'provider' field, the 'has' method for this field will now return false
|
void |
clearProviderId()
Clears the 'providerId' field, the 'has' method for this field will now return false
|
void |
clearReason()
Clears the 'reason' field, the 'has' method for this field will now return false
|
void |
clearReceiptId()
Clears the 'receiptId' field, the 'has' method for this field will now return false
|
void |
clearScheduled()
Clears the 'scheduled' field, the 'has' method for this field will now return false
|
void |
clearScheduledPickupTime()
Clears the 'scheduledPickupTime' field, the 'has' method for this field will now return false
|
void |
clearService()
Clears the 'service' field, the 'has' method for this field will now return false
|
void |
clearServiceFee()
Clears the 'serviceFee' field, the 'has' method for this field will now return false
|
void |
clearServiceFeeItem()
Clears the 'serviceFeeItem' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
OnlineOrder |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getCreatedTime()
Timestamp when the online ordering item was created
|
Long |
getDeletedTime()
Timestamp when online ordering item was last deleted
|
Long |
getDeliverTime()
The timestamp the order gets delivered
|
protected GenericClient |
getGenericClient() |
String |
getId()
order id
|
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.
|
Integer |
getLeadTime()
Minutes of the lead time which overrides the default lead time
|
Long |
getModifiedTime()
Timestamp when the online ordering item was last modified
|
String |
getNote()
An arbitrary string with information about this online order from customer to merchant, may be printed on the order receipt and displayed in apps
|
OnlineOrderCustomer |
getOnlineOrderCustomer()
the customer who submitted the order request from provider
|
String |
getOnlineOrderId()
Online Order id
|
OrderState |
getOrderState()
online order status
|
Reference |
getProvider()
online order provider
|
ProviderId |
getProviderId()
Deprecated, please ignore.
|
Reason |
getReason()
The reason the online order gets rejected or cancelled
|
String |
getReceiptId()
Receipt id
|
Boolean |
getScheduled()
If the online order is a scheduled order or ASAP order
|
Long |
getScheduledPickupTime()
The timestamp the order is scheduled to be picked up
|
Reference |
getService()
online order service
|
Long |
getServiceFee()
amount of the service fee for the fulfillment service, such as delivery fee
|
Reference |
getServiceFeeItem() |
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasDeletedTime()
Checks whether the 'deletedTime' field has been set, however the value could be null
|
boolean |
hasDeliverTime()
Checks whether the 'deliverTime' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasLeadTime()
Checks whether the 'leadTime' field has been set, however the value could be null
|
boolean |
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
|
boolean |
hasNote()
Checks whether the 'note' field has been set, however the value could be null
|
boolean |
hasOnlineOrderCustomer()
Checks whether the 'onlineOrderCustomer' field has been set, however the value could be null
|
boolean |
hasOnlineOrderId()
Checks whether the 'onlineOrderId' field has been set, however the value could be null
|
boolean |
hasOrderState()
Checks whether the 'orderState' field has been set, however the value could be null
|
boolean |
hasProvider()
Checks whether the 'provider' field has been set, however the value could be null
|
boolean |
hasProviderId()
Checks whether the 'providerId' field has been set, however the value could be null
|
boolean |
hasReason()
Checks whether the 'reason' field has been set, however the value could be null
|
boolean |
hasReceiptId()
Checks whether the 'receiptId' field has been set, however the value could be null
|
boolean |
hasScheduled()
Checks whether the 'scheduled' field has been set, however the value could be null
|
boolean |
hasScheduledPickupTime()
Checks whether the 'scheduledPickupTime' field has been set, however the value could be null
|
boolean |
hasService()
Checks whether the 'service' field has been set, however the value could be null
|
boolean |
hasServiceFee()
Checks whether the 'serviceFee' field has been set, however the value could be null
|
boolean |
hasServiceFeeItem()
Checks whether the 'serviceFeeItem' field has been set, however the value could be null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not null
|
boolean |
isNotNullDeliverTime()
Checks whether the 'deliverTime' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullLeadTime()
Checks whether the 'leadTime' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullNote()
Checks whether the 'note' field is set and is not null
|
boolean |
isNotNullOnlineOrderCustomer()
Checks whether the 'onlineOrderCustomer' field is set and is not null
|
boolean |
isNotNullOnlineOrderId()
Checks whether the 'onlineOrderId' field is set and is not null
|
boolean |
isNotNullOrderState()
Checks whether the 'orderState' field is set and is not null
|
boolean |
isNotNullProvider()
Checks whether the 'provider' field is set and is not null
|
boolean |
isNotNullProviderId()
Checks whether the 'providerId' field is set and is not null
|
boolean |
isNotNullReason()
Checks whether the 'reason' field is set and is not null
|
boolean |
isNotNullReceiptId()
Checks whether the 'receiptId' field is set and is not null
|
boolean |
isNotNullScheduled()
Checks whether the 'scheduled' field is set and is not null
|
boolean |
isNotNullScheduledPickupTime()
Checks whether the 'scheduledPickupTime' field is set and is not null
|
boolean |
isNotNullService()
Checks whether the 'service' field is set and is not null
|
boolean |
isNotNullServiceFee()
Checks whether the 'serviceFee' field is set and is not null
|
boolean |
isNotNullServiceFeeItem()
Checks whether the 'serviceFeeItem' field is set and is not null
|
void |
mergeChanges(OnlineOrder 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.
|
OnlineOrder |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
OnlineOrder |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
OnlineOrder |
setDeliverTime(Long deliverTime)
Sets the field 'deliverTime'.
|
OnlineOrder |
setId(String id)
Sets the field 'id'.
|
OnlineOrder |
setLeadTime(Integer leadTime)
Sets the field 'leadTime'.
|
OnlineOrder |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
OnlineOrder |
setNote(String note)
Sets the field 'note'.
|
OnlineOrder |
setOnlineOrderCustomer(OnlineOrderCustomer onlineOrderCustomer)
Sets the field 'onlineOrderCustomer'.
|
OnlineOrder |
setOnlineOrderId(String onlineOrderId)
Sets the field 'onlineOrderId'.
|
OnlineOrder |
setOrderState(OrderState orderState)
Sets the field 'orderState'.
|
OnlineOrder |
setProvider(Reference provider)
Sets the field 'provider'.
|
OnlineOrder |
setProviderId(ProviderId providerId)
Sets the field 'providerId'.
|
OnlineOrder |
setReason(Reason reason)
Sets the field 'reason'.
|
OnlineOrder |
setReceiptId(String receiptId)
Sets the field 'receiptId'.
|
OnlineOrder |
setScheduled(Boolean scheduled)
Sets the field 'scheduled'.
|
OnlineOrder |
setScheduledPickupTime(Long scheduledPickupTime)
Sets the field 'scheduledPickupTime'.
|
OnlineOrder |
setService(Reference service)
Sets the field 'service'.
|
OnlineOrder |
setServiceFee(Long serviceFee)
Sets the field 'serviceFee'.
|
OnlineOrder |
setServiceFeeItem(Reference serviceFeeItem)
Sets the field 'serviceFeeItem'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<OnlineOrder> CREATOR
public static final JSONifiable.Creator<OnlineOrder> JSON_CREATOR
public OnlineOrder()
protected OnlineOrder(boolean noInit)
public OnlineOrder(String json) throws IllegalArgumentException
IllegalArgumentException
public OnlineOrder(JSONObject jsonObject)
public OnlineOrder(OnlineOrder src)
public String getId()
public String getOnlineOrderId()
public String getReceiptId()
public Reference getService()
public Reference getProvider()
public ProviderId getProviderId()
public OrderState getOrderState()
public OnlineOrderCustomer getOnlineOrderCustomer()
public Long getDeliverTime()
public Integer getLeadTime()
public Long getScheduledPickupTime()
public Reason getReason()
public String getNote()
public Boolean getScheduled()
public Long getServiceFee()
public Reference getServiceFeeItem()
public Long getCreatedTime()
public Long getModifiedTime()
public Long getDeletedTime()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullOnlineOrderId()
public boolean isNotNullReceiptId()
public boolean isNotNullService()
public boolean isNotNullProvider()
public boolean isNotNullProviderId()
public boolean isNotNullOrderState()
public boolean isNotNullOnlineOrderCustomer()
public boolean isNotNullDeliverTime()
public boolean isNotNullLeadTime()
public boolean isNotNullScheduledPickupTime()
public boolean isNotNullReason()
public boolean isNotNullNote()
public boolean isNotNullScheduled()
public boolean isNotNullServiceFee()
public boolean isNotNullServiceFeeItem()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullDeletedTime()
public boolean hasId()
public boolean hasOnlineOrderId()
public boolean hasReceiptId()
public boolean hasService()
public boolean hasProvider()
public boolean hasProviderId()
public boolean hasOrderState()
public boolean hasOnlineOrderCustomer()
public boolean hasDeliverTime()
public boolean hasLeadTime()
public boolean hasScheduledPickupTime()
public boolean hasReason()
public boolean hasNote()
public boolean hasScheduled()
public boolean hasServiceFee()
public boolean hasServiceFeeItem()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasDeletedTime()
public OnlineOrder setId(String id)
public OnlineOrder setOnlineOrderId(String onlineOrderId)
public OnlineOrder setReceiptId(String receiptId)
public OnlineOrder setService(Reference service)
public OnlineOrder setProvider(Reference provider)
public OnlineOrder setProviderId(ProviderId providerId)
public OnlineOrder setOrderState(OrderState orderState)
public OnlineOrder setOnlineOrderCustomer(OnlineOrderCustomer onlineOrderCustomer)
public OnlineOrder setDeliverTime(Long deliverTime)
public OnlineOrder setLeadTime(Integer leadTime)
public OnlineOrder setScheduledPickupTime(Long scheduledPickupTime)
public OnlineOrder setReason(Reason reason)
public OnlineOrder setNote(String note)
public OnlineOrder setScheduled(Boolean scheduled)
public OnlineOrder setServiceFee(Long serviceFee)
public OnlineOrder setServiceFeeItem(Reference serviceFeeItem)
public OnlineOrder setCreatedTime(Long createdTime)
public OnlineOrder setModifiedTime(Long modifiedTime)
public OnlineOrder setDeletedTime(Long deletedTime)
public void clearId()
public void clearOnlineOrderId()
public void clearReceiptId()
public void clearService()
public void clearProvider()
public void clearProviderId()
public void clearOrderState()
public void clearOnlineOrderCustomer()
public void clearDeliverTime()
public void clearLeadTime()
public void clearScheduledPickupTime()
public void clearReason()
public void clearNote()
public void clearScheduled()
public void clearServiceFee()
public void clearServiceFeeItem()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearDeletedTime()
public boolean containsChanges()
public void resetChangeLog()
public OnlineOrder copyChanges()
public void mergeChanges(OnlineOrder src)