Package com.adobe.aco.model
Class TierPercentage
- java.lang.Object
-
- com.adobe.aco.model.TierPercentage
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.4.0") public class TierPercentage extends ObjectPercentage discount applied to the regular price when purchasing at or above a specific quantity threshold. Example: $100 regular price with 20% discount for quantity of 10 or more.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTierPercentage.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_PERCENTAGEstatic StringSERIALIZED_NAME_QTY
-
Constructor Summary
Constructors Constructor Description TierPercentage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static TierPercentagefromJson(String jsonString)Create an instance of TierPercentage given an JSON stringFloatgetPercentage()Discount percentage applied to the specified quantity threshold.FloatgetQty()Minimum quantity required to qualify for this tier discount.inthashCode()TierPercentagepercentage(Float percentage)TierPercentageqty(Float qty)voidsetPercentage(Float percentage)voidsetQty(Float qty)StringtoJson()Convert an instance of TierPercentage to an JSON stringStringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_QTY
public static final String SERIALIZED_NAME_QTY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PERCENTAGE
public static final String SERIALIZED_NAME_PERCENTAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
qty
public TierPercentage qty(Float qty)
-
getQty
@Nonnull public Float getQty()
Minimum quantity required to qualify for this tier discount. Must be greater than 1.- Returns:
- qty
-
setQty
public void setQty(Float qty)
-
percentage
public TierPercentage percentage(Float percentage)
-
getPercentage
@Nonnull public Float getPercentage()
Discount percentage applied to the specified quantity threshold. Valid range is 0.01 to 99.99 (1% to 99.99%).- Returns:
- percentage
-
setPercentage
public void setPercentage(Float percentage)
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to TierPercentage
-
fromJson
public static TierPercentage fromJson(String jsonString) throws IOException
Create an instance of TierPercentage given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of TierPercentage
- Throws:
IOException- if the JSON string is invalid with respect to TierPercentage
-
toJson
public String toJson()
Convert an instance of TierPercentage to an JSON string- Returns:
- JSON string
-
-