Class MerchantPlan

    • Constructor Detail

      • MerchantPlan

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

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

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

        public MerchantPlan​(MerchantPlan 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

        public String getName()
        The name of the merchant plan
      • getDescription

        public String getDescription()
        Description of the plan
      • getPrice

        public Long getPrice()
      • getTrialDays

        public Long getTrialDays()
        Transient field, the free trial period, as defined in this plan's group.
      • getTrialExpirationTime

        public Long getTrialExpirationTime()
        Date/time this plan's trial will expire for the merchant with this plan. This is a transient value only applicable to the merchant assigned to this plan.
      • getAppBundle

        public AppBundle getAppBundle()
      • getDefaultPlan

        public Boolean getDefaultPlan()
        If true and multiple plans of this code then treat as default plan for reseller. Cannot use word default.
      • getRecommended

        public Boolean getRecommended()
        True if plan metadata indicates this plan should be recommended in OOBE plan selection.
      • getTags

        public List<String> getTags()
        Comma separated list of tags.
      • getPricingDescription

        public String getPricingDescription()
        Pricing description of plan.
      • getBogo

        public Boolean getBogo()
        If true then plan offers by one device get one free.
      • getWeight

        public Long getWeight()
        Represents the importance or value the planCode has. Helpful for determining when a merchant is downgrading or upgrading their plan
      • getFeatures

        public List<String> getFeatures()
        List of feature keys this plans supports. Used by plan selection/summary pages.
      • getTranslatedFeatures

        public List<String> getTranslatedFeatures()
        List of translated feature names this plan supports. Used by plan selection/summary pages.
      • getBillToMid

        public Boolean getBillToMid()
        If true then billing will charge monthly fee regardless of device status or count.
      • getPlanCode

        public String getPlanCode()
        First data plan code
      • getActivationTime

        public Long getActivationTime()
        Date/time when this plan becomes active. If null then active now.
      • getDeactivationTime

        public Long getDeactivationTime()
        Date/time when this plan becomes inactive. If null then no end of life.
      • getReseller

        public Reseller getReseller()
      • getMerchantPlanGroup

        public Reference getMerchantPlanGroup()
        Plan Group of this Plan as associated with merchant in context
      • getCreatedTime

        public Long getCreatedTime()
        Date/time this plan was created.
      • getModifiedTime

        public Long getModifiedTime()
        Date/time this plan was last modified.
      • 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
      • isNotNullDescription

        public boolean isNotNullDescription()
        Checks whether the 'description' field is set and is not null
      • isNotNullPrice

        public boolean isNotNullPrice()
        Checks whether the 'price' field is set and is not null
      • isNotNullTrialDays

        public boolean isNotNullTrialDays()
        Checks whether the 'trialDays' field is set and is not null
      • isNotNullTrialExpirationTime

        public boolean isNotNullTrialExpirationTime()
        Checks whether the 'trialExpirationTime' field is set and is not null
      • isNotNullModules

        public boolean isNotNullModules()
        Checks whether the 'modules' field is set and is not null
      • isNotEmptyModules

        public boolean isNotEmptyModules()
        Checks whether the 'modules' field is set and is not null and is not empty
      • isNotNullAppBundle

        public boolean isNotNullAppBundle()
        Checks whether the 'appBundle' field is set and is not null
      • isNotNullDefaultPlan

        public boolean isNotNullDefaultPlan()
        Checks whether the 'defaultPlan' field is set and is not null
      • isNotNullRecommended

        public boolean isNotNullRecommended()
        Checks whether the 'recommended' field is set and is not null
      • isNotNullPricingModel

        public boolean isNotNullPricingModel()
        Checks whether the 'pricingModel' field is set and is not null
      • isNotEmptyTags

        public boolean isNotEmptyTags()
        Checks whether the 'tags' field is set and is not null and is not empty
      • isNotNullTags

        public boolean isNotNullTags()
        Checks whether the 'tags' field is set and is not null
      • isNotNullPricingDescription

        public boolean isNotNullPricingDescription()
        Checks whether the 'pricingDescription' field is set and is not null
      • isNotNullBogo

        public boolean isNotNullBogo()
        Checks whether the 'bogo' field is set and is not null
      • isNotNullWeight

        public boolean isNotNullWeight()
        Checks whether the 'weight' field is set and is not null
      • isNotNullFeatures

        public boolean isNotNullFeatures()
        Checks whether the 'features' field is set and is not null
      • isNotEmptyFeatures

        public boolean isNotEmptyFeatures()
        Checks whether the 'features' field is set and is not null and is not empty
      • isNotNullTranslatedFeatures

        public boolean isNotNullTranslatedFeatures()
        Checks whether the 'translatedFeatures' field is set and is not null
      • isNotEmptyTranslatedFeatures

        public boolean isNotEmptyTranslatedFeatures()
        Checks whether the 'translatedFeatures' field is set and is not null and is not empty
      • isNotNullBillToMid

        public boolean isNotNullBillToMid()
        Checks whether the 'billToMid' field is set and is not null
      • isNotNullType

        public boolean isNotNullType()
        Checks whether the 'type' field is set and is not null
      • isNotNullPlanCode

        public boolean isNotNullPlanCode()
        Checks whether the 'planCode' field is set and is not null
      • isNotNullActivationTime

        public boolean isNotNullActivationTime()
        Checks whether the 'activationTime' field is set and is not null
      • isNotNullDeactivationTime

        public boolean isNotNullDeactivationTime()
        Checks whether the 'deactivationTime' field is set and is not null
      • isNotNullReseller

        public boolean isNotNullReseller()
        Checks whether the 'reseller' field is set and is not null
      • isNotNullMerchantPlanGroup

        public boolean isNotNullMerchantPlanGroup()
        Checks whether the 'merchantPlanGroup' field is set and is not null
      • isNotNullCreatedTime

        public boolean isNotNullCreatedTime()
        Checks whether the 'createdTime' field is set and is not null
      • isNotNullModifiedTime

        public boolean isNotNullModifiedTime()
        Checks whether the 'modifiedTime' 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
      • hasDescription

        public boolean hasDescription()
        Checks whether the 'description' field has been set, however the value could be null
      • hasPrice

        public boolean hasPrice()
        Checks whether the 'price' field has been set, however the value could be null
      • hasTrialDays

        public boolean hasTrialDays()
        Checks whether the 'trialDays' field has been set, however the value could be null
      • hasTrialExpirationTime

        public boolean hasTrialExpirationTime()
        Checks whether the 'trialExpirationTime' field has been set, however the value could be null
      • hasModules

        public boolean hasModules()
        Checks whether the 'modules' field has been set, however the value could be null
      • hasAppBundle

        public boolean hasAppBundle()
        Checks whether the 'appBundle' field has been set, however the value could be null
      • hasDefaultPlan

        public boolean hasDefaultPlan()
        Checks whether the 'defaultPlan' field has been set, however the value could be null
      • hasRecommended

        public boolean hasRecommended()
        Checks whether the 'recommended' field has been set, however the value could be null
      • hasPricingModel

        public boolean hasPricingModel()
        Checks whether the 'pricingModel' field has been set, however the value could be null
      • hasTags

        public boolean hasTags()
        Checks whether the 'tags' field has been set, however the value could be null
      • hasPricingDescription

        public boolean hasPricingDescription()
        Checks whether the 'pricingDescription' field has been set, however the value could be null
      • hasBogo

        public boolean hasBogo()
        Checks whether the 'bogo' field has been set, however the value could be null
      • hasWeight

        public boolean hasWeight()
        Checks whether the 'weight' field has been set, however the value could be null
      • hasFeatures

        public boolean hasFeatures()
        Checks whether the 'features' field has been set, however the value could be null
      • hasTranslatedFeatures

        public boolean hasTranslatedFeatures()
        Checks whether the 'translatedFeatures' field has been set, however the value could be null
      • hasBillToMid

        public boolean hasBillToMid()
        Checks whether the 'billToMid' field has been set, however the value could be null
      • hasType

        public boolean hasType()
        Checks whether the 'type' field has been set, however the value could be null
      • hasPlanCode

        public boolean hasPlanCode()
        Checks whether the 'planCode' field has been set, however the value could be null
      • hasActivationTime

        public boolean hasActivationTime()
        Checks whether the 'activationTime' field has been set, however the value could be null
      • hasDeactivationTime

        public boolean hasDeactivationTime()
        Checks whether the 'deactivationTime' field has been set, however the value could be null
      • hasReseller

        public boolean hasReseller()
        Checks whether the 'reseller' field has been set, however the value could be null
      • hasMerchantPlanGroup

        public boolean hasMerchantPlanGroup()
        Checks whether the 'merchantPlanGroup' field has been set, however the value could be null
      • hasCreatedTime

        public boolean hasCreatedTime()
        Checks whether the 'createdTime' field has been set, however the value could be null
      • hasModifiedTime

        public boolean hasModifiedTime()
        Checks whether the 'modifiedTime' field has been set, however the value could be null
      • setDescription

        public MerchantPlan setDescription​(String description)
        Sets the field 'description'.
      • setPrice

        public MerchantPlan setPrice​(Long price)
        Sets the field 'price'.
      • setTrialDays

        public MerchantPlan setTrialDays​(Long trialDays)
        Sets the field 'trialDays'.
      • setTrialExpirationTime

        public MerchantPlan setTrialExpirationTime​(Long trialExpirationTime)
        Sets the field 'trialExpirationTime'.
      • setModules

        public MerchantPlan setModules​(List<Module> modules)
        Sets the field 'modules'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setAppBundle

        public MerchantPlan setAppBundle​(AppBundle appBundle)
        Sets the field 'appBundle'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setDefaultPlan

        public MerchantPlan setDefaultPlan​(Boolean defaultPlan)
        Sets the field 'defaultPlan'.
      • setRecommended

        public MerchantPlan setRecommended​(Boolean recommended)
        Sets the field 'recommended'.
      • setTags

        public MerchantPlan setTags​(List<String> tags)
        Sets the field 'tags'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setPricingDescription

        public MerchantPlan setPricingDescription​(String pricingDescription)
        Sets the field 'pricingDescription'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setWeight

        public MerchantPlan setWeight​(Long weight)
        Sets the field 'weight'.
      • setFeatures

        public MerchantPlan setFeatures​(List<String> features)
        Sets the field 'features'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setTranslatedFeatures

        public MerchantPlan setTranslatedFeatures​(List<String> translatedFeatures)
        Sets the field 'translatedFeatures'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setBillToMid

        public MerchantPlan setBillToMid​(Boolean billToMid)
        Sets the field 'billToMid'.
      • setPlanCode

        public MerchantPlan setPlanCode​(String planCode)
        Sets the field 'planCode'.
      • setActivationTime

        public MerchantPlan setActivationTime​(Long activationTime)
        Sets the field 'activationTime'.
      • setDeactivationTime

        public MerchantPlan setDeactivationTime​(Long deactivationTime)
        Sets the field 'deactivationTime'.
      • setReseller

        public MerchantPlan setReseller​(Reseller reseller)
        Sets the field 'reseller'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setMerchantPlanGroup

        public MerchantPlan setMerchantPlanGroup​(Reference merchantPlanGroup)
        Sets the field 'merchantPlanGroup'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setCreatedTime

        public MerchantPlan setCreatedTime​(Long createdTime)
        Sets the field 'createdTime'.
      • setModifiedTime

        public MerchantPlan setModifiedTime​(Long modifiedTime)
        Sets the field 'modifiedTime'.
      • 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
      • clearDescription

        public void clearDescription()
        Clears the 'description' field, the 'has' method for this field will now return false
      • clearPrice

        public void clearPrice()
        Clears the 'price' field, the 'has' method for this field will now return false
      • clearTrialDays

        public void clearTrialDays()
        Clears the 'trialDays' field, the 'has' method for this field will now return false
      • clearTrialExpirationTime

        public void clearTrialExpirationTime()
        Clears the 'trialExpirationTime' field, the 'has' method for this field will now return false
      • clearModules

        public void clearModules()
        Clears the 'modules' field, the 'has' method for this field will now return false
      • clearAppBundle

        public void clearAppBundle()
        Clears the 'appBundle' field, the 'has' method for this field will now return false
      • clearDefaultPlan

        public void clearDefaultPlan()
        Clears the 'defaultPlan' field, the 'has' method for this field will now return false
      • clearRecommended

        public void clearRecommended()
        Clears the 'recommended' field, the 'has' method for this field will now return false
      • clearPricingModel

        public void clearPricingModel()
        Clears the 'pricingModel' field, the 'has' method for this field will now return false
      • clearTags

        public void clearTags()
        Clears the 'tags' field, the 'has' method for this field will now return false
      • clearPricingDescription

        public void clearPricingDescription()
        Clears the 'pricingDescription' field, the 'has' method for this field will now return false
      • clearBogo

        public void clearBogo()
        Clears the 'bogo' field, the 'has' method for this field will now return false
      • clearWeight

        public void clearWeight()
        Clears the 'weight' field, the 'has' method for this field will now return false
      • clearFeatures

        public void clearFeatures()
        Clears the 'features' field, the 'has' method for this field will now return false
      • clearTranslatedFeatures

        public void clearTranslatedFeatures()
        Clears the 'translatedFeatures' field, the 'has' method for this field will now return false
      • clearBillToMid

        public void clearBillToMid()
        Clears the 'billToMid' field, the 'has' method for this field will now return false
      • clearType

        public void clearType()
        Clears the 'type' field, the 'has' method for this field will now return false
      • clearPlanCode

        public void clearPlanCode()
        Clears the 'planCode' field, the 'has' method for this field will now return false
      • clearActivationTime

        public void clearActivationTime()
        Clears the 'activationTime' field, the 'has' method for this field will now return false
      • clearDeactivationTime

        public void clearDeactivationTime()
        Clears the 'deactivationTime' field, the 'has' method for this field will now return false
      • clearReseller

        public void clearReseller()
        Clears the 'reseller' field, the 'has' method for this field will now return false
      • clearMerchantPlanGroup

        public void clearMerchantPlanGroup()
        Clears the 'merchantPlanGroup' field, the 'has' method for this field will now return false
      • clearCreatedTime

        public void clearCreatedTime()
        Clears the 'createdTime' field, the 'has' method for this field will now return false
      • clearModifiedTime

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

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