Package com.clover.sdk.v3.apps
Class AppSubscription
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.apps.AppSubscription
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class AppSubscription 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
AppSubscription.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<AppSubscription>
CREATOR
static JSONifiable.Creator<AppSubscription>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description AppSubscription()
Constructs a new empty instance.protected
AppSubscription(boolean noInit)
Constructs a new empty instance.AppSubscription(AppSubscription src)
Constructs a new instance that is a deep copy of the source instance.AppSubscription(String json)
Constructs a new instance from the given JSON String.AppSubscription(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 Deprecated Methods Modifier and Type Method Description void
clearActive()
Clears the 'active' field, the 'has' method for this field will now return falsevoid
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return falsevoid
clearApp()
Clears the 'app' field, the 'has' method for this field will now return falsevoid
clearDescription()
Clears the 'description' 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
clearLabel()
Clears the 'label' 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
clearPlan()
Clears the 'plan' field, the 'has' method for this field will now return falsevoid
clearSubscriptionCountries()
Clears the 'subscriptionCountries' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.AppSubscription
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Boolean
getActive()
Deprecated.Long
getAmount()
Deprecated.Reference
getApp()
Reference to app this subscription belongs toString
getDescription()
Deprecated.protected GenericClient
getGenericClient()
String
getId()
Unique identifierJSONObject
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
getLabel()
App subscription labelString
getName()
Deprecated.Boolean
getPlan()
True if special zero cost app pricing for default app in custom service plans.List<AppSubscriptionCountry>
getSubscriptionCountries()
Subscription country options for this app subscriptionboolean
hasActive()
Checks whether the 'active' field has been set, however the value could be nullboolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasApp()
Checks whether the 'app' field has been set, however the value could be nullboolean
hasDescription()
Checks whether the 'description' 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
hasLabel()
Checks whether the 'label' 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
hasPlan()
Checks whether the 'plan' field has been set, however the value could be nullboolean
hasSubscriptionCountries()
Checks whether the 'subscriptionCountries' field has been set, however the value could be nullboolean
isNotEmptySubscriptionCountries()
Checks whether the 'subscriptionCountries' field is set and is not null and is not emptyboolean
isNotNullActive()
Checks whether the 'active' field is set and is not nullboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullApp()
Checks whether the 'app' field is set and is not nullboolean
isNotNullDescription()
Checks whether the 'description' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullLabel()
Checks whether the 'label' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullPlan()
Checks whether the 'plan' field is set and is not nullboolean
isNotNullSubscriptionCountries()
Checks whether the 'subscriptionCountries' field is set and is not nullvoid
mergeChanges(AppSubscription 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.AppSubscription
setActive(Boolean active)
Sets the field 'active'.AppSubscription
setAmount(Long amount)
Sets the field 'amount'.AppSubscription
setApp(Reference app)
Sets the field 'app'.AppSubscription
setDescription(String description)
Sets the field 'description'.AppSubscription
setId(String id)
Sets the field 'id'.AppSubscription
setLabel(String label)
Sets the field 'label'.AppSubscription
setName(String name)
Sets the field 'name'.AppSubscription
setPlan(Boolean plan)
Sets the field 'plan'.AppSubscription
setSubscriptionCountries(List<AppSubscriptionCountry> subscriptionCountries)
Sets the field 'subscriptionCountries'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<AppSubscription> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<AppSubscription> JSON_CREATOR
-
-
Constructor Detail
-
AppSubscription
public AppSubscription()
Constructs a new empty instance.
-
AppSubscription
protected AppSubscription(boolean noInit)
Constructs a new empty instance.
-
AppSubscription
public AppSubscription(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
AppSubscription
public AppSubscription(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.
-
AppSubscription
public AppSubscription(AppSubscription 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
@Deprecated public String getName()
Deprecated.DEPRECATED: App subscription name. Per country pricing in subscriptionCountries.
-
getAmount
@Deprecated public Long getAmount()
Deprecated.DEPRECATED: The cost of the subscription. Per country pricing in subscriptionCountries.
-
getDescription
@Deprecated public String getDescription()
Deprecated.DEPRECATED: App subscription name. Per country pricing in subscriptionCountries.
-
getActive
@Deprecated public Boolean getActive()
Deprecated.DEPRECATED: App subscription active status. Per country pricing in subscriptionCountries.
-
getPlan
public Boolean getPlan()
True if special zero cost app pricing for default app in custom service plans.
-
getSubscriptionCountries
public List<AppSubscriptionCountry> getSubscriptionCountries()
Subscription country options for this app subscription
-
getApp
public Reference getApp()
Reference to app this subscription belongs to
-
getLabel
public String getLabel()
App subscription label
-
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
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullDescription
public boolean isNotNullDescription()
Checks whether the 'description' field is set and is not null
-
isNotNullActive
public boolean isNotNullActive()
Checks whether the 'active' field is set and is not null
-
isNotNullPlan
public boolean isNotNullPlan()
Checks whether the 'plan' field is set and is not null
-
isNotNullSubscriptionCountries
public boolean isNotNullSubscriptionCountries()
Checks whether the 'subscriptionCountries' field is set and is not null
-
isNotEmptySubscriptionCountries
public boolean isNotEmptySubscriptionCountries()
Checks whether the 'subscriptionCountries' field is set and is not null and is not empty
-
isNotNullApp
public boolean isNotNullApp()
Checks whether the 'app' field is set and is not null
-
isNotNullLabel
public boolean isNotNullLabel()
Checks whether the 'label' 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
-
hasAmount
public boolean hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
-
hasDescription
public boolean hasDescription()
Checks whether the 'description' field has been set, however the value could be null
-
hasActive
public boolean hasActive()
Checks whether the 'active' field has been set, however the value could be null
-
hasPlan
public boolean hasPlan()
Checks whether the 'plan' field has been set, however the value could be null
-
hasSubscriptionCountries
public boolean hasSubscriptionCountries()
Checks whether the 'subscriptionCountries' 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
-
hasLabel
public boolean hasLabel()
Checks whether the 'label' field has been set, however the value could be null
-
setId
public AppSubscription setId(String id)
Sets the field 'id'.
-
setName
public AppSubscription setName(String name)
Sets the field 'name'.
-
setAmount
public AppSubscription setAmount(Long amount)
Sets the field 'amount'.
-
setDescription
public AppSubscription setDescription(String description)
Sets the field 'description'.
-
setActive
public AppSubscription setActive(Boolean active)
Sets the field 'active'.
-
setPlan
public AppSubscription setPlan(Boolean plan)
Sets the field 'plan'.
-
setSubscriptionCountries
public AppSubscription setSubscriptionCountries(List<AppSubscriptionCountry> subscriptionCountries)
Sets the field 'subscriptionCountries'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setApp
public AppSubscription setApp(Reference app)
Sets the field 'app'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setLabel
public AppSubscription setLabel(String label)
Sets the field 'label'.
-
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
-
clearAmount
public void clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
-
clearDescription
public void clearDescription()
Clears the 'description' field, the 'has' method for this field will now return false
-
clearActive
public void clearActive()
Clears the 'active' field, the 'has' method for this field will now return false
-
clearPlan
public void clearPlan()
Clears the 'plan' field, the 'has' method for this field will now return false
-
clearSubscriptionCountries
public void clearSubscriptionCountries()
Clears the 'subscriptionCountries' 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
-
clearLabel
public void clearLabel()
Clears the 'label' 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 AppSubscription copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(AppSubscription src)
Copy all the changed fields from the given source to this instance.
-
-