public class Credit extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Credit.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Credit> |
CREATOR |
static JSONifiable.Creator<Credit> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Credit()
Constructs a new empty instance.
|
protected |
Credit(boolean noInit)
Constructs a new empty instance.
|
|
Credit(Credit src)
Constructs a new instance that is a deep copy of the source instance.
|
|
Credit(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.
|
|
Credit(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
|
void |
clearAppTracking()
Clears the 'appTracking' field, the 'has' method for this field will now return false
|
void |
clearCardTransaction()
Clears the 'cardTransaction' field, the 'has' method for this field will now return false
|
void |
clearClientCreatedTime()
Clears the 'clientCreatedTime' field, the 'has' method for this field will now return false
|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearCreditAttributes()
Clears the 'CreditAttributes' field, the 'has' method for this field will now return false
|
void |
clearCreditRefunds()
Clears the 'creditRefunds' field, the 'has' method for this field will now return false
|
void |
clearCustomers()
Clears the 'customers' field, the 'has' method for this field will now return false
|
void |
clearDccInfo()
Clears the 'dccInfo' field, the 'has' method for this field will now return false
|
void |
clearDevice()
Clears the 'device' field, the 'has' method for this field will now return false
|
void |
clearEmployee()
Clears the 'employee' field, the 'has' method for this field will now return false
|
void |
clearExternalReferenceId()
Clears the 'externalReferenceId' field, the 'has' method for this field will now return false
|
void |
clearGermanInfo()
Clears the 'germanInfo' 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 |
clearMerchant()
Clears the 'merchant' field, the 'has' method for this field will now return false
|
void |
clearOrderRef()
Clears the 'orderRef' 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 |
clearResult()
Clears the 'result' field, the 'has' method for this field will now return false
|
void |
clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return false
|
void |
clearTaxRates()
Clears the 'taxRates' field, the 'has' method for this field will now return false
|
void |
clearTender()
Clears the 'tender' field, the 'has' method for this field will now return false
|
void |
clearTransactionInfo()
Clears the 'transactionInfo' field, the 'has' method for this field will now return false
|
void |
clearTransactionSettings()
Clears the 'transactionSettings' field, the 'has' method for this field will now return false
|
void |
clearVoided()
Clears the 'voided' field, the 'has' method for this field will now return false
|
void |
clearVoidReason()
Clears the 'voidReason' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Credit |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getAmount()
Amount paid
|
AppTracking |
getAppTracking()
Tracking information for the app that created this credit.
|
CardTransaction |
getCardTransaction()
Information about the card used for credit/debit card payments
|
Long |
getClientCreatedTime() |
Long |
getCreatedTime()
Time payment was recorded on server
|
Map<String,String> |
getCreditAttributes() |
List<CreditRefund> |
getCreditRefunds() |
Customer |
getCustomers()
Customer who received the credit/refund
|
DCCInfo |
getDccInfo()
Dynamic Currency Conversion information
|
Reference |
getDevice()
Device which processed this credit, a 128-bit UUID, not a normal base-13 Clover ID.
|
Reference |
getEmployee()
The employee who processed the payment
|
String |
getExternalReferenceId()
The external reference id if associated with the credit
|
protected GenericClient |
getGenericClient() |
GermanInfo |
getGermanInfo()
German region-specific information
|
String |
getId()
Unique identifier
|
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.
|
Reference |
getMerchant() |
Reference |
getOrderRef()
The order with which the credit is associated
|
String |
getReason()
Reason why the credit was initiated
|
Result |
getResult() |
Long |
getTaxAmount()
Amount paid in tax
|
List<TaxableAmountRate> |
getTaxRates() |
Tender |
getTender()
The tender type associated with this payment, e.g.
|
TransactionInfo |
getTransactionInfo()
Transaction information
|
TransactionSettings |
getTransactionSettings()
Per transaction settings for the payment
|
Boolean |
getVoided() |
String |
getVoidReason() |
boolean |
hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
|
boolean |
hasAppTracking()
Checks whether the 'appTracking' field has been set, however the value could be null
|
boolean |
hasCardTransaction()
Checks whether the 'cardTransaction' field has been set, however the value could be null
|
boolean |
hasClientCreatedTime()
Checks whether the 'clientCreatedTime' field has been set, however the value could be null
|
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasCreditAttributes()
Checks whether the 'CreditAttributes' field has been set, however the value could be null
|
boolean |
hasCreditRefunds()
Checks whether the 'creditRefunds' field has been set, however the value could be null
|
boolean |
hasCustomers()
Checks whether the 'customers' field has been set, however the value could be null
|
boolean |
hasDccInfo()
Checks whether the 'dccInfo' field has been set, however the value could be null
|
boolean |
hasDevice()
Checks whether the 'device' field has been set, however the value could be null
|
boolean |
hasEmployee()
Checks whether the 'employee' field has been set, however the value could be null
|
boolean |
hasExternalReferenceId()
Checks whether the 'externalReferenceId' field has been set, however the value could be null
|
boolean |
hasGermanInfo()
Checks whether the 'germanInfo' 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 |
hasMerchant()
Checks whether the 'merchant' field has been set, however the value could be null
|
boolean |
hasOrderRef()
Checks whether the 'orderRef' 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 |
hasResult()
Checks whether the 'result' field has been set, however the value could be null
|
boolean |
hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be null
|
boolean |
hasTaxRates()
Checks whether the 'taxRates' field has been set, however the value could be null
|
boolean |
hasTender()
Checks whether the 'tender' field has been set, however the value could be null
|
boolean |
hasTransactionInfo()
Checks whether the 'transactionInfo' field has been set, however the value could be null
|
boolean |
hasTransactionSettings()
Checks whether the 'transactionSettings' field has been set, however the value could be null
|
boolean |
hasVoided()
Checks whether the 'voided' field has been set, however the value could be null
|
boolean |
hasVoidReason()
Checks whether the 'voidReason' field has been set, however the value could be null
|
boolean |
isNotEmptyCreditAttributes()
Checks whether the 'CreditAttributes' field is set and is not null and is not empty
|
boolean |
isNotEmptyCreditRefunds()
Checks whether the 'creditRefunds' field is set and is not null and is not empty
|
boolean |
isNotEmptyTaxRates()
Checks whether the 'taxRates' field is set and is not null and is not empty
|
boolean |
isNotNullAmount()
Checks whether the 'amount' field is set and is not null
|
boolean |
isNotNullAppTracking()
Checks whether the 'appTracking' field is set and is not null
|
boolean |
isNotNullCardTransaction()
Checks whether the 'cardTransaction' field is set and is not null
|
boolean |
isNotNullClientCreatedTime()
Checks whether the 'clientCreatedTime' field is set and is not null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullCreditAttributes()
Checks whether the 'CreditAttributes' field is set and is not null
|
boolean |
isNotNullCreditRefunds()
Checks whether the 'creditRefunds' field is set and is not null
|
boolean |
isNotNullCustomers()
Checks whether the 'customers' field is set and is not null
|
boolean |
isNotNullDccInfo()
Checks whether the 'dccInfo' field is set and is not null
|
boolean |
isNotNullDevice()
Checks whether the 'device' field is set and is not null
|
boolean |
isNotNullEmployee()
Checks whether the 'employee' field is set and is not null
|
boolean |
isNotNullExternalReferenceId()
Checks whether the 'externalReferenceId' field is set and is not null
|
boolean |
isNotNullGermanInfo()
Checks whether the 'germanInfo' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
|
boolean |
isNotNullOrderRef()
Checks whether the 'orderRef' field is set and is not null
|
boolean |
isNotNullReason()
Checks whether the 'reason' field is set and is not null
|
boolean |
isNotNullResult()
Checks whether the 'result' field is set and is not null
|
boolean |
isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not null
|
boolean |
isNotNullTaxRates()
Checks whether the 'taxRates' field is set and is not null
|
boolean |
isNotNullTender()
Checks whether the 'tender' field is set and is not null
|
boolean |
isNotNullTransactionInfo()
Checks whether the 'transactionInfo' field is set and is not null
|
boolean |
isNotNullTransactionSettings()
Checks whether the 'transactionSettings' field is set and is not null
|
boolean |
isNotNullVoided()
Checks whether the 'voided' field is set and is not null
|
boolean |
isNotNullVoidReason()
Checks whether the 'voidReason' field is set and is not null
|
void |
mergeChanges(Credit 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.
|
Credit |
setAmount(Long amount)
Sets the field 'amount'.
|
Credit |
setAppTracking(AppTracking appTracking)
Sets the field 'appTracking'.
|
Credit |
setCardTransaction(CardTransaction cardTransaction)
Sets the field 'cardTransaction'.
|
Credit |
setClientCreatedTime(Long clientCreatedTime)
Sets the field 'clientCreatedTime'.
|
Credit |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
Credit |
setCreditAttributes(Map<String,String> CreditAttributes)
Sets the field 'CreditAttributes'.
|
Credit |
setCreditRefunds(List<CreditRefund> creditRefunds)
Sets the field 'creditRefunds'.
|
Credit |
setCustomers(Customer customers)
Sets the field 'customers'.
|
Credit |
setDccInfo(DCCInfo dccInfo)
Sets the field 'dccInfo'.
|
Credit |
setDevice(Reference device)
Sets the field 'device'.
|
Credit |
setEmployee(Reference employee)
Sets the field 'employee'.
|
Credit |
setExternalReferenceId(String externalReferenceId)
Sets the field 'externalReferenceId'.
|
Credit |
setGermanInfo(GermanInfo germanInfo)
Sets the field 'germanInfo'.
|
Credit |
setId(String id)
Sets the field 'id'.
|
Credit |
setMerchant(Reference merchant)
Sets the field 'merchant'.
|
Credit |
setOrderRef(Reference orderRef)
Sets the field 'orderRef'.
|
Credit |
setReason(String reason)
Sets the field 'reason'.
|
Credit |
setResult(Result result)
Sets the field 'result'.
|
Credit |
setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.
|
Credit |
setTaxRates(List<TaxableAmountRate> taxRates)
Sets the field 'taxRates'.
|
Credit |
setTender(Tender tender)
Sets the field 'tender'.
|
Credit |
setTransactionInfo(TransactionInfo transactionInfo)
Sets the field 'transactionInfo'.
|
Credit |
setTransactionSettings(TransactionSettings transactionSettings)
Sets the field 'transactionSettings'.
|
Credit |
setVoided(Boolean voided)
Sets the field 'voided'.
|
Credit |
setVoidReason(String voidReason)
Sets the field 'voidReason'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Credit> CREATOR
public static final JSONifiable.Creator<Credit> JSON_CREATOR
public Credit()
protected Credit(boolean noInit)
public Credit(String json) throws IllegalArgumentException
IllegalArgumentException
public Credit(JSONObject jsonObject)
public Credit(Credit src)
public String getId()
public Reference getOrderRef()
public Reference getDevice()
public Tender getTender()
public Reference getEmployee()
public Customer getCustomers()
public Long getAmount()
public Long getTaxAmount()
public List<TaxableAmountRate> getTaxRates()
public Long getCreatedTime()
public Long getClientCreatedTime()
public CardTransaction getCardTransaction()
public Boolean getVoided()
public String getVoidReason()
public DCCInfo getDccInfo()
public TransactionSettings getTransactionSettings()
public List<CreditRefund> getCreditRefunds()
public GermanInfo getGermanInfo()
public AppTracking getAppTracking()
public Result getResult()
public String getReason()
public TransactionInfo getTransactionInfo()
public Reference getMerchant()
public String getExternalReferenceId()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullOrderRef()
public boolean isNotNullDevice()
public boolean isNotNullTender()
public boolean isNotNullEmployee()
public boolean isNotNullCustomers()
public boolean isNotNullAmount()
public boolean isNotNullTaxAmount()
public boolean isNotNullTaxRates()
public boolean isNotEmptyTaxRates()
public boolean isNotNullCreatedTime()
public boolean isNotNullClientCreatedTime()
public boolean isNotNullCardTransaction()
public boolean isNotNullVoided()
public boolean isNotNullVoidReason()
public boolean isNotNullDccInfo()
public boolean isNotNullTransactionSettings()
public boolean isNotNullCreditRefunds()
public boolean isNotEmptyCreditRefunds()
public boolean isNotNullGermanInfo()
public boolean isNotNullAppTracking()
public boolean isNotNullResult()
public boolean isNotNullReason()
public boolean isNotNullTransactionInfo()
public boolean isNotNullMerchant()
public boolean isNotNullExternalReferenceId()
public boolean isNotNullCreditAttributes()
public boolean isNotEmptyCreditAttributes()
public boolean hasId()
public boolean hasOrderRef()
public boolean hasDevice()
public boolean hasTender()
public boolean hasEmployee()
public boolean hasCustomers()
public boolean hasAmount()
public boolean hasTaxAmount()
public boolean hasTaxRates()
public boolean hasCreatedTime()
public boolean hasClientCreatedTime()
public boolean hasCardTransaction()
public boolean hasVoided()
public boolean hasVoidReason()
public boolean hasDccInfo()
public boolean hasTransactionSettings()
public boolean hasCreditRefunds()
public boolean hasGermanInfo()
public boolean hasAppTracking()
public boolean hasResult()
public boolean hasReason()
public boolean hasTransactionInfo()
public boolean hasMerchant()
public boolean hasExternalReferenceId()
public boolean hasCreditAttributes()
public Credit setOrderRef(Reference orderRef)
public Credit setDevice(Reference device)
public Credit setTender(Tender tender)
public Credit setEmployee(Reference employee)
public Credit setCustomers(Customer customers)
public Credit setTaxRates(List<TaxableAmountRate> taxRates)
public Credit setClientCreatedTime(Long clientCreatedTime)
public Credit setCardTransaction(CardTransaction cardTransaction)
public Credit setDccInfo(DCCInfo dccInfo)
public Credit setTransactionSettings(TransactionSettings transactionSettings)
public Credit setCreditRefunds(List<CreditRefund> creditRefunds)
public Credit setGermanInfo(GermanInfo germanInfo)
public Credit setAppTracking(AppTracking appTracking)
public Credit setTransactionInfo(TransactionInfo transactionInfo)
public Credit setMerchant(Reference merchant)
public Credit setExternalReferenceId(String externalReferenceId)
public Credit setCreditAttributes(Map<String,String> CreditAttributes)
public void clearId()
public void clearOrderRef()
public void clearDevice()
public void clearTender()
public void clearEmployee()
public void clearCustomers()
public void clearAmount()
public void clearTaxAmount()
public void clearTaxRates()
public void clearCreatedTime()
public void clearClientCreatedTime()
public void clearCardTransaction()
public void clearVoided()
public void clearVoidReason()
public void clearDccInfo()
public void clearTransactionSettings()
public void clearCreditRefunds()
public void clearGermanInfo()
public void clearAppTracking()
public void clearResult()
public void clearReason()
public void clearTransactionInfo()
public void clearMerchant()
public void clearExternalReferenceId()
public void clearCreditAttributes()
public boolean containsChanges()
public void resetChangeLog()
public Credit copyChanges()
public void mergeChanges(Credit src)