Package io.voucherify.client.model
Class OrderCalculatedItem
java.lang.Object
io.voucherify.client.model.OrderCalculatedItem
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class OrderCalculatedItem
extends Object
OrderCalculatedItem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe type of the object represented by JSON.static 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 Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_object(OrderCalculatedItem.ObjectEnum _object) appliedDiscountAmount(Integer appliedDiscountAmount) appliedDiscountQuantity(Integer appliedDiscountQuantity) appliedQuantity(Integer appliedQuantity) appliedQuantityAmount(Integer appliedQuantityAmount) discountAmount(Integer discountAmount) discountQuantity(Integer discountQuantity) booleanstatic OrderCalculatedItemCreate an instance of OrderCalculatedItem given an JSON stringThe total amount of the order item (price * quantity).This field shows the order-level discount applied.Number of the discounted items applied in the transaction.Quantity of items changed by the application of a new quantity items.Amount for the items changed by the application of a new quantity items.Sum of all order-item-level discounts applied to the order.Number of dicounted items.getId()Unique identifier of the order line item.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 item object.The type of the object represented by JSON.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).Final order item amount after the applied item-level discount.inthashCode()initialAmount(Integer initialAmount) initialQuantity(Integer initialQuantity) product(OrderCalculatedItemProduct product) relatedObject(OrderCalculatedItem.RelatedObjectEnum relatedObject) voidvoidsetAppliedDiscountAmount(Integer appliedDiscountAmount) voidsetAppliedDiscountQuantity(Integer appliedDiscountQuantity) voidsetAppliedQuantity(Integer appliedQuantity) voidsetAppliedQuantityAmount(Integer appliedQuantityAmount) voidsetDiscountAmount(Integer discountAmount) voidsetDiscountQuantity(Integer discountQuantity) voidvoidsetInitialAmount(Integer initialAmount) voidsetInitialQuantity(Integer initialQuantity) voidsetMetadata(Object metadata) voidsetObject(OrderCalculatedItem.ObjectEnum _object) voidvoidsetProduct(OrderCalculatedItemProduct product) voidsetProductId(String productId) voidsetQuantity(Integer quantity) voidsetRelatedObject(OrderCalculatedItem.RelatedObjectEnum relatedObject) voidvoidvoidsetSourceId(String sourceId) voidsetSubtotalAmount(Integer subtotalAmount) subtotalAmount(Integer subtotalAmount) toJson()Convert an instance of OrderCalculatedItem to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_ID
- See Also:
-
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_APPLIED_DISCOUNT_AMOUNT
- See Also:
-
SERIALIZED_NAME_APPLIED_DISCOUNT_QUANTITY
- See Also:
-
SERIALIZED_NAME_APPLIED_QUANTITY
- See Also:
-
SERIALIZED_NAME_APPLIED_QUANTITY_AMOUNT
- See Also:
-
SERIALIZED_NAME_INITIAL_AMOUNT
- See Also:
-
SERIALIZED_NAME_PRICE
- See Also:
-
SERIALIZED_NAME_SUBTOTAL_AMOUNT
- See Also:
-
SERIALIZED_NAME_PRODUCT
- See Also:
-
SERIALIZED_NAME_SKU
- See Also:
-
SERIALIZED_NAME_OBJECT
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
OrderCalculatedItem
public OrderCalculatedItem()
-
-
Method Details
-
id
-
getId
Unique identifier of the order line item.- Returns:
- id
-
setId
-
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
-
appliedDiscountAmount
-
getAppliedDiscountAmount
This field shows the order-level discount applied.- Returns:
- appliedDiscountAmount
-
setAppliedDiscountAmount
-
appliedDiscountQuantity
-
getAppliedDiscountQuantity
Number of the discounted items applied in the transaction.- Returns:
- appliedDiscountQuantity
-
setAppliedDiscountQuantity
-
appliedQuantity
-
getAppliedQuantity
Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.- Returns:
- appliedQuantity
-
setAppliedQuantity
-
appliedQuantityAmount
-
getAppliedQuantityAmount
Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced.- Returns:
- appliedQuantityAmount
-
setAppliedQuantityAmount
-
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
-
subtotalAmount
-
getSubtotalAmount
Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the `amount`. `subtotal_amount`=`amount`-`applied_discount_amount`- Returns:
- subtotalAmount
-
setSubtotalAmount
-
product
-
getProduct
Get product- Returns:
- product
-
setProduct
-
sku
-
getSku
Get sku- Returns:
- sku
-
setSku
-
_object
-
getObject
The type of the object represented by JSON.- Returns:
- _object
-
setObject
-
metadata
-
getMetadata
A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item 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 OrderCalculatedItem given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OrderCalculatedItem
- Throws:
IOException- if the JSON string is invalid with respect to OrderCalculatedItem
-
toJson
Convert an instance of OrderCalculatedItem to an JSON string- Returns:
- JSON string
-