Package com.clover.sdk.v3.payments
Class PromotionalMessage
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.payments.PromotionalMessage
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class PromotionalMessage 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
PromotionalMessage.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<PromotionalMessage>
CREATOR
static JSONifiable.Creator<PromotionalMessage>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description PromotionalMessage()
Constructs a new empty instance.protected
PromotionalMessage(boolean noInit)
Constructs a new empty instance.PromotionalMessage(PromotionalMessage src)
Constructs a new instance that is a deep copy of the source instance.PromotionalMessage(String json)
Constructs a new instance from the given JSON String.PromotionalMessage(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
clearMessage()
Clears the 'message' field, the 'has' method for this field will now return falsevoid
clearShowOnCustomerReceipt()
Clears the 'showOnCustomerReceipt' field, the 'has' method for this field will now return falsevoid
clearShowOnDisplay()
Clears the 'showOnDisplay' field, the 'has' method for this field will now return falsevoid
clearShowOnMerchantReceipt()
Clears the 'showOnMerchantReceipt' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.PromotionalMessage
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.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.String
getMessage()
Boolean
getShowOnCustomerReceipt()
Boolean
getShowOnDisplay()
Boolean
getShowOnMerchantReceipt()
boolean
hasMessage()
Checks whether the 'message' field has been set, however the value could be nullboolean
hasShowOnCustomerReceipt()
Checks whether the 'showOnCustomerReceipt' field has been set, however the value could be nullboolean
hasShowOnDisplay()
Checks whether the 'showOnDisplay' field has been set, however the value could be nullboolean
hasShowOnMerchantReceipt()
Checks whether the 'showOnMerchantReceipt' field has been set, however the value could be nullboolean
isNotNullMessage()
Checks whether the 'message' field is set and is not nullboolean
isNotNullShowOnCustomerReceipt()
Checks whether the 'showOnCustomerReceipt' field is set and is not nullboolean
isNotNullShowOnDisplay()
Checks whether the 'showOnDisplay' field is set and is not nullboolean
isNotNullShowOnMerchantReceipt()
Checks whether the 'showOnMerchantReceipt' field is set and is not nullvoid
mergeChanges(PromotionalMessage 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.PromotionalMessage
setMessage(String message)
Sets the field 'message'.PromotionalMessage
setShowOnCustomerReceipt(Boolean showOnCustomerReceipt)
Sets the field 'showOnCustomerReceipt'.PromotionalMessage
setShowOnDisplay(Boolean showOnDisplay)
Sets the field 'showOnDisplay'.PromotionalMessage
setShowOnMerchantReceipt(Boolean showOnMerchantReceipt)
Sets the field 'showOnMerchantReceipt'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<PromotionalMessage> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<PromotionalMessage> JSON_CREATOR
-
-
Constructor Detail
-
PromotionalMessage
public PromotionalMessage()
Constructs a new empty instance.
-
PromotionalMessage
protected PromotionalMessage(boolean noInit)
Constructs a new empty instance.
-
PromotionalMessage
public PromotionalMessage(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
PromotionalMessage
public PromotionalMessage(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.
-
PromotionalMessage
public PromotionalMessage(PromotionalMessage src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getMessage
public String getMessage()
-
getShowOnMerchantReceipt
public Boolean getShowOnMerchantReceipt()
-
getShowOnCustomerReceipt
public Boolean getShowOnCustomerReceipt()
-
getShowOnDisplay
public Boolean getShowOnDisplay()
-
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
-
isNotNullMessage
public boolean isNotNullMessage()
Checks whether the 'message' field is set and is not null
-
isNotNullShowOnMerchantReceipt
public boolean isNotNullShowOnMerchantReceipt()
Checks whether the 'showOnMerchantReceipt' field is set and is not null
-
isNotNullShowOnCustomerReceipt
public boolean isNotNullShowOnCustomerReceipt()
Checks whether the 'showOnCustomerReceipt' field is set and is not null
-
isNotNullShowOnDisplay
public boolean isNotNullShowOnDisplay()
Checks whether the 'showOnDisplay' field is set and is not null
-
hasMessage
public boolean hasMessage()
Checks whether the 'message' field has been set, however the value could be null
-
hasShowOnMerchantReceipt
public boolean hasShowOnMerchantReceipt()
Checks whether the 'showOnMerchantReceipt' field has been set, however the value could be null
-
hasShowOnCustomerReceipt
public boolean hasShowOnCustomerReceipt()
Checks whether the 'showOnCustomerReceipt' field has been set, however the value could be null
-
hasShowOnDisplay
public boolean hasShowOnDisplay()
Checks whether the 'showOnDisplay' field has been set, however the value could be null
-
setMessage
public PromotionalMessage setMessage(String message)
Sets the field 'message'.
-
setShowOnMerchantReceipt
public PromotionalMessage setShowOnMerchantReceipt(Boolean showOnMerchantReceipt)
Sets the field 'showOnMerchantReceipt'.
-
setShowOnCustomerReceipt
public PromotionalMessage setShowOnCustomerReceipt(Boolean showOnCustomerReceipt)
Sets the field 'showOnCustomerReceipt'.
-
setShowOnDisplay
public PromotionalMessage setShowOnDisplay(Boolean showOnDisplay)
Sets the field 'showOnDisplay'.
-
clearMessage
public void clearMessage()
Clears the 'message' field, the 'has' method for this field will now return false
-
clearShowOnMerchantReceipt
public void clearShowOnMerchantReceipt()
Clears the 'showOnMerchantReceipt' field, the 'has' method for this field will now return false
-
clearShowOnCustomerReceipt
public void clearShowOnCustomerReceipt()
Clears the 'showOnCustomerReceipt' field, the 'has' method for this field will now return false
-
clearShowOnDisplay
public void clearShowOnDisplay()
Clears the 'showOnDisplay' 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 PromotionalMessage copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(PromotionalMessage src)
Copy all the changed fields from the given source to this instance.
-
-