Class Promotion


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20230401")
    public final class Promotion
    extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
    Promotion information for a subscription.
    Note: Objects should always be created or deserialized using the Promotion.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of the Promotion.Builder, which maintain a set of all explicitly set fields called Promotion.Builder.__explicitlySet__. The hashCode() and equals(Object) methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
    • Method Detail

      • getDuration

        public Integer getDuration()
        Specifies how long the promotion related to the subscription, if any, is valid in duration units.
        Returns:
        the value
      • getDurationUnit

        public String getDurationUnit()
        Unit for the duration.
        Returns:
        the value
      • getAmount

        public Float getAmount()
        If a subscription is present, indicates the total amount of promotional subscription credits.
        Returns:
        the value
      • getStatus

        public Promotion.Status getStatus()
        If a subscription is present, indicates the current status of the subscription promotion.
        Returns:
        the value
      • getIsIntentToPay

        public Boolean getIsIntentToPay()
        Speficies whether or not the customer intends to pay after the promotion has expired.
        Returns:
        the value
      • getCurrencyUnit

        public String getCurrencyUnit()
        Currency unit associated with the promotion.
        Returns:
        the value
      • getTimeStarted

        public Date getTimeStarted()
        Date and time when the promotion starts.
        Returns:
        the value
      • getTimeExpired

        public Date getTimeExpired()
        Date and time when the promotion ends.
        Returns:
        the value
      • toString

        public String toString()
        Overrides:
        toString in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel