public class AdditionalCharge extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
AdditionalCharge.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<AdditionalCharge> |
CREATOR |
static JSONifiable.Creator<AdditionalCharge> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
AdditionalCharge()
Constructs a new empty instance.
|
|
AdditionalCharge(AdditionalCharge src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
AdditionalCharge(boolean noInit)
Constructs a new empty instance.
|
|
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(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 |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearDeletedTime()
Clears the 'deletedTime' 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 |
clearMerchantAdditionalChargeRef()
Clears the 'merchantAdditionalChargeRef' field, the 'has' method for this field will now return false
|
void |
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
|
void |
clearPercentageDecimal()
Clears the 'percentageDecimal' field, the 'has' method for this field will now return false
|
void |
clearType()
Clears the 'type' field, the 'has' method for this field will now return false
|
boolean |
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()
Amount
|
Long |
getCreatedTime()
CreatedTime
|
Long |
getDeletedTime()
Deleted time
|
protected GenericClient |
getGenericClient() |
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 |
getMerchantAdditionalChargeRef()
A reference to the MerchantAdditionalCharge that was used to create this AdditionalCharge.
|
Long |
getModifiedTime()
ModifiedTime
|
Long |
getPercentageDecimal()
Percent to charge times 10000, e.g.
|
AdditionalChargeType |
getType()
The type of additional charge
|
boolean |
hasAmount()
Checks whether the 'amount' 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 |
hasDeletedTime()
Checks whether the 'deletedTime' 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 |
hasMerchantAdditionalChargeRef()
Checks whether the 'merchantAdditionalChargeRef' field has been set, however the value could be null
|
boolean |
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
|
boolean |
hasPercentageDecimal()
Checks whether the 'percentageDecimal' field has been set, however the value could be null
|
boolean |
hasType()
Checks whether the 'type' field has been set, however the value could be null
|
boolean |
isNotNullAmount()
Checks whether the 'amount' field is set and is not null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullMerchantAdditionalChargeRef()
Checks whether the 'merchantAdditionalChargeRef' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullPercentageDecimal()
Checks whether the 'percentageDecimal' field is set and is not null
|
boolean |
isNotNullType()
Checks whether the 'type' field is set and is not null
|
void |
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() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<AdditionalCharge> CREATOR
public static final JSONifiable.Creator<AdditionalCharge> JSON_CREATOR
public AdditionalCharge()
protected AdditionalCharge(boolean noInit)
public AdditionalCharge(String json) throws IllegalArgumentException
IllegalArgumentException
public AdditionalCharge(JSONObject jsonObject)
public AdditionalCharge(AdditionalCharge src)
public String getId()
public Reference getMerchantAdditionalChargeRef()
public AdditionalChargeType getType()
public Long getAmount()
public Long getPercentageDecimal()
public Long getCreatedTime()
public Long getModifiedTime()
public Long getDeletedTime()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullMerchantAdditionalChargeRef()
public boolean isNotNullType()
public boolean isNotNullAmount()
public boolean isNotNullPercentageDecimal()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullDeletedTime()
public boolean hasId()
public boolean hasMerchantAdditionalChargeRef()
public boolean hasType()
public boolean hasAmount()
public boolean hasPercentageDecimal()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasDeletedTime()
public AdditionalCharge setId(String id)
public AdditionalCharge setMerchantAdditionalChargeRef(Reference merchantAdditionalChargeRef)
public AdditionalCharge setType(AdditionalChargeType type)
public AdditionalCharge setAmount(Long amount)
public AdditionalCharge setPercentageDecimal(Long percentageDecimal)
public AdditionalCharge setCreatedTime(Long createdTime)
public AdditionalCharge setModifiedTime(Long modifiedTime)
public AdditionalCharge setDeletedTime(Long deletedTime)
public void clearId()
public void clearMerchantAdditionalChargeRef()
public void clearType()
public void clearAmount()
public void clearPercentageDecimal()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearDeletedTime()
public boolean containsChanges()
public void resetChangeLog()
public AdditionalCharge copyChanges()
public void mergeChanges(AdditionalCharge src)