Class Promotion.Builder

  • Enclosing class:
    Promotion

    public static class Promotion.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • duration

        public Promotion.Builder duration​(Integer duration)
        Specifies how long the promotion related to the subscription, if any, is valid in duration units.
        Parameters:
        duration - the value to set
        Returns:
        this builder
      • durationUnit

        public Promotion.Builder durationUnit​(String durationUnit)
        Unit for the duration.
        Parameters:
        durationUnit - the value to set
        Returns:
        this builder
      • amount

        public Promotion.Builder amount​(Float amount)
        If a subscription is present, indicates the total amount of promotional subscription credits.
        Parameters:
        amount - the value to set
        Returns:
        this builder
      • status

        public Promotion.Builder status​(Promotion.Status status)
        If a subscription is present, indicates the current status of the subscription promotion.
        Parameters:
        status - the value to set
        Returns:
        this builder
      • isIntentToPay

        public Promotion.Builder isIntentToPay​(Boolean isIntentToPay)
        Speficies whether or not the customer intends to pay after the promotion has expired.
        Parameters:
        isIntentToPay - the value to set
        Returns:
        this builder
      • currencyUnit

        public Promotion.Builder currencyUnit​(String currencyUnit)
        Currency unit associated with the promotion.
        Parameters:
        currencyUnit - the value to set
        Returns:
        this builder
      • timeStarted

        public Promotion.Builder timeStarted​(Date timeStarted)
        Date and time when the promotion starts.
        Parameters:
        timeStarted - the value to set
        Returns:
        this builder
      • timeExpired

        public Promotion.Builder timeExpired​(Date timeExpired)
        Date and time when the promotion ends.
        Parameters:
        timeExpired - the value to set
        Returns:
        this builder