Package com.clover.sdk.v3.apps
Class WebHook
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.apps.WebHook
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class WebHook extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
WebHook.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<WebHook>
CREATOR
static JSONifiable.Creator<WebHook>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description WebHook()
Constructs a new empty instance.protected
WebHook(boolean noInit)
Constructs a new empty instance.WebHook(WebHook src)
Constructs a new instance that is a deep copy of the source instance.WebHook(String json)
Constructs a new instance from the given JSON String.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearApp()
Clears the 'app' field, the 'has' method for this field will now return falsevoid
clearCashAdjustment()
Clears the 'cashAdjustment' field, the 'has' method for this field will now return falsevoid
clearCustomers()
Clears the 'customers' field, the 'has' method for this field will now return falsevoid
clearEmployees()
Clears the 'employees' field, the 'has' method for this field will now return falsevoid
clearExports()
Clears the 'exports' field, the 'has' method for this field will now return falsevoid
clearInventory()
Clears the 'inventory' field, the 'has' method for this field will now return falsevoid
clearMerchants()
Clears the 'merchants' 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
clearSecret()
Clears the 'secret' field, the 'has' method for this field will now return falsevoid
clearUrl()
Clears the 'url' field, the 'has' method for this field will now return falsevoid
clearValid()
Clears the 'valid' field, the 'has' method for this field will now return falsevoid
clearVerification()
Clears the 'verification' field, the 'has' method for this field will now return falseboolean
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/deleteBoolean
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 nullboolean
hasCashAdjustment()
Checks whether the 'cashAdjustment' field has been set, however the value could be nullboolean
hasCustomers()
Checks whether the 'customers' field has been set, however the value could be nullboolean
hasEmployees()
Checks whether the 'employees' field has been set, however the value could be nullboolean
hasExports()
Checks whether the 'exports' field has been set, however the value could be nullboolean
hasInventory()
Checks whether the 'inventory' field has been set, however the value could be nullboolean
hasMerchants()
Checks whether the 'merchants' 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
hasSecret()
Checks whether the 'secret' field has been set, however the value could be nullboolean
hasUrl()
Checks whether the 'url' field has been set, however the value could be nullboolean
hasValid()
Checks whether the 'valid' field has been set, however the value could be nullboolean
hasVerification()
Checks whether the 'verification' field has been set, however the value could be nullboolean
isNotNullApp()
Checks whether the 'app' field is set and is not nullboolean
isNotNullCashAdjustment()
Checks whether the 'cashAdjustment' field is set and is not nullboolean
isNotNullCustomers()
Checks whether the 'customers' field is set and is not nullboolean
isNotNullEmployees()
Checks whether the 'employees' field is set and is not nullboolean
isNotNullExports()
Checks whether the 'exports' field is set and is not nullboolean
isNotNullInventory()
Checks whether the 'inventory' field is set and is not nullboolean
isNotNullMerchants()
Checks whether the 'merchants' 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
isNotNullSecret()
Checks whether the 'secret' field is set and is not nullboolean
isNotNullUrl()
Checks whether the 'url' field is set and is not nullboolean
isNotNullValid()
Checks whether the 'valid' field is set and is not nullboolean
isNotNullVerification()
Checks whether the 'verification' field is set and is not nullvoid
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()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<WebHook> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<WebHook> JSON_CREATOR
-
-
Constructor Detail
-
WebHook
public WebHook()
Constructs a new empty instance.
-
WebHook
protected WebHook(boolean noInit)
Constructs a new empty instance.
-
WebHook
public WebHook(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
WebHook
public 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
public WebHook(WebHook src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getUrl
public String getUrl()
-
getSecret
public String getSecret()
A secret string included as a header in the HTTP request from Clover to the developer's web hook callback URL.
-
getValid
public Boolean getValid()
-
getVerification
public String getVerification()
The verification code that was sent to the developer's web hook callback URL.
-
getOrders
public Boolean getOrders()
-
getApp
public Boolean getApp()
-
getPayments
public Boolean getPayments()
-
getInventory
public Boolean getInventory()
-
getCustomers
public Boolean getCustomers()
-
getMerchants
public Boolean getMerchants()
-
getEmployees
public Boolean getEmployees()
Webhook subscription for employee create/update/delete
-
getCashAdjustment
public Boolean getCashAdjustment()
-
getExports
public Boolean getExports()
-
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
-
isNotNullUrl
public boolean isNotNullUrl()
Checks whether the 'url' field is set and is not null
-
isNotNullSecret
public boolean isNotNullSecret()
Checks whether the 'secret' field is set and is not null
-
isNotNullValid
public boolean isNotNullValid()
Checks whether the 'valid' field is set and is not null
-
isNotNullVerification
public boolean isNotNullVerification()
Checks whether the 'verification' field is set and is not null
-
isNotNullOrders
public boolean isNotNullOrders()
Checks whether the 'orders' field is set and is not null
-
isNotNullApp
public boolean isNotNullApp()
Checks whether the 'app' field is set and is not null
-
isNotNullPayments
public boolean isNotNullPayments()
Checks whether the 'payments' field is set and is not null
-
isNotNullInventory
public boolean isNotNullInventory()
Checks whether the 'inventory' field is set and is not null
-
isNotNullCustomers
public boolean isNotNullCustomers()
Checks whether the 'customers' field is set and is not null
-
isNotNullMerchants
public boolean isNotNullMerchants()
Checks whether the 'merchants' field is set and is not null
-
isNotNullEmployees
public boolean isNotNullEmployees()
Checks whether the 'employees' field is set and is not null
-
isNotNullCashAdjustment
public boolean isNotNullCashAdjustment()
Checks whether the 'cashAdjustment' field is set and is not null
-
isNotNullExports
public boolean isNotNullExports()
Checks whether the 'exports' field is set and is not null
-
hasUrl
public boolean hasUrl()
Checks whether the 'url' field has been set, however the value could be null
-
hasSecret
public boolean hasSecret()
Checks whether the 'secret' field has been set, however the value could be null
-
hasValid
public boolean hasValid()
Checks whether the 'valid' field has been set, however the value could be null
-
hasVerification
public boolean hasVerification()
Checks whether the 'verification' 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
-
hasApp
public boolean hasApp()
Checks whether the 'app' 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
-
hasInventory
public boolean hasInventory()
Checks whether the 'inventory' field has been set, however the value could be null
-
hasCustomers
public boolean hasCustomers()
Checks whether the 'customers' field has been set, however the value could be null
-
hasMerchants
public boolean hasMerchants()
Checks whether the 'merchants' field has been set, however the value could be null
-
hasEmployees
public boolean hasEmployees()
Checks whether the 'employees' field has been set, however the value could be null
-
hasCashAdjustment
public boolean hasCashAdjustment()
Checks whether the 'cashAdjustment' field has been set, however the value could be null
-
hasExports
public boolean hasExports()
Checks whether the 'exports' field has been set, however the value could be null
-
setCashAdjustment
public WebHook setCashAdjustment(Boolean cashAdjustment)
Sets the field 'cashAdjustment'.
-
clearUrl
public void clearUrl()
Clears the 'url' field, the 'has' method for this field will now return false
-
clearSecret
public void clearSecret()
Clears the 'secret' field, the 'has' method for this field will now return false
-
clearValid
public void clearValid()
Clears the 'valid' field, the 'has' method for this field will now return false
-
clearVerification
public void clearVerification()
Clears the 'verification' 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
-
clearApp
public void clearApp()
Clears the 'app' 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
-
clearInventory
public void clearInventory()
Clears the 'inventory' field, the 'has' method for this field will now return false
-
clearCustomers
public void clearCustomers()
Clears the 'customers' field, the 'has' method for this field will now return false
-
clearMerchants
public void clearMerchants()
Clears the 'merchants' field, the 'has' method for this field will now return false
-
clearEmployees
public void clearEmployees()
Clears the 'employees' field, the 'has' method for this field will now return false
-
clearCashAdjustment
public void clearCashAdjustment()
Clears the 'cashAdjustment' field, the 'has' method for this field will now return false
-
clearExports
public void clearExports()
Clears the 'exports' 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 WebHook copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(WebHook src)
Copy all the changed fields from the given source to this instance.
-
-