Package com.adobe.aco.model
Class DiscountsFinalPrice
- java.lang.Object
-
- com.adobe.aco.model.DiscountsFinalPrice
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.4.0") public class DiscountsFinalPrice extends ObjectFixed amount discount that reduces the regular price by a specific monetary value. Example: $100 regular price with a $10 fixed discount results in $90 final price.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDiscountsFinalPrice.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_CODEstatic StringSERIALIZED_NAME_PRICE
-
Constructor Summary
Constructors Constructor Description DiscountsFinalPrice()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DiscountsFinalPricecode(String code)booleanequals(Object o)static DiscountsFinalPricefromJson(String jsonString)Create an instance of DiscountsFinalPrice given an JSON stringStringgetCode()Unique identifier for the discount.FloatgetPrice()Fixed discount amount in the same currency as the price book.inthashCode()DiscountsFinalPriceprice(Float price)voidsetCode(String code)voidsetPrice(Float price)StringtoJson()Convert an instance of DiscountsFinalPrice 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_CODE
public static final String SERIALIZED_NAME_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PRICE
public static final String SERIALIZED_NAME_PRICE
- See Also:
- Constant Field Values
-
-
Method Detail
-
code
public DiscountsFinalPrice code(String code)
-
getCode
@Nonnull public String getCode()
Unique identifier for the discount. Must be unique within the price record. Use descriptive codes for easier management (e.g., \"loyalty_discount\", \"holiday_sale\").- Returns:
- code
-
setCode
public void setCode(String code)
-
price
public DiscountsFinalPrice price(Float price)
-
getPrice
@Nonnull public Float getPrice()
Fixed discount amount in the same currency as the price book. Must be a positive number less than the regular price.- Returns:
- price
-
setPrice
public void setPrice(Float price)
-
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 DiscountsFinalPrice
-
fromJson
public static DiscountsFinalPrice fromJson(String jsonString) throws IOException
Create an instance of DiscountsFinalPrice given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of DiscountsFinalPrice
- Throws:
IOException- if the JSON string is invalid with respect to DiscountsFinalPrice
-
toJson
public String toJson()
Convert an instance of DiscountsFinalPrice to an JSON string- Returns:
- JSON string
-
-