Class SubscriptionDiscount

    • Constructor Detail

      • SubscriptionDiscount

        public SubscriptionDiscount()
    • Method Detail

      • isApplyToFuturePeriods

        public boolean isApplyToFuturePeriods()
        Whether an offer should be applied to items' future periods, i.e., items that have a recurring billing cycle based on a frequency and a period. If this is false, none of the other fields on this class will be considered. Default to false.
        Returns:
        Whether an offer should be applied to items' future periods, i.e., items that have a recurring billing cycle based on a frequency and a period.
      • isDiscountCurrentOrder

        public boolean isDiscountCurrentOrder()
        Whether to apply this discount to the current provided order. Otherwise, it will only apply to future billing cycles resulting from the current order. Default to true.
        Returns:
        Whether to apply this discount to the current provided order. Otherwise, it will only apply to future billing cycles resulting from the current order.
      • getBeginPeriod

        public int getBeginPeriod()
        The beginning period for which this offer should be applied. 1 refers to the first recurring billing period, and so on.
        Returns:
        The beginning period for which this offer should be applied.
      • getEndPeriod

        public int getEndPeriod()
        The ending period for which this offer should be applied. 1 refers to the first recurring billing period, and so on.
        Returns:
        The ending period for which this offer should be applied.
      • setApplyToFuturePeriods

        public void setApplyToFuturePeriods​(boolean applyToFuturePeriods)
        Whether an offer should be applied to items' future periods, i.e., items that have a recurring billing cycle based on a frequency and a period. If this is false, none of the other fields on this class will be considered. Default to false.
        Parameters:
        applyToFuturePeriods - Whether an offer should be applied to items' future periods, i.e., items that have a recurring billing cycle based on a frequency and a period.
      • setDiscountCurrentOrder

        public void setDiscountCurrentOrder​(boolean discountCurrentOrder)
        Whether to apply this discount to the current provided order. Otherwise, it will only apply to future billing cycles resulting from the current order. Default to true.
        Parameters:
        discountCurrentOrder - Whether to apply this discount to the current provided order. Otherwise, it will only apply to future billing cycles resulting from the current order.
      • setBeginPeriod

        public void setBeginPeriod​(int beginPeriod)
        The beginning period for which this offer should be applied. 1 refers to the first recurring billing period, and so on.
        Parameters:
        beginPeriod - The beginning period for which this offer should be applied.
      • setEndPeriod

        public void setEndPeriod​(int endPeriod)
        The ending period for which this offer should be applied. 1 refers to the first recurring billing period, and so on.
        Parameters:
        endPeriod - The ending period for which this offer should be applied.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object