Class Order

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

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

  • Constructor Details

    • Order

      public Order()
  • Method Details

    • id

      public Order id(String id)
    • getId

      @Nullable public String getId()
      Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request.
      Returns:
      id
    • setId

      public void setId(String id)
    • sourceId

      public Order sourceId(String sourceId)
    • getSourceId

      @Nullable public String getSourceId()
      Unique source ID of an existing order that will be linked to the redemption of this request.
      Returns:
      sourceId
    • setSourceId

      public void setSourceId(String sourceId)
    • status

      public Order status(Order.StatusEnum status)
    • getStatus

      @Nullable public Order.StatusEnum getStatus()
      The order status.
      Returns:
      status
    • setStatus

      public void setStatus(Order.StatusEnum status)
    • amount

      public Order amount(Integer amount)
    • getAmount

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

      public void setAmount(Integer amount)
    • initialAmount

      public Order 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)
    • discountAmount

      public Order discountAmount(Integer discountAmount)
    • getDiscountAmount

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

      public void setDiscountAmount(Integer discountAmount)
    • items

      public Order items(List<OrderItem> items)
    • addItemsItem

      public Order addItemsItem(OrderItem itemsItem)
    • getItems

      @Nullable public List<OrderItem> getItems()
      Array of items applied to the order. It can include up 500 items.
      Returns:
      items
    • setItems

      public void setItems(List<OrderItem> items)
    • metadata

      public Order metadata(Object metadata)
    • getMetadata

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

      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 Order fromJson(String jsonString) throws IOException
      Create an instance of Order given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Order
      Throws:
      IOException - if the JSON string is invalid with respect to Order
    • toJson

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