Package com.clover.sdk.v3.payments
Class TaxableAmountRate
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.TaxableAmountRate
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class TaxableAmountRate 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
TaxableAmountRate.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<TaxableAmountRate>
CREATOR
static JSONifiable.Creator<TaxableAmountRate>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description TaxableAmountRate()
Constructs a new empty instance.protected
TaxableAmountRate(boolean noInit)
Constructs a new empty instance.TaxableAmountRate(TaxableAmountRate src)
Constructs a new instance that is a deep copy of the source instance.TaxableAmountRate(String json)
Constructs a new instance from the given JSON String.TaxableAmountRate(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
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearIsVat()
Clears the 'isVat' field, the 'has' method for this field will now return falsevoid
clearName()
Clears the 'name' field, the 'has' method for this field will now return falsevoid
clearRate()
Clears the 'rate' field, the 'has' method for this field will now return falsevoid
clearTaxableAmount()
Clears the 'taxableAmount' 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
clearTransactionRef()
Clears the 'transactionRef' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.TaxableAmountRate
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.protected GenericClient
getGenericClient()
String
getId()
Tax rate id.Boolean
getIsVat()
Whether the taxable amount includes tax.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.String
getName()
Tax rate name.Long
getRate()
The tax rate.Long
getTaxableAmount()
The sub-total of line items that the tax was based on.Long
getTaxAmount()
The amount of tax collected.Reference
getTransactionRef()
The refund with which the tax rate is associatedboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasIsVat()
Checks whether the 'isVat' field has been set, however the value could be nullboolean
hasName()
Checks whether the 'name' field has been set, however the value could be nullboolean
hasRate()
Checks whether the 'rate' field has been set, however the value could be nullboolean
hasTaxableAmount()
Checks whether the 'taxableAmount' 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
hasTransactionRef()
Checks whether the 'transactionRef' field has been set, however the value could be nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullIsVat()
Checks whether the 'isVat' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullRate()
Checks whether the 'rate' field is set and is not nullboolean
isNotNullTaxableAmount()
Checks whether the 'taxableAmount' field is set and is not nullboolean
isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not nullboolean
isNotNullTransactionRef()
Checks whether the 'transactionRef' field is set and is not nullvoid
mergeChanges(TaxableAmountRate 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.TaxableAmountRate
setId(String id)
Sets the field 'id'.TaxableAmountRate
setIsVat(Boolean isVat)
Sets the field 'isVat'.TaxableAmountRate
setName(String name)
Sets the field 'name'.TaxableAmountRate
setRate(Long rate)
Sets the field 'rate'.TaxableAmountRate
setTaxableAmount(Long taxableAmount)
Sets the field 'taxableAmount'.TaxableAmountRate
setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.TaxableAmountRate
setTransactionRef(Reference transactionRef)
Sets the field 'transactionRef'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<TaxableAmountRate> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<TaxableAmountRate> JSON_CREATOR
-
-
Constructor Detail
-
TaxableAmountRate
public TaxableAmountRate()
Constructs a new empty instance.
-
TaxableAmountRate
protected TaxableAmountRate(boolean noInit)
Constructs a new empty instance.
-
TaxableAmountRate
public TaxableAmountRate(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
TaxableAmountRate
public TaxableAmountRate(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.
-
TaxableAmountRate
public TaxableAmountRate(TaxableAmountRate 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()
Tax rate id.
-
getName
public String getName()
Tax rate name. This field is optional.
-
getTaxableAmount
public Long getTaxableAmount()
The sub-total of line items that the tax was based on. For VAT, this amount includes tax. For all others, this amount does not include tax.
-
getRate
public Long getRate()
The tax rate. 100% = 1e7.
-
getIsVat
public Boolean getIsVat()
Whether the taxable amount includes tax.
-
getTaxAmount
public Long getTaxAmount()
The amount of tax collected. In cases where there are multiple payments for an order then it may be necessary to add an extra cent of tax to the last payment.
-
getTransactionRef
public Reference getTransactionRef()
The refund with which the tax rate is associated
-
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
-
isNotNullName
public boolean isNotNullName()
Checks whether the 'name' field is set and is not null
-
isNotNullTaxableAmount
public boolean isNotNullTaxableAmount()
Checks whether the 'taxableAmount' field is set and is not null
-
isNotNullRate
public boolean isNotNullRate()
Checks whether the 'rate' field is set and is not null
-
isNotNullIsVat
public boolean isNotNullIsVat()
Checks whether the 'isVat' field is set and is not null
-
isNotNullTaxAmount
public boolean isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not null
-
isNotNullTransactionRef
public boolean isNotNullTransactionRef()
Checks whether the 'transactionRef' 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
-
hasName
public boolean hasName()
Checks whether the 'name' field has been set, however the value could be null
-
hasTaxableAmount
public boolean hasTaxableAmount()
Checks whether the 'taxableAmount' field has been set, however the value could be null
-
hasRate
public boolean hasRate()
Checks whether the 'rate' field has been set, however the value could be null
-
hasIsVat
public boolean hasIsVat()
Checks whether the 'isVat' 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
-
hasTransactionRef
public boolean hasTransactionRef()
Checks whether the 'transactionRef' field has been set, however the value could be null
-
setId
public TaxableAmountRate setId(String id)
Sets the field 'id'.
-
setName
public TaxableAmountRate setName(String name)
Sets the field 'name'.
-
setTaxableAmount
public TaxableAmountRate setTaxableAmount(Long taxableAmount)
Sets the field 'taxableAmount'.
-
setRate
public TaxableAmountRate setRate(Long rate)
Sets the field 'rate'.
-
setIsVat
public TaxableAmountRate setIsVat(Boolean isVat)
Sets the field 'isVat'.
-
setTaxAmount
public TaxableAmountRate setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.
-
setTransactionRef
public TaxableAmountRate setTransactionRef(Reference transactionRef)
Sets the field 'transactionRef'. 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
-
clearName
public void clearName()
Clears the 'name' field, the 'has' method for this field will now return false
-
clearTaxableAmount
public void clearTaxableAmount()
Clears the 'taxableAmount' field, the 'has' method for this field will now return false
-
clearRate
public void clearRate()
Clears the 'rate' field, the 'has' method for this field will now return false
-
clearIsVat
public void clearIsVat()
Clears the 'isVat' 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
-
clearTransactionRef
public void clearTransactionRef()
Clears the 'transactionRef' 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 TaxableAmountRate copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(TaxableAmountRate src)
Copy all the changed fields from the given source to this instance.
-
-