Package io.voucherify.client.model
Class OrderItem
java.lang.Object
io.voucherify.client.model.OrderItem
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class OrderItem
extends Object
OrderItem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumUsed along with the source_id property, can be set to either sku or product. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondiscountAmount(Integer discountAmount) discountQuantity(Integer discountQuantity) booleanstatic OrderItemCreate an instance of OrderItem given an JSON stringThe total amount of the order item (price * quantity).Sum of all order-item-level discounts applied to the order.Number of dicounted items.A positive integer in the smallest currency unit (e.g.A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.A set of custom key/value pairs that you can attach to an order item.getPrice()Unit price of an item.Get productUnique identifier of the product.The quantity of the particular item in the cart.Used along with the source_id property, can be set to either sku or product.getSku()Get skugetSkuId()Unique identifier of the SKU.The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID).inthashCode()initialAmount(Integer initialAmount) initialQuantity(Integer initialQuantity) product(OrderItemProduct product) relatedObject(OrderItem.RelatedObjectEnum relatedObject) voidvoidsetDiscountAmount(Integer discountAmount) voidsetDiscountQuantity(Integer discountQuantity) voidsetInitialAmount(Integer initialAmount) voidsetInitialQuantity(Integer initialQuantity) voidsetMetadata(Object metadata) voidvoidsetProduct(OrderItemProduct product) voidsetProductId(String productId) voidsetQuantity(Integer quantity) voidsetRelatedObject(OrderItem.RelatedObjectEnum relatedObject) voidsetSku(OrderItemSku sku) voidvoidsetSourceId(String sourceId) sku(OrderItemSku sku) toJson()Convert an instance of OrderItem to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_SKU_ID
- See Also:
-
SERIALIZED_NAME_PRODUCT_ID
- See Also:
-
SERIALIZED_NAME_RELATED_OBJECT
- See Also:
-
SERIALIZED_NAME_SOURCE_ID
- See Also:
-
SERIALIZED_NAME_QUANTITY
- See Also:
-
SERIALIZED_NAME_DISCOUNT_QUANTITY
- See Also:
-
SERIALIZED_NAME_INITIAL_QUANTITY
- See Also:
-
SERIALIZED_NAME_AMOUNT
- See Also:
-
SERIALIZED_NAME_DISCOUNT_AMOUNT
- See Also:
-
SERIALIZED_NAME_INITIAL_AMOUNT
- See Also:
-
SERIALIZED_NAME_PRICE
- See Also:
-
SERIALIZED_NAME_PRODUCT
- See Also:
-
SERIALIZED_NAME_SKU
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
OrderItem
public OrderItem()
-
-
Method Details
-
skuId
-
getSkuId
Unique identifier of the SKU. It is assigned by Voucherify.- Returns:
- skuId
-
setSkuId
-
productId
-
getProductId
Unique identifier of the product. It is assigned by Voucherify.- Returns:
- productId
-
setProductId
-
getRelatedObject
Used along with the source_id property, can be set to either sku or product.- Returns:
- relatedObject
-
setRelatedObject
-
sourceId
-
getSourceId
The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service.- Returns:
- sourceId
-
setSourceId
-
quantity
-
getQuantity
The quantity of the particular item in the cart.- Returns:
- quantity
-
setQuantity
-
discountQuantity
-
getDiscountQuantity
Number of dicounted items.- Returns:
- discountQuantity
-
setDiscountQuantity
-
initialQuantity
-
getInitialQuantity
A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity.- Returns:
- initialQuantity
-
setInitialQuantity
-
amount
-
getAmount
The total amount of the order item (price * quantity).- Returns:
- amount
-
setAmount
-
discountAmount
-
getDiscountAmount
Sum of all order-item-level discounts applied to the order.- Returns:
- discountAmount
-
setDiscountAmount
-
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
-
price
-
getPrice
Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`.- Returns:
- price
-
setPrice
-
product
-
getProduct
Get product- Returns:
- product
-
setProduct
-
sku
-
getSku
Get sku- Returns:
- sku
-
setSku
-
metadata
-
getMetadata
A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to define business validation rules.- Returns:
- metadata
-
setMetadata
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of OrderItem given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OrderItem
- Throws:
IOException- if the JSON string is invalid with respect to OrderItem
-
toJson
Convert an instance of OrderItem to an JSON string- Returns:
- JSON string
-