public class TaxRate extends GenericParcelable implements Validator, JSONifiable
IInventoryService
Modifier and Type | Class and Description |
---|---|
static interface |
TaxRate.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<TaxRate> |
CREATOR |
static JSONifiable.Creator<TaxRate> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
TaxRate()
Constructs a new empty instance.
|
protected |
TaxRate(boolean noInit)
Constructs a new empty instance.
|
|
TaxRate(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.
|
|
TaxRate(String json)
Constructs a new instance from the given JSON String.
|
|
TaxRate(TaxRate src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
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 |
clearIsDefault()
Clears the 'isDefault' field, the 'has' method for this field will now return false
|
void |
clearItems()
Clears the 'items' 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 |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearRate()
Clears the 'rate' field, the 'has' method for this field will now return false
|
void |
clearTaxAmount()
Clears the 'taxAmount' field, the 'has' method for this field will now return false
|
void |
clearTaxType()
Clears the 'taxType' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
TaxRate |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getDeletedTime()
Timestamp when tax rate was last deleted
|
protected GenericClient |
getGenericClient() |
String |
getId() |
Boolean |
getIsDefault() |
List<Reference> |
getItems()
Items associated with this tax rate
|
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.
|
Long |
getModifiedTime()
Timestamp when tax rate was last modified
|
String |
getName() |
Long |
getRate()
For percentage based discounts like sales tax
|
Long |
getTaxAmount()
For a flat tax like recycling redemption fee, expressed as number of cents
|
TaxType |
getTaxType()
to support Argentina's tax type
|
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 |
hasIsDefault()
Checks whether the 'isDefault' field has been set, however the value could be null
|
boolean |
hasItems()
Checks whether the 'items' 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 |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasRate()
Checks whether the 'rate' field has been set, however the value could be null
|
boolean |
hasTaxAmount()
Checks whether the 'taxAmount' field has been set, however the value could be null
|
boolean |
hasTaxType()
Checks whether the 'taxType' field has been set, however the value could be null
|
boolean |
isNotEmptyItems()
Checks whether the 'items' field is set and is not null and is not empty
|
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 |
isNotNullIsDefault()
Checks whether the 'isDefault' field is set and is not null
|
boolean |
isNotNullItems()
Checks whether the 'items' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullRate()
Checks whether the 'rate' field is set and is not null
|
boolean |
isNotNullTaxAmount()
Checks whether the 'taxAmount' field is set and is not null
|
boolean |
isNotNullTaxType()
Checks whether the 'taxType' field is set and is not null
|
void |
mergeChanges(TaxRate 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.
|
TaxRate |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
TaxRate |
setId(String id)
Sets the field 'id'.
|
TaxRate |
setIsDefault(Boolean isDefault)
Sets the field 'isDefault'.
|
TaxRate |
setItems(List<Reference> items)
Sets the field 'items'.
|
TaxRate |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
TaxRate |
setName(String name)
Sets the field 'name'.
|
TaxRate |
setRate(Long rate)
Sets the field 'rate'.
|
TaxRate |
setTaxAmount(Long taxAmount)
Sets the field 'taxAmount'.
|
TaxRate |
setTaxType(TaxType taxType)
Sets the field 'taxType'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<TaxRate> CREATOR
public static final JSONifiable.Creator<TaxRate> JSON_CREATOR
public TaxRate()
protected TaxRate(boolean noInit)
public TaxRate(String json) throws IllegalArgumentException
IllegalArgumentException
public TaxRate(JSONObject jsonObject)
public TaxRate(TaxRate src)
public String getId()
public String getName()
public TaxType getTaxType()
public Long getRate()
public Boolean getIsDefault()
public Long getTaxAmount()
public Long getDeletedTime()
public Long getModifiedTime()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullTaxType()
public boolean isNotNullRate()
public boolean isNotNullIsDefault()
public boolean isNotNullItems()
public boolean isNotEmptyItems()
public boolean isNotNullTaxAmount()
public boolean isNotNullDeletedTime()
public boolean isNotNullModifiedTime()
public boolean hasId()
public boolean hasName()
public boolean hasTaxType()
public boolean hasRate()
public boolean hasIsDefault()
public boolean hasItems()
public boolean hasTaxAmount()
public boolean hasDeletedTime()
public boolean hasModifiedTime()
public TaxRate setItems(List<Reference> items)
public void clearId()
public void clearName()
public void clearTaxType()
public void clearRate()
public void clearIsDefault()
public void clearItems()
public void clearTaxAmount()
public void clearDeletedTime()
public void clearModifiedTime()
public boolean containsChanges()
public void resetChangeLog()
public TaxRate copyChanges()
public void mergeChanges(TaxRate src)