Package com.clover.sdk.v3.developer
Class RolloutMerchant
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.developer.RolloutMerchant
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class RolloutMerchant extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RolloutMerchant.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<RolloutMerchant>
CREATOR
static JSONifiable.Creator<RolloutMerchant>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description RolloutMerchant()
Constructs a new empty instance.protected
RolloutMerchant(boolean noInit)
Constructs a new empty instance.RolloutMerchant(RolloutMerchant src)
Constructs a new instance that is a deep copy of the source instance.RolloutMerchant(String json)
Constructs a new instance from the given JSON String.RolloutMerchant(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
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
clearRollout()
Clears the 'rollout' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.RolloutMerchant
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.Reference
getMerchant()
The merchant that is associated with the rolloutString
getName()
The merchant's nameReference
getRollout()
The rollout that the merchant is associated withboolean
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
hasRollout()
Checks whether the 'rollout' field has been set, however the value could be 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
isNotNullRollout()
Checks whether the 'rollout' field is set and is not nullvoid
mergeChanges(RolloutMerchant 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.RolloutMerchant
setMerchant(Reference merchant)
Sets the field 'merchant'.RolloutMerchant
setName(String name)
Sets the field 'name'.RolloutMerchant
setRollout(Reference rollout)
Sets the field 'rollout'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<RolloutMerchant> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<RolloutMerchant> JSON_CREATOR
-
-
Constructor Detail
-
RolloutMerchant
public RolloutMerchant()
Constructs a new empty instance.
-
RolloutMerchant
protected RolloutMerchant(boolean noInit)
Constructs a new empty instance.
-
RolloutMerchant
public RolloutMerchant(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
RolloutMerchant
public RolloutMerchant(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.
-
RolloutMerchant
public RolloutMerchant(RolloutMerchant src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getName
public String getName()
The merchant's name
-
getRollout
public Reference getRollout()
The rollout that the merchant is associated with
-
getMerchant
public Reference getMerchant()
The merchant that is associated with the rollout
-
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
-
isNotNullName
public boolean isNotNullName()
Checks whether the 'name' field is set and is not null
-
isNotNullRollout
public boolean isNotNullRollout()
Checks whether the 'rollout' field is set and is not null
-
isNotNullMerchant
public boolean isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
-
hasName
public boolean hasName()
Checks whether the 'name' field has been set, however the value could be null
-
hasRollout
public boolean hasRollout()
Checks whether the 'rollout' 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
-
setName
public RolloutMerchant setName(String name)
Sets the field 'name'.
-
setRollout
public RolloutMerchant setRollout(Reference rollout)
Sets the field 'rollout'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setMerchant
public RolloutMerchant 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.
-
clearName
public void clearName()
Clears the 'name' field, the 'has' method for this field will now return false
-
clearRollout
public void clearRollout()
Clears the 'rollout' 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 RolloutMerchant copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(RolloutMerchant src)
Copy all the changed fields from the given source to this instance.
-
-