Package com.clover.sdk.v3.payments
Class AdditionalCharge
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.AdditionalCharge
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class AdditionalCharge 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
AdditionalCharge.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<AdditionalCharge>
CREATOR
static JSONifiable.Creator<AdditionalCharge>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description AdditionalCharge()
Constructs a new empty instance.protected
AdditionalCharge(boolean noInit)
Constructs a new empty instance.AdditionalCharge(AdditionalCharge src)
Constructs a new instance that is a deep copy of the source instance.AdditionalCharge(String json)
Constructs a new instance from the given JSON String.AdditionalCharge(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
clearDeletedTime()
Clears the 'deletedTime' field, the 'has' method for this field will now return falsevoid
clearEnabled()
Clears the 'enabled' 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
clearIsCashbackOnly()
Clears the 'isCashbackOnly' field, the 'has' method for this field will now return falsevoid
clearMerchant()
Clears the 'merchant' field, the 'has' method for this field will now return falsevoid
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return falsevoid
clearPercentageDecimal()
Clears the 'percentageDecimal' 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.AdditionalCharge
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getAmount()
Optional flat charge amountLong
getDeletedTime()
Deleted timeBoolean
getEnabled()
If this charge is enabledprotected GenericClient
getGenericClient()
String
getId()
Unique identifierBoolean
getIsCashbackOnly()
If this charge should only apply to transactions with cashbackJSONObject
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.Merchant
getMerchant()
The merchant this charge belongs toLong
getModifiedTime()
Last modified timeLong
getPercentageDecimal()
Optional percent to charge times 10000, e.g.AdditionalChargeType
getType()
The type of additional chargeboolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasDeletedTime()
Checks whether the 'deletedTime' field has been set, however the value could be nullboolean
hasEnabled()
Checks whether the 'enabled' 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
hasIsCashbackOnly()
Checks whether the 'isCashbackOnly' field has been set, however the value could be nullboolean
hasMerchant()
Checks whether the 'merchant' field has been set, however the value could be nullboolean
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be nullboolean
hasPercentageDecimal()
Checks whether the 'percentageDecimal' 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
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not nullboolean
isNotNullEnabled()
Checks whether the 'enabled' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullIsCashbackOnly()
Checks whether the 'isCashbackOnly' field is set and is not nullboolean
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not nullboolean
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not nullboolean
isNotNullPercentageDecimal()
Checks whether the 'percentageDecimal' field is set and is not nullboolean
isNotNullType()
Checks whether the 'type' field is set and is not nullvoid
mergeChanges(AdditionalCharge 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.AdditionalCharge
setAmount(Long amount)
Sets the field 'amount'.AdditionalCharge
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.AdditionalCharge
setEnabled(Boolean enabled)
Sets the field 'enabled'.AdditionalCharge
setId(String id)
Sets the field 'id'.AdditionalCharge
setIsCashbackOnly(Boolean isCashbackOnly)
Sets the field 'isCashbackOnly'.AdditionalCharge
setMerchant(Merchant merchant)
Sets the field 'merchant'.AdditionalCharge
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.AdditionalCharge
setPercentageDecimal(Long percentageDecimal)
Sets the field 'percentageDecimal'.AdditionalCharge
setType(AdditionalChargeType 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<AdditionalCharge> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<AdditionalCharge> JSON_CREATOR
-
-
Constructor Detail
-
AdditionalCharge
public AdditionalCharge()
Constructs a new empty instance.
-
AdditionalCharge
protected AdditionalCharge(boolean noInit)
Constructs a new empty instance.
-
AdditionalCharge
public AdditionalCharge(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
AdditionalCharge
public AdditionalCharge(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.
-
AdditionalCharge
public AdditionalCharge(AdditionalCharge 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
-
getMerchant
public Merchant getMerchant()
The merchant this charge belongs to
-
getType
public AdditionalChargeType getType()
The type of additional charge
-
getAmount
public Long getAmount()
Optional flat charge amount
-
getPercentageDecimal
public Long getPercentageDecimal()
Optional percent to charge times 10000, e.g. 12.5% will be 125000
-
getIsCashbackOnly
public Boolean getIsCashbackOnly()
If this charge should only apply to transactions with cashback
-
getEnabled
public Boolean getEnabled()
If this charge is enabled
-
getModifiedTime
public Long getModifiedTime()
Last modified time
-
getDeletedTime
public Long getDeletedTime()
Deleted time
-
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
-
isNotNullMerchant
public boolean isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
-
isNotNullType
public boolean isNotNullType()
Checks whether the 'type' field is set and is not null
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullPercentageDecimal
public boolean isNotNullPercentageDecimal()
Checks whether the 'percentageDecimal' field is set and is not null
-
isNotNullIsCashbackOnly
public boolean isNotNullIsCashbackOnly()
Checks whether the 'isCashbackOnly' field is set and is not null
-
isNotNullEnabled
public boolean isNotNullEnabled()
Checks whether the 'enabled' field is set and is not null
-
isNotNullModifiedTime
public boolean isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
-
isNotNullDeletedTime
public boolean isNotNullDeletedTime()
Checks whether the 'deletedTime' 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
-
hasMerchant
public boolean hasMerchant()
Checks whether the 'merchant' 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
-
hasAmount
public boolean hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
-
hasPercentageDecimal
public boolean hasPercentageDecimal()
Checks whether the 'percentageDecimal' field has been set, however the value could be null
-
hasIsCashbackOnly
public boolean hasIsCashbackOnly()
Checks whether the 'isCashbackOnly' field has been set, however the value could be null
-
hasEnabled
public boolean hasEnabled()
Checks whether the 'enabled' field has been set, however the value could be null
-
hasModifiedTime
public boolean hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
-
hasDeletedTime
public boolean hasDeletedTime()
Checks whether the 'deletedTime' field has been set, however the value could be null
-
setId
public AdditionalCharge setId(String id)
Sets the field 'id'.
-
setMerchant
public AdditionalCharge setMerchant(Merchant merchant)
Sets the field 'merchant'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setType
public AdditionalCharge setType(AdditionalChargeType type)
Sets the field 'type'.
-
setAmount
public AdditionalCharge setAmount(Long amount)
Sets the field 'amount'.
-
setPercentageDecimal
public AdditionalCharge setPercentageDecimal(Long percentageDecimal)
Sets the field 'percentageDecimal'.
-
setIsCashbackOnly
public AdditionalCharge setIsCashbackOnly(Boolean isCashbackOnly)
Sets the field 'isCashbackOnly'.
-
setEnabled
public AdditionalCharge setEnabled(Boolean enabled)
Sets the field 'enabled'.
-
setModifiedTime
public AdditionalCharge setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
-
setDeletedTime
public AdditionalCharge setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearMerchant
public void clearMerchant()
Clears the 'merchant' 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
-
clearAmount
public void clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
-
clearPercentageDecimal
public void clearPercentageDecimal()
Clears the 'percentageDecimal' field, the 'has' method for this field will now return false
-
clearIsCashbackOnly
public void clearIsCashbackOnly()
Clears the 'isCashbackOnly' field, the 'has' method for this field will now return false
-
clearEnabled
public void clearEnabled()
Clears the 'enabled' field, the 'has' method for this field will now return false
-
clearModifiedTime
public void clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
-
clearDeletedTime
public void clearDeletedTime()
Clears the 'deletedTime' 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 AdditionalCharge copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(AdditionalCharge src)
Copy all the changed fields from the given source to this instance.
-
-