public class WebHook extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
WebHook.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<WebHook> |
CREATOR |
static JSONifiable.Creator<WebHook> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
WebHook()
Constructs a new empty instance.
|
protected |
WebHook(boolean noInit)
Constructs a new empty instance.
|
|
WebHook(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.
|
|
WebHook(String json)
Constructs a new instance from the given JSON String.
|
|
WebHook(WebHook src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearApp()
Clears the 'app' field, the 'has' method for this field will now return false
|
void |
clearCashAdjustment()
Clears the 'cashAdjustment' field, the 'has' method for this field will now return false
|
void |
clearCustomers()
Clears the 'customers' field, the 'has' method for this field will now return false
|
void |
clearEmployees()
Clears the 'employees' field, the 'has' method for this field will now return false
|
void |
clearExports()
Clears the 'exports' field, the 'has' method for this field will now return false
|
void |
clearInventory()
Clears the 'inventory' field, the 'has' method for this field will now return false
|
void |
clearMerchants()
Clears the 'merchants' field, the 'has' method for this field will now return false
|
void |
clearOrders()
Clears the 'orders' field, the 'has' method for this field will now return false
|
void |
clearPayments()
Clears the 'payments' field, the 'has' method for this field will now return false
|
void |
clearSecret()
Clears the 'secret' field, the 'has' method for this field will now return false
|
void |
clearUrl()
Clears the 'url' field, the 'has' method for this field will now return false
|
void |
clearValid()
Clears the 'valid' field, the 'has' method for this field will now return false
|
void |
clearVerification()
Clears the 'verification' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
WebHook |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Boolean |
getApp() |
Boolean |
getCashAdjustment() |
Boolean |
getCustomers() |
Boolean |
getEmployees()
Webhook subscription for employee create/update/delete
|
Boolean |
getExports() |
protected GenericClient |
getGenericClient() |
Boolean |
getInventory() |
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.
|
Boolean |
getMerchants() |
Boolean |
getOrders() |
Boolean |
getPayments() |
String |
getSecret()
A secret string included as a header in the HTTP request from Clover to the developer's web hook callback URL.
|
String |
getUrl() |
Boolean |
getValid() |
String |
getVerification()
The verification code that was sent to the developer's web hook callback URL.
|
boolean |
hasApp()
Checks whether the 'app' field has been set, however the value could be null
|
boolean |
hasCashAdjustment()
Checks whether the 'cashAdjustment' field has been set, however the value could be null
|
boolean |
hasCustomers()
Checks whether the 'customers' field has been set, however the value could be null
|
boolean |
hasEmployees()
Checks whether the 'employees' field has been set, however the value could be null
|
boolean |
hasExports()
Checks whether the 'exports' field has been set, however the value could be null
|
boolean |
hasInventory()
Checks whether the 'inventory' field has been set, however the value could be null
|
boolean |
hasMerchants()
Checks whether the 'merchants' field has been set, however the value could be null
|
boolean |
hasOrders()
Checks whether the 'orders' field has been set, however the value could be null
|
boolean |
hasPayments()
Checks whether the 'payments' field has been set, however the value could be null
|
boolean |
hasSecret()
Checks whether the 'secret' field has been set, however the value could be null
|
boolean |
hasUrl()
Checks whether the 'url' field has been set, however the value could be null
|
boolean |
hasValid()
Checks whether the 'valid' field has been set, however the value could be null
|
boolean |
hasVerification()
Checks whether the 'verification' field has been set, however the value could be null
|
boolean |
isNotNullApp()
Checks whether the 'app' field is set and is not null
|
boolean |
isNotNullCashAdjustment()
Checks whether the 'cashAdjustment' field is set and is not null
|
boolean |
isNotNullCustomers()
Checks whether the 'customers' field is set and is not null
|
boolean |
isNotNullEmployees()
Checks whether the 'employees' field is set and is not null
|
boolean |
isNotNullExports()
Checks whether the 'exports' field is set and is not null
|
boolean |
isNotNullInventory()
Checks whether the 'inventory' field is set and is not null
|
boolean |
isNotNullMerchants()
Checks whether the 'merchants' field is set and is not null
|
boolean |
isNotNullOrders()
Checks whether the 'orders' field is set and is not null
|
boolean |
isNotNullPayments()
Checks whether the 'payments' field is set and is not null
|
boolean |
isNotNullSecret()
Checks whether the 'secret' field is set and is not null
|
boolean |
isNotNullUrl()
Checks whether the 'url' field is set and is not null
|
boolean |
isNotNullValid()
Checks whether the 'valid' field is set and is not null
|
boolean |
isNotNullVerification()
Checks whether the 'verification' field is set and is not null
|
void |
mergeChanges(WebHook 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.
|
WebHook |
setApp(Boolean app)
Sets the field 'app'.
|
WebHook |
setCashAdjustment(Boolean cashAdjustment)
Sets the field 'cashAdjustment'.
|
WebHook |
setCustomers(Boolean customers)
Sets the field 'customers'.
|
WebHook |
setEmployees(Boolean employees)
Sets the field 'employees'.
|
WebHook |
setExports(Boolean exports)
Sets the field 'exports'.
|
WebHook |
setInventory(Boolean inventory)
Sets the field 'inventory'.
|
WebHook |
setMerchants(Boolean merchants)
Sets the field 'merchants'.
|
WebHook |
setOrders(Boolean orders)
Sets the field 'orders'.
|
WebHook |
setPayments(Boolean payments)
Sets the field 'payments'.
|
WebHook |
setSecret(String secret)
Sets the field 'secret'.
|
WebHook |
setUrl(String url)
Sets the field 'url'.
|
WebHook |
setValid(Boolean valid)
Sets the field 'valid'.
|
WebHook |
setVerification(String verification)
Sets the field 'verification'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<WebHook> CREATOR
public static final JSONifiable.Creator<WebHook> JSON_CREATOR
public WebHook()
protected WebHook(boolean noInit)
public WebHook(String json) throws IllegalArgumentException
IllegalArgumentException
public WebHook(JSONObject jsonObject)
public WebHook(WebHook src)
public String getUrl()
public String getSecret()
public Boolean getValid()
public String getVerification()
public Boolean getOrders()
public Boolean getApp()
public Boolean getPayments()
public Boolean getInventory()
public Boolean getCustomers()
public Boolean getMerchants()
public Boolean getEmployees()
public Boolean getCashAdjustment()
public Boolean getExports()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullUrl()
public boolean isNotNullSecret()
public boolean isNotNullValid()
public boolean isNotNullVerification()
public boolean isNotNullOrders()
public boolean isNotNullApp()
public boolean isNotNullPayments()
public boolean isNotNullInventory()
public boolean isNotNullCustomers()
public boolean isNotNullMerchants()
public boolean isNotNullEmployees()
public boolean isNotNullCashAdjustment()
public boolean isNotNullExports()
public boolean hasUrl()
public boolean hasSecret()
public boolean hasValid()
public boolean hasVerification()
public boolean hasOrders()
public boolean hasApp()
public boolean hasPayments()
public boolean hasInventory()
public boolean hasCustomers()
public boolean hasMerchants()
public boolean hasEmployees()
public boolean hasCashAdjustment()
public boolean hasExports()
public WebHook setCashAdjustment(Boolean cashAdjustment)
public void clearUrl()
public void clearSecret()
public void clearValid()
public void clearVerification()
public void clearOrders()
public void clearApp()
public void clearPayments()
public void clearInventory()
public void clearCustomers()
public void clearMerchants()
public void clearEmployees()
public void clearCashAdjustment()
public void clearExports()
public boolean containsChanges()
public void resetChangeLog()
public WebHook copyChanges()
public void mergeChanges(WebHook src)