Package com.clover.sdk.v3.order
Class AdditionalCharge
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.order.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
clearCreatedTime()
Clears the 'createdTime' 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
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearMerchantAdditionalChargeRef()
Clears the 'merchantAdditionalChargeRef' 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()
AmountLong
getCreatedTime()
CreatedTimeLong
getDeletedTime()
Deleted timeprotected 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.Reference
getMerchantAdditionalChargeRef()
A reference to the MerchantAdditionalCharge that was used to create this AdditionalCharge.Long
getModifiedTime()
ModifiedTimeLong
getPercentageDecimal()
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
hasCreatedTime()
Checks whether the 'createdTime' 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
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasMerchantAdditionalChargeRef()
Checks whether the 'merchantAdditionalChargeRef' 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
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not nullboolean
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullMerchantAdditionalChargeRef()
Checks whether the 'merchantAdditionalChargeRef' 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
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.AdditionalCharge
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.AdditionalCharge
setId(String id)
Sets the field 'id'.AdditionalCharge
setMerchantAdditionalChargeRef(Reference merchantAdditionalChargeRef)
Sets the field 'merchantAdditionalChargeRef'.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
-
getMerchantAdditionalChargeRef
public Reference getMerchantAdditionalChargeRef()
A reference to the MerchantAdditionalCharge that was used to create this AdditionalCharge. Note that since this a reference the MerchantAdditionalCharge can be changed and deleted any time such that it no longer matches this AdditionalCharge.
-
getType
public AdditionalChargeType getType()
The type of additional charge
-
getAmount
public Long getAmount()
Amount
-
getPercentageDecimal
public Long getPercentageDecimal()
Percent to charge times 10000, e.g. 12.5% will be 125000
-
getCreatedTime
public Long getCreatedTime()
CreatedTime
-
getModifiedTime
public Long getModifiedTime()
ModifiedTime
-
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
-
isNotNullMerchantAdditionalChargeRef
public boolean isNotNullMerchantAdditionalChargeRef()
Checks whether the 'merchantAdditionalChargeRef' 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
-
isNotNullCreatedTime
public boolean isNotNullCreatedTime()
Checks whether the 'createdTime' 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
-
hasMerchantAdditionalChargeRef
public boolean hasMerchantAdditionalChargeRef()
Checks whether the 'merchantAdditionalChargeRef' 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
-
hasCreatedTime
public boolean hasCreatedTime()
Checks whether the 'createdTime' 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'.
-
setMerchantAdditionalChargeRef
public AdditionalCharge setMerchantAdditionalChargeRef(Reference merchantAdditionalChargeRef)
Sets the field 'merchantAdditionalChargeRef'. 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'.
-
setCreatedTime
public AdditionalCharge setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
-
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
-
clearMerchantAdditionalChargeRef
public void clearMerchantAdditionalChargeRef()
Clears the 'merchantAdditionalChargeRef' 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
-
clearCreatedTime
public void clearCreatedTime()
Clears the 'createdTime' 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.
-
-