Class OrderCalculated

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

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

  • Constructor Details

    • OrderCalculated

      public OrderCalculated()
  • Method Details

    • id

      public OrderCalculated 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 OrderCalculated 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

    • getStatus

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

      public void setStatus(OrderCalculated.StatusEnum status)
    • amount

      public OrderCalculated 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 OrderCalculated 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 OrderCalculated 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)
    • itemsDiscountAmount

      public OrderCalculated itemsDiscountAmount(Integer itemsDiscountAmount)
    • getItemsDiscountAmount

      @Nullable public Integer getItemsDiscountAmount()
      Sum of all product-specific discounts applied to the order.
      Returns:
      itemsDiscountAmount
    • setItemsDiscountAmount

      public void setItemsDiscountAmount(Integer itemsDiscountAmount)
    • totalDiscountAmount

      public OrderCalculated totalDiscountAmount(Integer totalDiscountAmount)
    • getTotalDiscountAmount

      @Nullable public Integer getTotalDiscountAmount()
      Sum of all order-level AND all product-specific discounts applied to the order.
      Returns:
      totalDiscountAmount
    • setTotalDiscountAmount

      public void setTotalDiscountAmount(Integer totalDiscountAmount)
    • totalAmount

      public OrderCalculated totalAmount(Integer totalAmount)
    • getTotalAmount

      @Nullable public Integer getTotalAmount()
      Order amount after undoing all the discounts through the rollback redemption.
      Returns:
      totalAmount
    • setTotalAmount

      public void setTotalAmount(Integer totalAmount)
    • appliedDiscountAmount

      public OrderCalculated appliedDiscountAmount(Integer appliedDiscountAmount)
    • getAppliedDiscountAmount

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

      public void setAppliedDiscountAmount(Integer appliedDiscountAmount)
    • itemsAppliedDiscountAmount

      public OrderCalculated itemsAppliedDiscountAmount(Integer itemsAppliedDiscountAmount)
    • getItemsAppliedDiscountAmount

      @Nullable public Integer getItemsAppliedDiscountAmount()
      Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)`
      Returns:
      itemsAppliedDiscountAmount
    • setItemsAppliedDiscountAmount

      public void setItemsAppliedDiscountAmount(Integer itemsAppliedDiscountAmount)
    • totalAppliedDiscountAmount

      public OrderCalculated totalAppliedDiscountAmount(Integer totalAppliedDiscountAmount)
    • getTotalAppliedDiscountAmount

      @Nullable public Integer getTotalAppliedDiscountAmount()
      Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`
      Returns:
      totalAppliedDiscountAmount
    • setTotalAppliedDiscountAmount

      public void setTotalAppliedDiscountAmount(Integer totalAppliedDiscountAmount)
    • items

      public OrderCalculated items(List<OrderCalculatedItem> items)
    • addItemsItem

      public OrderCalculated addItemsItem(OrderCalculatedItem itemsItem)
    • getItems

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

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

      public OrderCalculated 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)
    • _object

      public OrderCalculated _object(OrderCalculated.ObjectEnum _object)
    • getObject

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

      public void setObject(OrderCalculated.ObjectEnum _object)
    • createdAt

      public OrderCalculated createdAt(OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(OffsetDateTime createdAt)
    • updatedAt

      public OrderCalculated updatedAt(OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      Timestamp representing the date and time when the order was last updated in ISO 8601 format.
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(OffsetDateTime updatedAt)
    • customerId

      public OrderCalculated customerId(String customerId)
    • getCustomerId

      @Nullable public String getCustomerId()
      Unique customer ID of the customer making the purchase.
      Returns:
      customerId
    • setCustomerId

      public void setCustomerId(String customerId)
    • referrerId

      public OrderCalculated referrerId(String referrerId)
    • getReferrerId

      @Nullable public String getReferrerId()
      Unique referrer ID.
      Returns:
      referrerId
    • setReferrerId

      public void setReferrerId(String referrerId)
    • customer

      public OrderCalculated customer(CustomerId customer)
    • getCustomer

      @Nullable public CustomerId getCustomer()
      Get customer
      Returns:
      customer
    • setCustomer

      public void setCustomer(CustomerId customer)
    • referrer

      public OrderCalculated referrer(ReferrerId referrer)
    • getReferrer

      @Nullable public ReferrerId getReferrer()
      Get referrer
      Returns:
      referrer
    • setReferrer

      public void setReferrer(ReferrerId referrer)
    • redemptions

      public OrderCalculated redemptions(Map<String,OrderRedemptionsEntry> redemptions)
    • putRedemptionsItem

      public OrderCalculated putRedemptionsItem(String key, OrderRedemptionsEntry redemptionsItem)
    • getRedemptions

      @Nullable public Map<String,OrderRedemptionsEntry> getRedemptions()
      Get redemptions
      Returns:
      redemptions
    • setRedemptions

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

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