public class AppSubscription extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
AppSubscription.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<AppSubscription> |
CREATOR |
static JSONifiable.Creator<AppSubscription> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
AppSubscription()
Constructs a new empty instance.
|
|
AppSubscription(AppSubscription src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
AppSubscription(boolean noInit)
Constructs a new empty instance.
|
|
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(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearActive()
Clears the 'active' field, the 'has' method for this field will now return false
|
void |
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
|
void |
clearApp()
Clears the 'app' field, the 'has' method for this field will now return false
|
void |
clearDescription()
Clears the 'description' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearLabel()
Clears the 'label' field, the 'has' method for this field will now return false
|
void |
clearName()
Clears the 'name' field, the 'has' method for this field will now return false
|
void |
clearPlan()
Clears the 'plan' field, the 'has' method for this field will now return false
|
void |
clearSubscriptionCountries()
Clears the 'subscriptionCountries' field, the 'has' method for this field will now return false
|
boolean |
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 to
|
String |
getDescription()
Deprecated.
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
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 |
getLabel()
App subscription label
|
String |
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 subscription
|
boolean |
hasActive()
Checks whether the 'active' field has been set, however the value could be null
|
boolean |
hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
|
boolean |
hasApp()
Checks whether the 'app' field has been set, however the value could be null
|
boolean |
hasDescription()
Checks whether the 'description' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasLabel()
Checks whether the 'label' field has been set, however the value could be null
|
boolean |
hasName()
Checks whether the 'name' field has been set, however the value could be null
|
boolean |
hasPlan()
Checks whether the 'plan' field has been set, however the value could be null
|
boolean |
hasSubscriptionCountries()
Checks whether the 'subscriptionCountries' field has been set, however the value could be null
|
boolean |
isNotEmptySubscriptionCountries()
Checks whether the 'subscriptionCountries' field is set and is not null and is not empty
|
boolean |
isNotNullActive()
Checks whether the 'active' field is set and is not null
|
boolean |
isNotNullAmount()
Checks whether the 'amount' field is set and is not null
|
boolean |
isNotNullApp()
Checks whether the 'app' field is set and is not null
|
boolean |
isNotNullDescription()
Checks whether the 'description' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullLabel()
Checks whether the 'label' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullPlan()
Checks whether the 'plan' field is set and is not null
|
boolean |
isNotNullSubscriptionCountries()
Checks whether the 'subscriptionCountries' field is set and is not null
|
void |
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() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<AppSubscription> CREATOR
public static final JSONifiable.Creator<AppSubscription> JSON_CREATOR
public AppSubscription()
protected AppSubscription(boolean noInit)
public AppSubscription(String json) throws IllegalArgumentException
IllegalArgumentException
public AppSubscription(JSONObject jsonObject)
public AppSubscription(AppSubscription src)
public String getId()
@Deprecated public String getName()
@Deprecated public Long getAmount()
@Deprecated public String getDescription()
@Deprecated public Boolean getActive()
public Boolean getPlan()
public List<AppSubscriptionCountry> getSubscriptionCountries()
public Reference getApp()
public String getLabel()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullAmount()
public boolean isNotNullDescription()
public boolean isNotNullActive()
public boolean isNotNullPlan()
public boolean isNotNullSubscriptionCountries()
public boolean isNotEmptySubscriptionCountries()
public boolean isNotNullApp()
public boolean isNotNullLabel()
public boolean hasId()
public boolean hasName()
public boolean hasAmount()
public boolean hasDescription()
public boolean hasActive()
public boolean hasPlan()
public boolean hasSubscriptionCountries()
public boolean hasApp()
public boolean hasLabel()
public AppSubscription setId(String id)
public AppSubscription setName(String name)
public AppSubscription setAmount(Long amount)
public AppSubscription setDescription(String description)
public AppSubscription setActive(Boolean active)
public AppSubscription setPlan(Boolean plan)
public AppSubscription setSubscriptionCountries(List<AppSubscriptionCountry> subscriptionCountries)
public AppSubscription setApp(Reference app)
public AppSubscription setLabel(String label)
public void clearId()
public void clearName()
public void clearAmount()
public void clearDescription()
public void clearActive()
public void clearPlan()
public void clearSubscriptionCountries()
public void clearApp()
public void clearLabel()
public boolean containsChanges()
public void resetChangeLog()
public AppSubscription copyChanges()
public void mergeChanges(AppSubscription src)