Package com.clover.sdk.v3.payments
Class Authorization
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.Authorization
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Authorization 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
Authorization.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<Authorization>
CREATOR
static JSONifiable.Creator<Authorization>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Authorization()
Constructs a new empty instance.protected
Authorization(boolean noInit)
Constructs a new empty instance.Authorization(Authorization src)
Constructs a new instance that is a deep copy of the source instance.Authorization(String json)
Constructs a new instance from the given JSON String.Authorization(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
clearAcquirerTerminalId()
Clears the 'acquirerTerminalId' field, the 'has' method for this field will now return falsevoid
clearAdditionalCharges()
Clears the 'additionalCharges' field, the 'has' method for this field will now return falsevoid
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return falsevoid
clearAuthcode()
Clears the 'authcode' field, the 'has' method for this field will now return falsevoid
clearCardType()
Clears the 'cardType' field, the 'has' method for this field will now return falsevoid
clearClosingPayment()
Clears the 'closingPayment' 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
clearExternalReferenceId()
Clears the 'externalReferenceId' 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
clearLast4()
Clears the 'last4' 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
clearPayment()
Clears the 'payment' field, the 'has' method for this field will now return falsevoid
clearTabName()
Clears the 'tabName' field, the 'has' method for this field will now return falsevoid
clearToken()
Clears the 'token' field, the 'has' method for this field will now return falsevoid
clearTransactionSequenceCounter()
Clears the 'transactionSequenceCounter' field, the 'has' method for this field will now return falsevoid
clearType()
Clears the 'type' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.Authorization
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.String
getAcquirerTerminalId()
Acquirer Terminal ID of the terminal.List<AdditionalChargeAmount>
getAdditionalCharges()
Additional charges associated with the authorization.Long
getAmount()
Amount authorizedString
getAuthcode()
Authorization codeCardType
getCardType()
Type of credit card used for authorizationPayment
getClosingPayment()
Payment that the auth was closed withLong
getCreatedTime()
Time authorization was recorded on serverString
getExternalReferenceId()
The external reference id if associated with the paymentprotected 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.String
getLast4()
Last 4 digits of credit card used for authorizationString
getNote()
Payment
getPayment()
Payment that the auth was opened withString
getTabName()
Name of tabString
getToken()
Token used for the authorizationString
getTransactionSequenceCounter()
Counter maintained by the terminal that is incremented for each transaction.Type
getType()
boolean
hasAcquirerTerminalId()
Checks whether the 'acquirerTerminalId' field has been set, however the value could be nullboolean
hasAdditionalCharges()
Checks whether the 'additionalCharges' field has been set, however the value could be nullboolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasAuthcode()
Checks whether the 'authcode' field has been set, however the value could be nullboolean
hasCardType()
Checks whether the 'cardType' field has been set, however the value could be nullboolean
hasClosingPayment()
Checks whether the 'closingPayment' 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
hasExternalReferenceId()
Checks whether the 'externalReferenceId' 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
hasLast4()
Checks whether the 'last4' 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
hasPayment()
Checks whether the 'payment' field has been set, however the value could be nullboolean
hasTabName()
Checks whether the 'tabName' field has been set, however the value could be nullboolean
hasToken()
Checks whether the 'token' field has been set, however the value could be nullboolean
hasTransactionSequenceCounter()
Checks whether the 'transactionSequenceCounter' field has been set, however the value could be nullboolean
hasType()
Checks whether the 'type' 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
isNotNullAcquirerTerminalId()
Checks whether the 'acquirerTerminalId' field is set and is not nullboolean
isNotNullAdditionalCharges()
Checks whether the 'additionalCharges' field is set and is not nullboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullAuthcode()
Checks whether the 'authcode' field is set and is not nullboolean
isNotNullCardType()
Checks whether the 'cardType' field is set and is not nullboolean
isNotNullClosingPayment()
Checks whether the 'closingPayment' field is set and is not nullboolean
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not nullboolean
isNotNullExternalReferenceId()
Checks whether the 'externalReferenceId' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullLast4()
Checks whether the 'last4' field is set and is not nullboolean
isNotNullNote()
Checks whether the 'note' field is set and is not nullboolean
isNotNullPayment()
Checks whether the 'payment' field is set and is not nullboolean
isNotNullTabName()
Checks whether the 'tabName' field is set and is not nullboolean
isNotNullToken()
Checks whether the 'token' field is set and is not nullboolean
isNotNullTransactionSequenceCounter()
Checks whether the 'transactionSequenceCounter' field is set and is not nullboolean
isNotNullType()
Checks whether the 'type' field is set and is not nullvoid
mergeChanges(Authorization 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.Authorization
setAcquirerTerminalId(String acquirerTerminalId)
Sets the field 'acquirerTerminalId'.Authorization
setAdditionalCharges(List<AdditionalChargeAmount> additionalCharges)
Sets the field 'additionalCharges'.Authorization
setAmount(Long amount)
Sets the field 'amount'.Authorization
setAuthcode(String authcode)
Sets the field 'authcode'.Authorization
setCardType(CardType cardType)
Sets the field 'cardType'.Authorization
setClosingPayment(Payment closingPayment)
Sets the field 'closingPayment'.Authorization
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.Authorization
setExternalReferenceId(String externalReferenceId)
Sets the field 'externalReferenceId'.Authorization
setId(String id)
Sets the field 'id'.Authorization
setLast4(String last4)
Sets the field 'last4'.Authorization
setNote(String note)
Sets the field 'note'.Authorization
setPayment(Payment payment)
Sets the field 'payment'.Authorization
setTabName(String tabName)
Sets the field 'tabName'.Authorization
setToken(String token)
Sets the field 'token'.Authorization
setTransactionSequenceCounter(String transactionSequenceCounter)
Sets the field 'transactionSequenceCounter'.Authorization
setType(Type type)
Sets the field 'type'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<Authorization> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Authorization> JSON_CREATOR
-
-
Constructor Detail
-
Authorization
public Authorization()
Constructs a new empty instance.
-
Authorization
protected Authorization(boolean noInit)
Constructs a new empty instance.
-
Authorization
public Authorization(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Authorization
public Authorization(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.
-
Authorization
public Authorization(Authorization 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
-
getPayment
public Payment getPayment()
Payment that the auth was opened with
-
getTabName
public String getTabName()
Name of tab
-
getAmount
public Long getAmount()
Amount authorized
-
getCardType
public CardType getCardType()
Type of credit card used for authorization
-
getLast4
public String getLast4()
Last 4 digits of credit card used for authorization
-
getAuthcode
public String getAuthcode()
Authorization code
-
getToken
public String getToken()
Token used for the authorization
-
getType
public Type getType()
-
getNote
public String getNote()
-
getExternalReferenceId
public String getExternalReferenceId()
The external reference id if associated with the payment
-
getClosingPayment
public Payment getClosingPayment()
Payment that the auth was closed with
-
getCreatedTime
public Long getCreatedTime()
Time authorization was recorded on server
-
getAdditionalCharges
public List<AdditionalChargeAmount> getAdditionalCharges()
Additional charges associated with the authorization. For incremental auth, it is the additional charge on total auth amount.
-
getTransactionSequenceCounter
public String getTransactionSequenceCounter()
Counter maintained by the terminal that is incremented for each transaction.
-
getAcquirerTerminalId
public String getAcquirerTerminalId()
Acquirer Terminal ID of the terminal. For incremental auth to refer to the terminal which does the increment.
-
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
-
isNotNullPayment
public boolean isNotNullPayment()
Checks whether the 'payment' field is set and is not null
-
isNotNullTabName
public boolean isNotNullTabName()
Checks whether the 'tabName' field is set and is not null
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullCardType
public boolean isNotNullCardType()
Checks whether the 'cardType' field is set and is not null
-
isNotNullLast4
public boolean isNotNullLast4()
Checks whether the 'last4' field is set and is not null
-
isNotNullAuthcode
public boolean isNotNullAuthcode()
Checks whether the 'authcode' field is set and is not null
-
isNotNullToken
public boolean isNotNullToken()
Checks whether the 'token' field is set and is not null
-
isNotNullType
public boolean isNotNullType()
Checks whether the 'type' field is set and is not null
-
isNotNullNote
public boolean isNotNullNote()
Checks whether the 'note' field is set and is not null
-
isNotNullExternalReferenceId
public boolean isNotNullExternalReferenceId()
Checks whether the 'externalReferenceId' field is set and is not null
-
isNotNullClosingPayment
public boolean isNotNullClosingPayment()
Checks whether the 'closingPayment' field is set and is not null
-
isNotNullCreatedTime
public boolean isNotNullCreatedTime()
Checks whether the 'createdTime' 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
-
isNotNullTransactionSequenceCounter
public boolean isNotNullTransactionSequenceCounter()
Checks whether the 'transactionSequenceCounter' field is set and is not null
-
isNotNullAcquirerTerminalId
public boolean isNotNullAcquirerTerminalId()
Checks whether the 'acquirerTerminalId' 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
-
hasPayment
public boolean hasPayment()
Checks whether the 'payment' field has been set, however the value could be null
-
hasTabName
public boolean hasTabName()
Checks whether the 'tabName' field has been set, however the value could be null
-
hasAmount
public boolean hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
-
hasCardType
public boolean hasCardType()
Checks whether the 'cardType' field has been set, however the value could be null
-
hasLast4
public boolean hasLast4()
Checks whether the 'last4' field has been set, however the value could be null
-
hasAuthcode
public boolean hasAuthcode()
Checks whether the 'authcode' field has been set, however the value could be null
-
hasToken
public boolean hasToken()
Checks whether the 'token' field has been set, however the value could be null
-
hasType
public boolean hasType()
Checks whether the 'type' 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
-
hasExternalReferenceId
public boolean hasExternalReferenceId()
Checks whether the 'externalReferenceId' field has been set, however the value could be null
-
hasClosingPayment
public boolean hasClosingPayment()
Checks whether the 'closingPayment' 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
-
hasAdditionalCharges
public boolean hasAdditionalCharges()
Checks whether the 'additionalCharges' field has been set, however the value could be null
-
hasTransactionSequenceCounter
public boolean hasTransactionSequenceCounter()
Checks whether the 'transactionSequenceCounter' field has been set, however the value could be null
-
hasAcquirerTerminalId
public boolean hasAcquirerTerminalId()
Checks whether the 'acquirerTerminalId' field has been set, however the value could be null
-
setId
public Authorization setId(String id)
Sets the field 'id'.
-
setPayment
public Authorization 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.
-
setTabName
public Authorization setTabName(String tabName)
Sets the field 'tabName'.
-
setAmount
public Authorization setAmount(Long amount)
Sets the field 'amount'.
-
setCardType
public Authorization setCardType(CardType cardType)
Sets the field 'cardType'.
-
setLast4
public Authorization setLast4(String last4)
Sets the field 'last4'.
-
setAuthcode
public Authorization setAuthcode(String authcode)
Sets the field 'authcode'.
-
setToken
public Authorization setToken(String token)
Sets the field 'token'.
-
setType
public Authorization setType(Type type)
Sets the field 'type'.
-
setNote
public Authorization setNote(String note)
Sets the field 'note'.
-
setExternalReferenceId
public Authorization setExternalReferenceId(String externalReferenceId)
Sets the field 'externalReferenceId'.
-
setClosingPayment
public Authorization setClosingPayment(Payment closingPayment)
Sets the field 'closingPayment'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setCreatedTime
public Authorization setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
-
setAdditionalCharges
public Authorization setAdditionalCharges(List<AdditionalChargeAmount> 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.
-
setTransactionSequenceCounter
public Authorization setTransactionSequenceCounter(String transactionSequenceCounter)
Sets the field 'transactionSequenceCounter'.
-
setAcquirerTerminalId
public Authorization setAcquirerTerminalId(String acquirerTerminalId)
Sets the field 'acquirerTerminalId'.
-
clearId
public void clearId()
Clears the 'id' 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
-
clearTabName
public void clearTabName()
Clears the 'tabName' field, the 'has' method for this field will now return false
-
clearAmount
public void clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
-
clearCardType
public void clearCardType()
Clears the 'cardType' field, the 'has' method for this field will now return false
-
clearLast4
public void clearLast4()
Clears the 'last4' field, the 'has' method for this field will now return false
-
clearAuthcode
public void clearAuthcode()
Clears the 'authcode' field, the 'has' method for this field will now return false
-
clearToken
public void clearToken()
Clears the 'token' field, the 'has' method for this field will now return false
-
clearType
public void clearType()
Clears the 'type' 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
-
clearExternalReferenceId
public void clearExternalReferenceId()
Clears the 'externalReferenceId' field, the 'has' method for this field will now return false
-
clearClosingPayment
public void clearClosingPayment()
Clears the 'closingPayment' 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
-
clearAdditionalCharges
public void clearAdditionalCharges()
Clears the 'additionalCharges' field, the 'has' method for this field will now return false
-
clearTransactionSequenceCounter
public void clearTransactionSequenceCounter()
Clears the 'transactionSequenceCounter' field, the 'has' method for this field will now return false
-
clearAcquirerTerminalId
public void clearAcquirerTerminalId()
Clears the 'acquirerTerminalId' 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 Authorization copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Authorization src)
Copy all the changed fields from the given source to this instance.
-
-