Package com.clover.sdk.v3.payments
Class Transaction
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.Transaction
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Transaction 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
Transaction.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<Transaction>
CREATOR
static JSONifiable.Creator<Transaction>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Transaction()
Constructs a new empty instance.protected
Transaction(boolean noInit)
Constructs a new empty instance.Transaction(Transaction src)
Constructs a new instance that is a deep copy of the source instance.Transaction(String json)
Constructs a new instance from the given JSON String.Transaction(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
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
clearCredit()
Clears the 'credit' field, the 'has' method for this field will now return falsevoid
clearCreditRefund()
Clears the 'creditRefund' field, the 'has' method for this field will now return falsevoid
clearPayment()
Clears the 'payment' field, the 'has' method for this field will now return falsevoid
clearRefund()
Clears the 'refund' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.Transaction
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getClientCreatedTime()
The time when the transaction was recorded on the clientLong
getCreatedTime()
The time when the transaction was recorded on the serverCredit
getCredit()
CreditRefund
getCreditRefund()
protected GenericClient
getGenericClient()
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.Payment
getPayment()
Refund
getRefund()
boolean
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
hasCredit()
Checks whether the 'credit' field has been set, however the value could be nullboolean
hasCreditRefund()
Checks whether the 'creditRefund' field has been set, however the value could be nullboolean
hasPayment()
Checks whether the 'payment' field has been set, however the value could be nullboolean
hasRefund()
Checks whether the 'refund' field has been set, however the value could be 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
isNotNullCredit()
Checks whether the 'credit' field is set and is not nullboolean
isNotNullCreditRefund()
Checks whether the 'creditRefund' field is set and is not nullboolean
isNotNullPayment()
Checks whether the 'payment' field is set and is not nullboolean
isNotNullRefund()
Checks whether the 'refund' field is set and is not nullvoid
mergeChanges(Transaction 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.Transaction
setClientCreatedTime(Long clientCreatedTime)
Sets the field 'clientCreatedTime'.Transaction
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.Transaction
setCredit(Credit credit)
Sets the field 'credit'.Transaction
setCreditRefund(CreditRefund creditRefund)
Sets the field 'creditRefund'.Transaction
setPayment(Payment payment)
Sets the field 'payment'.Transaction
setRefund(Refund refund)
Sets the field 'refund'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<Transaction> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Transaction> JSON_CREATOR
-
-
Constructor Detail
-
Transaction
public Transaction()
Constructs a new empty instance.
-
Transaction
protected Transaction(boolean noInit)
Constructs a new empty instance.
-
Transaction
public Transaction(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Transaction
public Transaction(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.
-
Transaction
public Transaction(Transaction src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getCreatedTime
public Long getCreatedTime()
The time when the transaction was recorded on the server
-
getClientCreatedTime
public Long getClientCreatedTime()
The time when the transaction was recorded on the client
-
getPayment
public Payment getPayment()
-
getRefund
public Refund getRefund()
-
getCredit
public Credit getCredit()
-
getCreditRefund
public CreditRefund getCreditRefund()
-
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
-
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
-
isNotNullPayment
public boolean isNotNullPayment()
Checks whether the 'payment' field is set and is not null
-
isNotNullRefund
public boolean isNotNullRefund()
Checks whether the 'refund' field is set and is not null
-
isNotNullCredit
public boolean isNotNullCredit()
Checks whether the 'credit' field is set and is not null
-
isNotNullCreditRefund
public boolean isNotNullCreditRefund()
Checks whether the 'creditRefund' field is set and is not 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
-
hasPayment
public boolean hasPayment()
Checks whether the 'payment' field has been set, however the value could be null
-
hasRefund
public boolean hasRefund()
Checks whether the 'refund' field has been set, however the value could be null
-
hasCredit
public boolean hasCredit()
Checks whether the 'credit' field has been set, however the value could be null
-
hasCreditRefund
public boolean hasCreditRefund()
Checks whether the 'creditRefund' field has been set, however the value could be null
-
setCreatedTime
public Transaction setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
-
setClientCreatedTime
public Transaction setClientCreatedTime(Long clientCreatedTime)
Sets the field 'clientCreatedTime'.
-
setPayment
public Transaction setPayment(Payment payment)
Sets the field 'payment'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setRefund
public Transaction setRefund(Refund refund)
Sets the field 'refund'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setCredit
public Transaction setCredit(Credit credit)
Sets the field 'credit'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setCreditRefund
public Transaction setCreditRefund(CreditRefund creditRefund)
Sets the field 'creditRefund'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
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
-
clearPayment
public void clearPayment()
Clears the 'payment' field, the 'has' method for this field will now return false
-
clearRefund
public void clearRefund()
Clears the 'refund' field, the 'has' method for this field will now return false
-
clearCredit
public void clearCredit()
Clears the 'credit' field, the 'has' method for this field will now return false
-
clearCreditRefund
public void clearCreditRefund()
Clears the 'creditRefund' 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 Transaction copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Transaction src)
Copy all the changed fields from the given source to this instance.
-
-