Class OrderItem

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

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

  • Constructor Details

    • OrderItem

      public OrderItem()
  • Method Details

    • skuId

      public OrderItem 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 OrderItem 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 OrderItem relatedObject(OrderItem.RelatedObjectEnum relatedObject)
    • getRelatedObject

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

      public void setRelatedObject(OrderItem.RelatedObjectEnum relatedObject)
    • sourceId

      public OrderItem 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 OrderItem 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 OrderItem discountQuantity(Integer discountQuantity)
    • getDiscountQuantity

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

      public void setDiscountQuantity(Integer discountQuantity)
    • initialQuantity

      public OrderItem 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 OrderItem 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 OrderItem 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)
    • initialAmount

      public OrderItem 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 OrderItem 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)
    • product

      public OrderItem product(OrderItemProduct product)
    • getProduct

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

      public void setProduct(OrderItemProduct product)
    • sku

      public OrderItem sku(OrderItemSku sku)
    • getSku

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

      public void setSku(OrderItemSku sku)
    • metadata

      public OrderItem metadata(Object metadata)
    • getMetadata

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

      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 OrderItem fromJson(String jsonString) throws IOException
      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

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