Class AppSubscription

    • Constructor Detail

      • AppSubscription

        public AppSubscription()
        Constructs a new empty instance.
      • AppSubscription

        protected AppSubscription​(boolean noInit)
        Constructs a new empty instance.
      • 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
      • 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 interface JSONifiable
      • 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
      • setDescription

        public AppSubscription setDescription​(String description)
        Sets the field 'description'.
      • 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.
      • 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.