Class OrdersUpdateResponseBody

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class OrdersUpdateResponseBody extends Object
Response body schema for **PUT** `v1/orders/{orderId}`.
  • Field Details

  • Constructor Details

    • OrdersUpdateResponseBody

      public OrdersUpdateResponseBody()
  • Method Details

    • 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 OrdersUpdateResponseBody 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 OrdersUpdateResponseBody.StatusEnum getStatus()
      The order status.
      Returns:
      status
    • setStatus

      public void setStatus(OrdersUpdateResponseBody.StatusEnum status)
    • amount

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

    • addItemsItem

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

    • getObject

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

      public void setObject(OrdersUpdateResponseBody.ObjectEnum _object)
    • createdAt

      public OrdersUpdateResponseBody 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 OrdersUpdateResponseBody 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 OrdersUpdateResponseBody 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 OrdersUpdateResponseBody referrerId(String referrerId)
    • getReferrerId

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

      public void setReferrerId(String referrerId)
    • customer

      public OrdersUpdateResponseBody customer(CustomerId customer)
    • getCustomer

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

      public void setCustomer(CustomerId customer)
    • referrer

      public OrdersUpdateResponseBody referrer(ReferrerId referrer)
    • getReferrer

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

      public void setReferrer(ReferrerId referrer)
    • redemptions

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

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

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