@Generated(value="OracleSDKGenerator", comments="API Version: 20200801") 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 ExplicitlySetBmcModel.__explicitlySet__
. The hashCode()
and
equals(Object)
methods are implemented to take ExplicitlySetBmcModel.__explicitlySet__
into account.
The constructor, on the other hand, does not set ExplicitlySetBmcModel.__explicitlySet__
(since the
constructor cannot distinguish explicit null
from unset null
).
Modifier and Type | Class and Description |
---|---|
static class |
Promotion.Builder |
static class |
Promotion.Status
Current status of the promotion related to the subscription if there is one.
|
Constructor and Description |
---|
Promotion(Integer duration,
String durationUnit,
Float amount,
Promotion.Status status,
Boolean isIntentToPay,
String currencyUnit,
Date timeStarted,
Date timeExpired)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static Promotion.Builder |
builder()
Create a new builder.
|
boolean |
equals(Object o) |
Float |
getAmount()
Total amount of credit for the promotion related to the subscription if there is one.
|
String |
getCurrencyUnit()
Currency unit associated with the promotion.
|
Integer |
getDuration()
How long the promotion related to the subscription, if any, is valid in duration units.
|
String |
getDurationUnit()
Unit for the duration.
|
Boolean |
getIsIntentToPay()
Whether or not customer intends to pay once the promotion is done.
|
Promotion.Status |
getStatus()
Current status of the promotion related to the subscription if there is one.
|
Date |
getTimeExpired()
Date-time for when the promotion ends.
|
Date |
getTimeStarted()
Date-time for when the promotion starts.
|
int |
hashCode() |
Promotion.Builder |
toBuilder() |
String |
toString() |
String |
toString(boolean includeByteArrayContents)
Return a string representation of the object.
|
markPropertyAsExplicitlySet, wasPropertyExplicitlySet
@Deprecated @ConstructorProperties(value={"duration","durationUnit","amount","status","isIntentToPay","currencyUnit","timeStarted","timeExpired"}) public Promotion(Integer duration, String durationUnit, Float amount, Promotion.Status status, Boolean isIntentToPay, String currencyUnit, Date timeStarted, Date timeExpired)
public static Promotion.Builder builder()
Create a new builder.
public Promotion.Builder toBuilder()
public Integer getDuration()
How long the promotion related to the subscription, if any, is valid in duration units.
public String getDurationUnit()
Unit for the duration.
public Float getAmount()
Total amount of credit for the promotion related to the subscription if there is one.
public Promotion.Status getStatus()
Current status of the promotion related to the subscription if there is one.
public Boolean getIsIntentToPay()
Whether or not customer intends to pay once the promotion is done.
public String getCurrencyUnit()
Currency unit associated with the promotion.
public Date getTimeStarted()
Date-time for when the promotion starts.
public Date getTimeExpired()
Date-time for when the promotion ends.
public String toString()
toString
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
includeByteArrayContents
- true to include the full contents of byte arrayspublic boolean equals(Object o)
equals
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
public int hashCode()
hashCode
in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
Copyright © 2016–2023. All rights reserved.