Class AppMetered

    • Constructor Detail

      • AppMetered

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

        protected AppMetered​(boolean noInit)
        Constructs a new empty instance.
      • AppMetered

        public AppMetered​(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.
      • AppMetered

        public AppMetered​(AppMetered 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
      • getAmount

        @Deprecated
        public Long getAmount()
        Deprecated.
        DEPRECATED: App metered amount. Instead use per country pricing in meteredCountries
      • getAction

        @Deprecated
        public String getAction()
        Deprecated.
        DEPRECATED: App metered action. Instead use per country pricing in meteredCountries
      • getActive

        @Deprecated
        public Boolean getActive()
        Deprecated.
        DEPRECATED: App metered active status. Instead use per country pricing in meteredCountries
      • getMeteredCountries

        public List<AppMeteredCountry> getMeteredCountries()
        Metered country options for this app metered
      • getApp

        public Reference getApp()
        Reference to the app this metered belongs to
      • getLabel

        public String getLabel()
        A label used to identify this metered action
      • 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
      • isNotNullAmount

        public boolean isNotNullAmount()
        Checks whether the 'amount' field is set and is not null
      • isNotNullAction

        public boolean isNotNullAction()
        Checks whether the 'action' field is set and is not null
      • isNotNullActive

        public boolean isNotNullActive()
        Checks whether the 'active' field is set and is not null
      • isNotNullMeteredCountries

        public boolean isNotNullMeteredCountries()
        Checks whether the 'meteredCountries' field is set and is not null
      • isNotEmptyMeteredCountries

        public boolean isNotEmptyMeteredCountries()
        Checks whether the 'meteredCountries' 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
      • hasAmount

        public boolean hasAmount()
        Checks whether the 'amount' field has been set, however the value could be null
      • hasAction

        public boolean hasAction()
        Checks whether the 'action' 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
      • hasMeteredCountries

        public boolean hasMeteredCountries()
        Checks whether the 'meteredCountries' 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
      • setAmount

        public AppMetered setAmount​(Long amount)
        Sets the field 'amount'.
      • setAction

        public AppMetered setAction​(String action)
        Sets the field 'action'.
      • setActive

        public AppMetered setActive​(Boolean active)
        Sets the field 'active'.
      • setMeteredCountries

        public AppMetered setMeteredCountries​(List<AppMeteredCountry> meteredCountries)
        Sets the field 'meteredCountries'. 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 AppMetered 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 AppMetered 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
      • clearAmount

        public void clearAmount()
        Clears the 'amount' field, the 'has' method for this field will now return false
      • clearAction

        public void clearAction()
        Clears the 'action' 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
      • clearMeteredCountries

        public void clearMeteredCountries()
        Clears the 'meteredCountries' 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 AppMetered copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(AppMetered src)
        Copy all the changed fields from the given source to this instance.