Package io.voucherify.client.model
Class OrdersCreateRequestBody
java.lang.Object
io.voucherify.client.model.OrdersCreateRequestBody
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class OrdersCreateRequestBody
extends Object
Request body schema for **POST** `v1/orders`.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe order status. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddItemsItem(OrderItem itemsItem) createdAt(OffsetDateTime createdAt) discountAmount(Integer discountAmount) booleanstatic OrdersCreateRequestBodyCreate an instance of OrdersCreateRequestBody given an JSON stringA positive integer in the smallest currency unit (e.g.Timestamp representing the date and time when the order was created.Get customerSum 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.Get referrerUnique referrer ID.Unique source ID of an existing order that will be linked to the redemption of this request.The order status.inthashCode()initialAmount(Integer initialAmount) referrerId(String referrerId) voidvoidsetCreatedAt(OffsetDateTime createdAt) voidsetCustomer(Customer customer) voidsetDiscountAmount(Integer discountAmount) voidvoidsetInitialAmount(Integer initialAmount) voidvoidsetMetadata(Object metadata) voidsetReferrer(Referrer referrer) voidsetReferrerId(String referrerId) voidsetSourceId(String sourceId) voidtoJson()Convert an instance of OrdersCreateRequestBody 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:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_REFERRER_ID
- See Also:
-
SERIALIZED_NAME_CUSTOMER
- See Also:
-
SERIALIZED_NAME_REFERRER
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
OrdersCreateRequestBody
public OrdersCreateRequestBody()
-
-
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
-
createdAt
-
getCreatedAt
Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.- Returns:
- createdAt
-
setCreatedAt
-
referrerId
-
getReferrerId
Unique referrer ID.- Returns:
- referrerId
-
setReferrerId
-
customer
-
getCustomer
Get customer- Returns:
- customer
-
setCustomer
-
referrer
-
getReferrer
Get referrer- Returns:
- referrer
-
setReferrer
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of OrdersCreateRequestBody given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OrdersCreateRequestBody
- Throws:
IOException- if the JSON string is invalid with respect to OrdersCreateRequestBody
-
toJson
Convert an instance of OrdersCreateRequestBody to an JSON string- Returns:
- JSON string
-