Package com.clover.sdk.v3.pay
Class PaymentRequest
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.pay.PaymentRequest
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class PaymentRequest 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
PaymentRequest.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<PaymentRequest>
CREATOR
static JSONifiable.Creator<PaymentRequest>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description PaymentRequest()
Constructs a new empty instance.protected
PaymentRequest(boolean noInit)
Constructs a new empty instance.PaymentRequest(PaymentRequest src)
Constructs a new instance that is a deep copy of the source instance.PaymentRequest(String json)
Constructs a new instance from the given JSON String.PaymentRequest(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
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return falsevoid
clearAuthorizationCode()
Clears the 'authorizationCode' field, the 'has' method for this field will now return falsevoid
clearCard()
Clears the 'card' field, the 'has' method for this field will now return falsevoid
clearCashBackAmount()
Clears the 'cashBackAmount' field, the 'has' method for this field will now return falsevoid
clearCashTendered()
Clears the 'cashTendered' field, the 'has' method for this field will now return falsevoid
clearEmployeeId()
Clears the 'employeeId' field, the 'has' method for this field will now return falsevoid
clearEmployeeName()
Clears the 'employeeName' field, the 'has' method for this field will now return falsevoid
clearExternalPaymentId()
Clears the 'externalPaymentId' 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
clearLineItems()
Clears the 'lineItems' field, the 'has' method for this field will now return falsevoid
clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return falsevoid
clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return falsevoid
clearSinglePayToken()
Clears the 'singlePayToken' field, the 'has' method for this field will now return falsevoid
clearTaxableAmountRates()
Clears the 'taxableAmountRates' field, the 'has' method for this field will now return falsevoid
clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return falsevoid
clearTender()
Clears the 'tender' field, the 'has' method for this field will now return falsevoid
clearTimestamp()
Clears the 'timestamp' field, the 'has' method for this field will now return falsevoid
clearTipAmount()
Clears the 'tipAmount' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.PaymentRequest
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getAmount()
Total amount paidString
getAuthorizationCode()
Used for voice authorization for credit cardsPaymentRequestCardDetails
getCard()
Long
getCashBackAmount()
Long
getCashTendered()
Cash tenderedString
getEmployeeId()
Employee IDString
getEmployeeName()
Employee nameString
getExternalPaymentId()
External payment ID when using custom tenderprotected 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.List<LineItemPayment>
getLineItems()
Payments that were made for this line itemString
getOrderId()
Unique identifier of the order with which this payment is associatedServiceChargeAmount
getServiceChargeAmount()
Boolean
getSinglePayToken()
List<TaxableAmountRate>
getTaxableAmountRates()
Long
getTaxAmount()
Amount paid in tax (TBD: sales tax only?)Tender
getTender()
The tender type associated with this payment, e.g.Long
getTimestamp()
Request timestampLong
getTipAmount()
Amount paid in tipsboolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasAuthorizationCode()
Checks whether the 'authorizationCode' field has been set, however the value could be nullboolean
hasCard()
Checks whether the 'card' field has been set, however the value could be nullboolean
hasCashBackAmount()
Checks whether the 'cashBackAmount' field has been set, however the value could be nullboolean
hasCashTendered()
Checks whether the 'cashTendered' field has been set, however the value could be nullboolean
hasEmployeeId()
Checks whether the 'employeeId' field has been set, however the value could be nullboolean
hasEmployeeName()
Checks whether the 'employeeName' field has been set, however the value could be nullboolean
hasExternalPaymentId()
Checks whether the 'externalPaymentId' 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
hasLineItems()
Checks whether the 'lineItems' field has been set, however the value could be nullboolean
hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be nullboolean
hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be nullboolean
hasSinglePayToken()
Checks whether the 'singlePayToken' field has been set, however the value could be nullboolean
hasTaxableAmountRates()
Checks whether the 'taxableAmountRates' field has been set, however the value could be nullboolean
hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be nullboolean
hasTender()
Checks whether the 'tender' field has been set, however the value could be nullboolean
hasTimestamp()
Checks whether the 'timestamp' field has been set, however the value could be nullboolean
hasTipAmount()
Checks whether the 'tipAmount' field has been set, however the value could be nullboolean
isNotEmptyLineItems()
Checks whether the 'lineItems' field is set and is not null and is not emptyboolean
isNotEmptyTaxableAmountRates()
Checks whether the 'taxableAmountRates' field is set and is not null and is not emptyboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullAuthorizationCode()
Checks whether the 'authorizationCode' field is set and is not nullboolean
isNotNullCard()
Checks whether the 'card' field is set and is not nullboolean
isNotNullCashBackAmount()
Checks whether the 'cashBackAmount' field is set and is not nullboolean
isNotNullCashTendered()
Checks whether the 'cashTendered' field is set and is not nullboolean
isNotNullEmployeeId()
Checks whether the 'employeeId' field is set and is not nullboolean
isNotNullEmployeeName()
Checks whether the 'employeeName' field is set and is not nullboolean
isNotNullExternalPaymentId()
Checks whether the 'externalPaymentId' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullLineItems()
Checks whether the 'lineItems' field is set and is not nullboolean
isNotNullOrderId()
Checks whether the 'orderId' field is set and is not nullboolean
isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not nullboolean
isNotNullSinglePayToken()
Checks whether the 'singlePayToken' field is set and is not nullboolean
isNotNullTaxableAmountRates()
Checks whether the 'taxableAmountRates' field is set and is not nullboolean
isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not nullboolean
isNotNullTender()
Checks whether the 'tender' field is set and is not nullboolean
isNotNullTimestamp()
Checks whether the 'timestamp' field is set and is not nullboolean
isNotNullTipAmount()
Checks whether the 'tipAmount' field is set and is not nullvoid
mergeChanges(PaymentRequest 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.PaymentRequest
setAmount(Long amount)
Sets the field 'amount'.PaymentRequest
setAuthorizationCode(String authorizationCode)
Sets the field 'authorizationCode'.PaymentRequest
setCard(PaymentRequestCardDetails card)
Sets the field 'card'.PaymentRequest
setCashBackAmount(Long cashBackAmount)
Sets the field 'cashBackAmount'.PaymentRequest
setCashTendered(Long cashTendered)
Sets the field 'cashTendered'.PaymentRequest
setEmployeeId(String employeeId)
Sets the field 'employeeId'.PaymentRequest
setEmployeeName(String employeeName)
Sets the field 'employeeName'.PaymentRequest
setExternalPaymentId(String externalPaymentId)
Sets the field 'externalPaymentId'.PaymentRequest
setId(String id)
Sets the field 'id'.PaymentRequest
setLineItems(List<LineItemPayment> lineItems)
Sets the field 'lineItems'.PaymentRequest
setOrderId(String orderId)
Sets the field 'orderId'.PaymentRequest
setServiceChargeAmount(ServiceChargeAmount serviceChargeAmount)
Sets the field 'serviceChargeAmount'.PaymentRequest
setSinglePayToken(Boolean singlePayToken)
Sets the field 'singlePayToken'.PaymentRequest
setTaxableAmountRates(List<TaxableAmountRate> taxableAmountRates)
Sets the field 'taxableAmountRates'.PaymentRequest
setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.PaymentRequest
setTender(Tender tender)
Sets the field 'tender'.PaymentRequest
setTimestamp(Long timestamp)
Sets the field 'timestamp'.PaymentRequest
setTipAmount(Long tipAmount)
Sets the field 'tipAmount'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<PaymentRequest> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<PaymentRequest> JSON_CREATOR
-
-
Constructor Detail
-
PaymentRequest
public PaymentRequest()
Constructs a new empty instance.
-
PaymentRequest
protected PaymentRequest(boolean noInit)
Constructs a new empty instance.
-
PaymentRequest
public PaymentRequest(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
PaymentRequest
public PaymentRequest(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.
-
PaymentRequest
public PaymentRequest(PaymentRequest 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
-
getOrderId
public String getOrderId()
Unique identifier of the order with which this payment is associated
-
getTimestamp
public Long getTimestamp()
Request timestamp
-
getTender
public Tender getTender()
The tender type associated with this payment, e.g. credit card, cash, etc.
-
getAmount
public Long getAmount()
Total amount paid
-
getTipAmount
public Long getTipAmount()
Amount paid in tips
-
getTaxAmount
public Long getTaxAmount()
Amount paid in tax (TBD: sales tax only?)
-
getCashBackAmount
public Long getCashBackAmount()
-
getCashTendered
public Long getCashTendered()
Cash tendered
-
getEmployeeId
public String getEmployeeId()
Employee ID
-
getEmployeeName
public String getEmployeeName()
Employee name
-
getAuthorizationCode
public String getAuthorizationCode()
Used for voice authorization for credit cards
-
getExternalPaymentId
public String getExternalPaymentId()
External payment ID when using custom tender
-
getServiceChargeAmount
public ServiceChargeAmount getServiceChargeAmount()
-
getSinglePayToken
public Boolean getSinglePayToken()
-
getTaxableAmountRates
public List<TaxableAmountRate> getTaxableAmountRates()
-
getLineItems
public List<LineItemPayment> getLineItems()
Payments that were made for this line item
-
getCard
public PaymentRequestCardDetails getCard()
-
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
-
isNotNullOrderId
public boolean isNotNullOrderId()
Checks whether the 'orderId' field is set and is not null
-
isNotNullTimestamp
public boolean isNotNullTimestamp()
Checks whether the 'timestamp' field is set and is not null
-
isNotNullTender
public boolean isNotNullTender()
Checks whether the 'tender' field is set and is not null
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullTipAmount
public boolean isNotNullTipAmount()
Checks whether the 'tipAmount' field is set and is not null
-
isNotNullTaxAmount
public boolean isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not null
-
isNotNullCashBackAmount
public boolean isNotNullCashBackAmount()
Checks whether the 'cashBackAmount' field is set and is not null
-
isNotNullCashTendered
public boolean isNotNullCashTendered()
Checks whether the 'cashTendered' field is set and is not null
-
isNotNullEmployeeId
public boolean isNotNullEmployeeId()
Checks whether the 'employeeId' field is set and is not null
-
isNotNullEmployeeName
public boolean isNotNullEmployeeName()
Checks whether the 'employeeName' field is set and is not null
-
isNotNullAuthorizationCode
public boolean isNotNullAuthorizationCode()
Checks whether the 'authorizationCode' field is set and is not null
-
isNotNullExternalPaymentId
public boolean isNotNullExternalPaymentId()
Checks whether the 'externalPaymentId' field is set and is not null
-
isNotNullServiceChargeAmount
public boolean isNotNullServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field is set and is not null
-
isNotNullSinglePayToken
public boolean isNotNullSinglePayToken()
Checks whether the 'singlePayToken' field is set and is not null
-
isNotNullTaxableAmountRates
public boolean isNotNullTaxableAmountRates()
Checks whether the 'taxableAmountRates' field is set and is not null
-
isNotEmptyTaxableAmountRates
public boolean isNotEmptyTaxableAmountRates()
Checks whether the 'taxableAmountRates' 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
-
isNotNullCard
public boolean isNotNullCard()
Checks whether the 'card' 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
-
hasOrderId
public boolean hasOrderId()
Checks whether the 'orderId' field has been set, however the value could be null
-
hasTimestamp
public boolean hasTimestamp()
Checks whether the 'timestamp' field has been set, however the value could be null
-
hasTender
public boolean hasTender()
Checks whether the 'tender' 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
-
hasTipAmount
public boolean hasTipAmount()
Checks whether the 'tipAmount' field has been set, however the value could be null
-
hasTaxAmount
public boolean hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be null
-
hasCashBackAmount
public boolean hasCashBackAmount()
Checks whether the 'cashBackAmount' field has been set, however the value could be null
-
hasCashTendered
public boolean hasCashTendered()
Checks whether the 'cashTendered' field has been set, however the value could be null
-
hasEmployeeId
public boolean hasEmployeeId()
Checks whether the 'employeeId' field has been set, however the value could be null
-
hasEmployeeName
public boolean hasEmployeeName()
Checks whether the 'employeeName' field has been set, however the value could be null
-
hasAuthorizationCode
public boolean hasAuthorizationCode()
Checks whether the 'authorizationCode' field has been set, however the value could be null
-
hasExternalPaymentId
public boolean hasExternalPaymentId()
Checks whether the 'externalPaymentId' field has been set, however the value could be null
-
hasServiceChargeAmount
public boolean hasServiceChargeAmount()
Checks whether the 'serviceChargeAmount' field has been set, however the value could be null
-
hasSinglePayToken
public boolean hasSinglePayToken()
Checks whether the 'singlePayToken' field has been set, however the value could be null
-
hasTaxableAmountRates
public boolean hasTaxableAmountRates()
Checks whether the 'taxableAmountRates' 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
-
hasCard
public boolean hasCard()
Checks whether the 'card' field has been set, however the value could be null
-
setId
public PaymentRequest setId(String id)
Sets the field 'id'.
-
setOrderId
public PaymentRequest setOrderId(String orderId)
Sets the field 'orderId'.
-
setTimestamp
public PaymentRequest setTimestamp(Long timestamp)
Sets the field 'timestamp'.
-
setTender
public PaymentRequest setTender(Tender tender)
Sets the field 'tender'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setAmount
public PaymentRequest setAmount(Long amount)
Sets the field 'amount'.
-
setTipAmount
public PaymentRequest setTipAmount(Long tipAmount)
Sets the field 'tipAmount'.
-
setTaxAmount
public PaymentRequest setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.
-
setCashBackAmount
public PaymentRequest setCashBackAmount(Long cashBackAmount)
Sets the field 'cashBackAmount'.
-
setCashTendered
public PaymentRequest setCashTendered(Long cashTendered)
Sets the field 'cashTendered'.
-
setEmployeeId
public PaymentRequest setEmployeeId(String employeeId)
Sets the field 'employeeId'.
-
setEmployeeName
public PaymentRequest setEmployeeName(String employeeName)
Sets the field 'employeeName'.
-
setAuthorizationCode
public PaymentRequest setAuthorizationCode(String authorizationCode)
Sets the field 'authorizationCode'.
-
setExternalPaymentId
public PaymentRequest setExternalPaymentId(String externalPaymentId)
Sets the field 'externalPaymentId'.
-
setServiceChargeAmount
public PaymentRequest setServiceChargeAmount(ServiceChargeAmount serviceChargeAmount)
Sets the field 'serviceChargeAmount'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setSinglePayToken
public PaymentRequest setSinglePayToken(Boolean singlePayToken)
Sets the field 'singlePayToken'.
-
setTaxableAmountRates
public PaymentRequest setTaxableAmountRates(List<TaxableAmountRate> taxableAmountRates)
Sets the field 'taxableAmountRates'. 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 PaymentRequest setLineItems(List<LineItemPayment> 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.
-
setCard
public PaymentRequest setCard(PaymentRequestCardDetails card)
Sets the field 'card'. 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
-
clearOrderId
public void clearOrderId()
Clears the 'orderId' field, the 'has' method for this field will now return false
-
clearTimestamp
public void clearTimestamp()
Clears the 'timestamp' field, the 'has' method for this field will now return false
-
clearTender
public void clearTender()
Clears the 'tender' 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
-
clearTipAmount
public void clearTipAmount()
Clears the 'tipAmount' field, the 'has' method for this field will now return false
-
clearTaxAmount
public void clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return false
-
clearCashBackAmount
public void clearCashBackAmount()
Clears the 'cashBackAmount' field, the 'has' method for this field will now return false
-
clearCashTendered
public void clearCashTendered()
Clears the 'cashTendered' field, the 'has' method for this field will now return false
-
clearEmployeeId
public void clearEmployeeId()
Clears the 'employeeId' field, the 'has' method for this field will now return false
-
clearEmployeeName
public void clearEmployeeName()
Clears the 'employeeName' field, the 'has' method for this field will now return false
-
clearAuthorizationCode
public void clearAuthorizationCode()
Clears the 'authorizationCode' field, the 'has' method for this field will now return false
-
clearExternalPaymentId
public void clearExternalPaymentId()
Clears the 'externalPaymentId' field, the 'has' method for this field will now return false
-
clearServiceChargeAmount
public void clearServiceChargeAmount()
Clears the 'serviceChargeAmount' field, the 'has' method for this field will now return false
-
clearSinglePayToken
public void clearSinglePayToken()
Clears the 'singlePayToken' field, the 'has' method for this field will now return false
-
clearTaxableAmountRates
public void clearTaxableAmountRates()
Clears the 'taxableAmountRates' 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
-
clearCard
public void clearCard()
Clears the 'card' 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 PaymentRequest copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(PaymentRequest src)
Copy all the changed fields from the given source to this instance.
-
-