Package com.clover.sdk.v3.employees
Class Employee
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.employees.Employee
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class Employee 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
Employee.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<Employee>
CREATOR
static JSONifiable.Creator<Employee>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description Employee()
Constructs a new empty instance.protected
Employee(boolean noInit)
Constructs a new empty instance.Employee(Employee src)
Constructs a new instance that is a deep copy of the source instance.Employee(String json)
Constructs a new instance from the given JSON String.Employee(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
clearClaimedTime()
Clears the 'claimedTime' field, the 'has' method for this field will now return falsevoid
clearCustomId()
Clears the 'customId' 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
clearEmail()
Clears the 'email' field, the 'has' method for this field will now return falsevoid
clearEmployeeCards()
Clears the 'employeeCards' 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
clearInviteSent()
Clears the 'inviteSent' field, the 'has' method for this field will now return falsevoid
clearIsOwner()
Clears the 'isOwner' field, the 'has' method for this field will now return falsevoid
clearMerchant()
Clears the 'merchant' 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
clearNickname()
Clears the 'nickname' field, the 'has' method for this field will now return falsevoid
clearOrders()
Clears the 'orders' field, the 'has' method for this field will now return falsevoid
clearPayments()
Clears the 'payments' field, the 'has' method for this field will now return falsevoid
clearPin()
Clears the 'pin' field, the 'has' method for this field will now return falsevoid
clearRole()
Clears the 'role' field, the 'has' method for this field will now return falsevoid
clearRoles()
Clears the 'roles' field, the 'has' method for this field will now return falsevoid
clearShifts()
Clears the 'shifts' field, the 'has' method for this field will now return falsevoid
clearUnhashedPin()
Clears the 'unhashedPin' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.Employee
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Long
getClaimedTime()
Timestamp of when this employee claimed their accountString
getCustomId()
Custom ID of the employeeLong
getDeletedTime()
Timestamp of when this employee was deletedString
getEmail()
Email of the employee (optional)List<Reference>
getEmployeeCards()
This employee's employee cardsprotected GenericClient
getGenericClient()
String
getId()
Unique identifierBoolean
getInviteSent()
Returns true if this employee was sent an invite to activate their accountBoolean
getIsOwner()
Returns true if this employee is the owner account for this merchantJSONObject
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
getMerchant()
The merchant employing this employeeString
getName()
Full name of the employeeString
getNickname()
Nickname of the employee (shows up on receipts)List<Reference>
getOrders()
This employee's ordersList<Reference>
getPayments()
This employee's paymentsString
getPin()
Employee PIN (hashed)AccountRole
getRole()
Employee System RoleList<Reference>
getRoles()
List<Reference>
getShifts()
This employee's shiftsString
getUnhashedPin()
Employee PINboolean
hasClaimedTime()
Checks whether the 'claimedTime' field has been set, however the value could be nullboolean
hasCustomId()
Checks whether the 'customId' 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
hasEmail()
Checks whether the 'email' field has been set, however the value could be nullboolean
hasEmployeeCards()
Checks whether the 'employeeCards' 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
hasInviteSent()
Checks whether the 'inviteSent' field has been set, however the value could be nullboolean
hasIsOwner()
Checks whether the 'isOwner' field has been set, however the value could be nullboolean
hasMerchant()
Checks whether the 'merchant' 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
hasNickname()
Checks whether the 'nickname' field has been set, however the value could be nullboolean
hasOrders()
Checks whether the 'orders' field has been set, however the value could be nullboolean
hasPayments()
Checks whether the 'payments' field has been set, however the value could be nullboolean
hasPin()
Checks whether the 'pin' field has been set, however the value could be nullboolean
hasRole()
Checks whether the 'role' field has been set, however the value could be nullboolean
hasRoles()
Checks whether the 'roles' field has been set, however the value could be nullboolean
hasShifts()
Checks whether the 'shifts' field has been set, however the value could be nullboolean
hasUnhashedPin()
Checks whether the 'unhashedPin' field has been set, however the value could be nullboolean
isNotEmptyEmployeeCards()
Checks whether the 'employeeCards' field is set and is not null and is not emptyboolean
isNotEmptyOrders()
Checks whether the 'orders' field is set and is not null and is not emptyboolean
isNotEmptyPayments()
Checks whether the 'payments' field is set and is not null and is not emptyboolean
isNotEmptyRoles()
Checks whether the 'roles' field is set and is not null and is not emptyboolean
isNotEmptyShifts()
Checks whether the 'shifts' field is set and is not null and is not emptyboolean
isNotNullClaimedTime()
Checks whether the 'claimedTime' field is set and is not nullboolean
isNotNullCustomId()
Checks whether the 'customId' field is set and is not nullboolean
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not nullboolean
isNotNullEmail()
Checks whether the 'email' field is set and is not nullboolean
isNotNullEmployeeCards()
Checks whether the 'employeeCards' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullInviteSent()
Checks whether the 'inviteSent' field is set and is not nullboolean
isNotNullIsOwner()
Checks whether the 'isOwner' field is set and is not nullboolean
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullNickname()
Checks whether the 'nickname' field is set and is not nullboolean
isNotNullOrders()
Checks whether the 'orders' field is set and is not nullboolean
isNotNullPayments()
Checks whether the 'payments' field is set and is not nullboolean
isNotNullPin()
Checks whether the 'pin' field is set and is not nullboolean
isNotNullRole()
Checks whether the 'role' field is set and is not nullboolean
isNotNullRoles()
Checks whether the 'roles' field is set and is not nullboolean
isNotNullShifts()
Checks whether the 'shifts' field is set and is not nullboolean
isNotNullUnhashedPin()
Checks whether the 'unhashedPin' field is set and is not nullvoid
mergeChanges(Employee 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.Employee
setClaimedTime(Long claimedTime)
Sets the field 'claimedTime'.Employee
setCustomId(String customId)
Sets the field 'customId'.Employee
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.Employee
setEmail(String email)
Sets the field 'email'.Employee
setEmployeeCards(List<Reference> employeeCards)
Sets the field 'employeeCards'.Employee
setId(String id)
Sets the field 'id'.Employee
setInviteSent(Boolean inviteSent)
Sets the field 'inviteSent'.Employee
setIsOwner(Boolean isOwner)
Sets the field 'isOwner'.Employee
setMerchant(Reference merchant)
Sets the field 'merchant'.Employee
setName(String name)
Sets the field 'name'.Employee
setNickname(String nickname)
Sets the field 'nickname'.Employee
setOrders(List<Reference> orders)
Sets the field 'orders'.Employee
setPayments(List<Reference> payments)
Sets the field 'payments'.Employee
setPin(String pin)
Sets the field 'pin'.Employee
setRole(AccountRole role)
Sets the field 'role'.Employee
setRoles(List<Reference> roles)
Sets the field 'roles'.Employee
setShifts(List<Reference> shifts)
Sets the field 'shifts'.Employee
setUnhashedPin(String unhashedPin)
Sets the field 'unhashedPin'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<Employee> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<Employee> JSON_CREATOR
-
-
Constructor Detail
-
Employee
public Employee()
Constructs a new empty instance.
-
Employee
protected Employee(boolean noInit)
Constructs a new empty instance.
-
Employee
public Employee(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
Employee
public Employee(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.
-
Employee
public Employee(Employee 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
-
getName
public String getName()
Full name of the employee
-
getNickname
public String getNickname()
Nickname of the employee (shows up on receipts)
-
getCustomId
public String getCustomId()
Custom ID of the employee
-
getEmail
public String getEmail()
Email of the employee (optional)
-
getInviteSent
public Boolean getInviteSent()
Returns true if this employee was sent an invite to activate their account
-
getClaimedTime
public Long getClaimedTime()
Timestamp of when this employee claimed their account
-
getDeletedTime
public Long getDeletedTime()
Timestamp of when this employee was deleted
-
getPin
public String getPin()
Employee PIN (hashed)
-
getUnhashedPin
public String getUnhashedPin()
Employee PIN
-
getRole
public AccountRole getRole()
Employee System Role
-
getIsOwner
public Boolean getIsOwner()
Returns true if this employee is the owner account for this merchant
-
getMerchant
public Reference getMerchant()
The merchant employing this employee
-
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
-
isNotNullNickname
public boolean isNotNullNickname()
Checks whether the 'nickname' field is set and is not null
-
isNotNullCustomId
public boolean isNotNullCustomId()
Checks whether the 'customId' field is set and is not null
-
isNotNullEmail
public boolean isNotNullEmail()
Checks whether the 'email' field is set and is not null
-
isNotNullInviteSent
public boolean isNotNullInviteSent()
Checks whether the 'inviteSent' field is set and is not null
-
isNotNullClaimedTime
public boolean isNotNullClaimedTime()
Checks whether the 'claimedTime' field is set and is not null
-
isNotNullDeletedTime
public boolean isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not null
-
isNotNullPin
public boolean isNotNullPin()
Checks whether the 'pin' field is set and is not null
-
isNotNullUnhashedPin
public boolean isNotNullUnhashedPin()
Checks whether the 'unhashedPin' field is set and is not null
-
isNotNullRole
public boolean isNotNullRole()
Checks whether the 'role' field is set and is not null
-
isNotNullRoles
public boolean isNotNullRoles()
Checks whether the 'roles' field is set and is not null
-
isNotEmptyRoles
public boolean isNotEmptyRoles()
Checks whether the 'roles' field is set and is not null and is not empty
-
isNotNullIsOwner
public boolean isNotNullIsOwner()
Checks whether the 'isOwner' field is set and is not null
-
isNotNullShifts
public boolean isNotNullShifts()
Checks whether the 'shifts' field is set and is not null
-
isNotEmptyShifts
public boolean isNotEmptyShifts()
Checks whether the 'shifts' field is set and is not null and is not empty
-
isNotNullPayments
public boolean isNotNullPayments()
Checks whether the 'payments' field is set and is not null
-
isNotEmptyPayments
public boolean isNotEmptyPayments()
Checks whether the 'payments' field is set and is not null and is not empty
-
isNotNullOrders
public boolean isNotNullOrders()
Checks whether the 'orders' field is set and is not null
-
isNotEmptyOrders
public boolean isNotEmptyOrders()
Checks whether the 'orders' field is set and is not null and is not empty
-
isNotNullEmployeeCards
public boolean isNotNullEmployeeCards()
Checks whether the 'employeeCards' field is set and is not null
-
isNotEmptyEmployeeCards
public boolean isNotEmptyEmployeeCards()
Checks whether the 'employeeCards' field is set and is not null and is not empty
-
isNotNullMerchant
public boolean isNotNullMerchant()
Checks whether the 'merchant' 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
-
hasNickname
public boolean hasNickname()
Checks whether the 'nickname' field has been set, however the value could be null
-
hasCustomId
public boolean hasCustomId()
Checks whether the 'customId' field has been set, however the value could be null
-
hasEmail
public boolean hasEmail()
Checks whether the 'email' field has been set, however the value could be null
-
hasInviteSent
public boolean hasInviteSent()
Checks whether the 'inviteSent' field has been set, however the value could be null
-
hasClaimedTime
public boolean hasClaimedTime()
Checks whether the 'claimedTime' 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
-
hasPin
public boolean hasPin()
Checks whether the 'pin' field has been set, however the value could be null
-
hasUnhashedPin
public boolean hasUnhashedPin()
Checks whether the 'unhashedPin' field has been set, however the value could be null
-
hasRole
public boolean hasRole()
Checks whether the 'role' field has been set, however the value could be null
-
hasRoles
public boolean hasRoles()
Checks whether the 'roles' field has been set, however the value could be null
-
hasIsOwner
public boolean hasIsOwner()
Checks whether the 'isOwner' field has been set, however the value could be null
-
hasShifts
public boolean hasShifts()
Checks whether the 'shifts' field has been set, however the value could be null
-
hasPayments
public boolean hasPayments()
Checks whether the 'payments' field has been set, however the value could be null
-
hasOrders
public boolean hasOrders()
Checks whether the 'orders' field has been set, however the value could be null
-
hasEmployeeCards
public boolean hasEmployeeCards()
Checks whether the 'employeeCards' field has been set, however the value could be null
-
hasMerchant
public boolean hasMerchant()
Checks whether the 'merchant' field has been set, however the value could be null
-
setRole
public Employee setRole(AccountRole role)
Sets the field 'role'.
-
setRoles
public Employee setRoles(List<Reference> roles)
Sets the field 'roles'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setShifts
public Employee setShifts(List<Reference> shifts)
Sets the field 'shifts'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setPayments
public Employee setPayments(List<Reference> payments)
Sets the field 'payments'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setOrders
public Employee setOrders(List<Reference> orders)
Sets the field 'orders'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setEmployeeCards
public Employee setEmployeeCards(List<Reference> employeeCards)
Sets the field 'employeeCards'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setMerchant
public Employee setMerchant(Reference merchant)
Sets the field 'merchant'. 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
-
clearNickname
public void clearNickname()
Clears the 'nickname' field, the 'has' method for this field will now return false
-
clearCustomId
public void clearCustomId()
Clears the 'customId' field, the 'has' method for this field will now return false
-
clearEmail
public void clearEmail()
Clears the 'email' field, the 'has' method for this field will now return false
-
clearInviteSent
public void clearInviteSent()
Clears the 'inviteSent' field, the 'has' method for this field will now return false
-
clearClaimedTime
public void clearClaimedTime()
Clears the 'claimedTime' 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
-
clearPin
public void clearPin()
Clears the 'pin' field, the 'has' method for this field will now return false
-
clearUnhashedPin
public void clearUnhashedPin()
Clears the 'unhashedPin' field, the 'has' method for this field will now return false
-
clearRole
public void clearRole()
Clears the 'role' field, the 'has' method for this field will now return false
-
clearRoles
public void clearRoles()
Clears the 'roles' field, the 'has' method for this field will now return false
-
clearIsOwner
public void clearIsOwner()
Clears the 'isOwner' field, the 'has' method for this field will now return false
-
clearShifts
public void clearShifts()
Clears the 'shifts' field, the 'has' method for this field will now return false
-
clearPayments
public void clearPayments()
Clears the 'payments' field, the 'has' method for this field will now return false
-
clearOrders
public void clearOrders()
Clears the 'orders' field, the 'has' method for this field will now return false
-
clearEmployeeCards
public void clearEmployeeCards()
Clears the 'employeeCards' field, the 'has' method for this field will now return false
-
clearMerchant
public void clearMerchant()
Clears the 'merchant' 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 Employee copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(Employee src)
Copy all the changed fields from the given source to this instance.
-
-