Class OrderCalculatedItem

java.lang.Object
io.voucherify.client.model.OrderCalculatedItem

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class OrderCalculatedItem extends Object
OrderCalculatedItem
  • Field Details

  • Constructor Details

    • OrderCalculatedItem

      public OrderCalculatedItem()
  • Method Details

    • id

      public OrderCalculatedItem id(String id)
    • getId

      @Nullable public String getId()
      Unique identifier of the order line item.
      Returns:
      id
    • setId

      public void setId(String id)
    • skuId

      public OrderCalculatedItem skuId(String skuId)
    • getSkuId

      @Nullable public String getSkuId()
      Unique identifier of the SKU. It is assigned by Voucherify.
      Returns:
      skuId
    • setSkuId

      public void setSkuId(String skuId)
    • productId

      public OrderCalculatedItem productId(String productId)
    • getProductId

      @Nullable public String getProductId()
      Unique identifier of the product. It is assigned by Voucherify.
      Returns:
      productId
    • setProductId

      public void setProductId(String productId)
    • relatedObject

      public OrderCalculatedItem relatedObject(OrderCalculatedItem.RelatedObjectEnum relatedObject)
    • getRelatedObject

      @Nullable public OrderCalculatedItem.RelatedObjectEnum getRelatedObject()
      Used along with the source_id property, can be set to either sku or product.
      Returns:
      relatedObject
    • setRelatedObject

      public void setRelatedObject(OrderCalculatedItem.RelatedObjectEnum relatedObject)
    • sourceId

      public OrderCalculatedItem sourceId(String sourceId)
    • getSourceId

      @Nullable public String 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

      public void setSourceId(String sourceId)
    • quantity

      public OrderCalculatedItem quantity(Integer quantity)
    • getQuantity

      @Nullable public Integer getQuantity()
      The quantity of the particular item in the cart.
      Returns:
      quantity
    • setQuantity

      public void setQuantity(Integer quantity)
    • discountQuantity

      public OrderCalculatedItem discountQuantity(Integer discountQuantity)
    • getDiscountQuantity

      @Nullable public Integer getDiscountQuantity()
      Number of dicounted items.
      Returns:
      discountQuantity
    • setDiscountQuantity

      public void setDiscountQuantity(Integer discountQuantity)
    • initialQuantity

      public OrderCalculatedItem initialQuantity(Integer initialQuantity)
    • getInitialQuantity

      @Nullable public Integer 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

      public void setInitialQuantity(Integer initialQuantity)
    • amount

      public OrderCalculatedItem amount(Integer amount)
    • getAmount

      @Nullable public Integer getAmount()
      The total amount of the order item (price * quantity).
      Returns:
      amount
    • setAmount

      public void setAmount(Integer amount)
    • discountAmount

      public OrderCalculatedItem discountAmount(Integer discountAmount)
    • getDiscountAmount

      @Nullable public Integer getDiscountAmount()
      Sum of all order-item-level discounts applied to the order.
      Returns:
      discountAmount
    • setDiscountAmount

      public void setDiscountAmount(Integer discountAmount)
    • appliedDiscountAmount

      public OrderCalculatedItem appliedDiscountAmount(Integer appliedDiscountAmount)
    • getAppliedDiscountAmount

      @Nullable public Integer getAppliedDiscountAmount()
      This field shows the order-level discount applied.
      Returns:
      appliedDiscountAmount
    • setAppliedDiscountAmount

      public void setAppliedDiscountAmount(Integer appliedDiscountAmount)
    • appliedDiscountQuantity

      public OrderCalculatedItem appliedDiscountQuantity(Integer appliedDiscountQuantity)
    • getAppliedDiscountQuantity

      @Nullable public Integer getAppliedDiscountQuantity()
      Number of the discounted items applied in the transaction.
      Returns:
      appliedDiscountQuantity
    • setAppliedDiscountQuantity

      public void setAppliedDiscountQuantity(Integer appliedDiscountQuantity)
    • appliedQuantity

      public OrderCalculatedItem appliedQuantity(Integer appliedQuantity)
    • getAppliedQuantity

      @Nullable public Integer 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

      public void setAppliedQuantity(Integer appliedQuantity)
    • appliedQuantityAmount

      public OrderCalculatedItem appliedQuantityAmount(Integer appliedQuantityAmount)
    • getAppliedQuantityAmount

      @Nullable public Integer 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

      public void setAppliedQuantityAmount(Integer appliedQuantityAmount)
    • initialAmount

      public OrderCalculatedItem initialAmount(Integer initialAmount)
    • getInitialAmount

      @Nullable public Integer 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

      public void setInitialAmount(Integer initialAmount)
    • price

      public OrderCalculatedItem price(Integer price)
    • getPrice

      @Nullable public Integer 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

      public void setPrice(Integer price)
    • subtotalAmount

      public OrderCalculatedItem subtotalAmount(Integer subtotalAmount)
    • getSubtotalAmount

      @Nullable public Integer 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

      public void setSubtotalAmount(Integer subtotalAmount)
    • product

    • getProduct

      @Nullable public OrderCalculatedItemProduct getProduct()
      Get product
      Returns:
      product
    • setProduct

      public void setProduct(OrderCalculatedItemProduct product)
    • sku

    • getSku

      @Nullable public OrderCalculatedItemSku getSku()
      Get sku
      Returns:
      sku
    • setSku

      public void setSku(OrderCalculatedItemSku sku)
    • _object

    • getObject

      @Nullable public OrderCalculatedItem.ObjectEnum getObject()
      The type of the object represented by JSON.
      Returns:
      _object
    • setObject

      public void setObject(OrderCalculatedItem.ObjectEnum _object)
    • metadata

      public OrderCalculatedItem metadata(Object metadata)
    • getMetadata

      @Nullable public Object 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

      public void setMetadata(Object metadata)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromJson

      public static OrderCalculatedItem fromJson(String jsonString) throws IOException
      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

      public String toJson()
      Convert an instance of OrderCalculatedItem to an JSON string
      Returns:
      JSON string