Package com.clover.sdk.v3.customers
Class CustomerMetadata
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.customers.CustomerMetadata
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class CustomerMetadata 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
CustomerMetadata.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<CustomerMetadata>
CREATOR
static JSONifiable.Creator<CustomerMetadata>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description CustomerMetadata()
Constructs a new empty instance.protected
CustomerMetadata(boolean noInit)
Constructs a new empty instance.CustomerMetadata(CustomerMetadata src)
Constructs a new instance that is a deep copy of the source instance.CustomerMetadata(String json)
Constructs a new instance from the given JSON String.CustomerMetadata(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
clearBusinessName()
Clears the 'businessName' field, the 'has' method for this field will now return falsevoid
clearCustomer()
Clears the 'customer' field, the 'has' method for this field will now return falsevoid
clearDobDay()
Clears the 'dobDay' field, the 'has' method for this field will now return falsevoid
clearDobMonth()
Clears the 'dobMonth' field, the 'has' method for this field will now return falsevoid
clearDobYear()
Clears the 'dobYear' 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
clearNote()
Clears the 'note' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.CustomerMetadata
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.String
getBusinessName()
The name of the business the customer is associated with.Reference
getCustomer()
Customer who this metadata belongs to.Integer
getDobDay()
The day part of the date of birth for this customer.Integer
getDobMonth()
The month part of the date of birth for this customer.Integer
getDobYear()
The year part of the date of birth for this customer.protected GenericClient
getGenericClient()
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()
The timestamp from when this customer's data was last updated.String
getNote()
A note about the customer.boolean
hasBusinessName()
Checks whether the 'businessName' field has been set, however the value could be nullboolean
hasCustomer()
Checks whether the 'customer' field has been set, however the value could be nullboolean
hasDobDay()
Checks whether the 'dobDay' field has been set, however the value could be nullboolean
hasDobMonth()
Checks whether the 'dobMonth' field has been set, however the value could be nullboolean
hasDobYear()
Checks whether the 'dobYear' 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
hasNote()
Checks whether the 'note' field has been set, however the value could be nullboolean
isNotNullBusinessName()
Checks whether the 'businessName' field is set and is not nullboolean
isNotNullCustomer()
Checks whether the 'customer' field is set and is not nullboolean
isNotNullDobDay()
Checks whether the 'dobDay' field is set and is not nullboolean
isNotNullDobMonth()
Checks whether the 'dobMonth' field is set and is not nullboolean
isNotNullDobYear()
Checks whether the 'dobYear' field is set and is not nullboolean
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not nullboolean
isNotNullNote()
Checks whether the 'note' field is set and is not nullvoid
mergeChanges(CustomerMetadata 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.CustomerMetadata
setBusinessName(String businessName)
Sets the field 'businessName'.CustomerMetadata
setCustomer(Reference customer)
Sets the field 'customer'.CustomerMetadata
setDobDay(Integer dobDay)
Sets the field 'dobDay'.CustomerMetadata
setDobMonth(Integer dobMonth)
Sets the field 'dobMonth'.CustomerMetadata
setDobYear(Integer dobYear)
Sets the field 'dobYear'.CustomerMetadata
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.CustomerMetadata
setNote(String note)
Sets the field 'note'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<CustomerMetadata> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<CustomerMetadata> JSON_CREATOR
-
-
Constructor Detail
-
CustomerMetadata
public CustomerMetadata()
Constructs a new empty instance.
-
CustomerMetadata
protected CustomerMetadata(boolean noInit)
Constructs a new empty instance.
-
CustomerMetadata
public CustomerMetadata(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
CustomerMetadata
public CustomerMetadata(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.
-
CustomerMetadata
public CustomerMetadata(CustomerMetadata src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getBusinessName
public String getBusinessName()
The name of the business the customer is associated with.
-
getNote
public String getNote()
A note about the customer.
-
getDobYear
public Integer getDobYear()
The year part of the date of birth for this customer. This part of the date of birth is optional, i.e., it's possible that only dobMonth and dobDay are populated.
-
getDobMonth
public Integer getDobMonth()
The month part of the date of birth for this customer.
-
getDobDay
public Integer getDobDay()
The day part of the date of birth for this customer.
-
getModifiedTime
public Long getModifiedTime()
The timestamp from when this customer's data was last updated.
-
getCustomer
public Reference getCustomer()
Customer who this metadata belongs to.
-
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
-
isNotNullBusinessName
public boolean isNotNullBusinessName()
Checks whether the 'businessName' field is set and is not null
-
isNotNullNote
public boolean isNotNullNote()
Checks whether the 'note' field is set and is not null
-
isNotNullDobYear
public boolean isNotNullDobYear()
Checks whether the 'dobYear' field is set and is not null
-
isNotNullDobMonth
public boolean isNotNullDobMonth()
Checks whether the 'dobMonth' field is set and is not null
-
isNotNullDobDay
public boolean isNotNullDobDay()
Checks whether the 'dobDay' field is set and is not null
-
isNotNullModifiedTime
public boolean isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
-
isNotNullCustomer
public boolean isNotNullCustomer()
Checks whether the 'customer' field is set and is not null
-
hasBusinessName
public boolean hasBusinessName()
Checks whether the 'businessName' field has been set, however the value could be null
-
hasNote
public boolean hasNote()
Checks whether the 'note' field has been set, however the value could be null
-
hasDobYear
public boolean hasDobYear()
Checks whether the 'dobYear' field has been set, however the value could be null
-
hasDobMonth
public boolean hasDobMonth()
Checks whether the 'dobMonth' field has been set, however the value could be null
-
hasDobDay
public boolean hasDobDay()
Checks whether the 'dobDay' 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
-
hasCustomer
public boolean hasCustomer()
Checks whether the 'customer' field has been set, however the value could be null
-
setBusinessName
public CustomerMetadata setBusinessName(String businessName)
Sets the field 'businessName'.
-
setNote
public CustomerMetadata setNote(String note)
Sets the field 'note'.
-
setDobYear
public CustomerMetadata setDobYear(Integer dobYear)
Sets the field 'dobYear'.
-
setDobMonth
public CustomerMetadata setDobMonth(Integer dobMonth)
Sets the field 'dobMonth'.
-
setDobDay
public CustomerMetadata setDobDay(Integer dobDay)
Sets the field 'dobDay'.
-
setModifiedTime
public CustomerMetadata setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
-
setCustomer
public CustomerMetadata setCustomer(Reference customer)
Sets the field 'customer'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
clearBusinessName
public void clearBusinessName()
Clears the 'businessName' field, the 'has' method for this field will now return false
-
clearNote
public void clearNote()
Clears the 'note' field, the 'has' method for this field will now return false
-
clearDobYear
public void clearDobYear()
Clears the 'dobYear' field, the 'has' method for this field will now return false
-
clearDobMonth
public void clearDobMonth()
Clears the 'dobMonth' field, the 'has' method for this field will now return false
-
clearDobDay
public void clearDobDay()
Clears the 'dobDay' 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
-
clearCustomer
public void clearCustomer()
Clears the 'customer' 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 CustomerMetadata copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(CustomerMetadata src)
Copy all the changed fields from the given source to this instance.
-
-