Package io.voucherify.client.model
Class Order
java.lang.Object
io.voucherify.client.model.Order
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class Order
extends Object
Order information.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe order status. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddItemsItem(OrderItem itemsItem) discountAmount(Integer discountAmount) booleanstatic OrderCreate an instance of Order given an JSON stringA positive integer in the smallest currency unit (e.g.Sum of all order-level discounts applied to the order.getId()Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.A positive integer in the smallest currency unit (e.g.getItems()Array of items applied to the order.A set of custom key/value pairs that you can attach to an order.Unique source ID of an existing order that will be linked to the redemption of this request.The order status.inthashCode()initialAmount(Integer initialAmount) voidvoidsetDiscountAmount(Integer discountAmount) voidvoidsetInitialAmount(Integer initialAmount) voidvoidsetMetadata(Object metadata) voidsetSourceId(String sourceId) voidsetStatus(Order.StatusEnum status) status(Order.StatusEnum status) toJson()Convert an instance of Order to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_SOURCE_ID
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_AMOUNT
- See Also:
-
SERIALIZED_NAME_INITIAL_AMOUNT
- See Also:
-
SERIALIZED_NAME_DISCOUNT_AMOUNT
- See Also:
-
SERIALIZED_NAME_ITEMS
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Order
public Order()
-
-
Method Details
-
id
-
getId
Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.- Returns:
- id
-
setId
-
sourceId
-
getSourceId
Unique source ID of an existing order that will be linked to the redemption of this request.- Returns:
- sourceId
-
setSourceId
-
status
-
getStatus
The order status.- Returns:
- status
-
setStatus
-
amount
-
getAmount
A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.- Returns:
- amount
-
setAmount
-
initialAmount
-
getInitialAmount
A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts.- Returns:
- initialAmount
-
setInitialAmount
-
discountAmount
-
getDiscountAmount
Sum of all order-level discounts applied to the order.- Returns:
- discountAmount
-
setDiscountAmount
-
items
-
addItemsItem
-
getItems
Array of items applied to the order. It can include up 500 items.- Returns:
- items
-
setItems
-
metadata
-
getMetadata
A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas.- Returns:
- metadata
-
setMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of Order given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Order
- Throws:
IOException- if the JSON string is invalid with respect to Order
-
toJson
Convert an instance of Order to an JSON string- Returns:
- JSON string
-