Class RedemptionEntryOrder

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

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

  • Constructor Details

    • RedemptionEntryOrder

      public RedemptionEntryOrder()
  • Method Details

    • id

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

      public void setStatus(RedemptionEntryOrder.StatusEnum status)
    • amount

      public RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder 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 RedemptionEntryOrder.ObjectEnum getObject()
      The type of the object represented by JSON.
      Returns:
      _object
    • setObject

      public void setObject(RedemptionEntryOrder.ObjectEnum _object)
    • createdAt

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

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

      public void setReferrerId(String referrerId)
    • customer

    • getCustomer

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

      public void setCustomer(RedemptionEntryOrderCustomer customer)
    • referrer

    • getReferrer

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

      public void setReferrer(RedemptionEntryOrderReferrer referrer)
    • redemptions

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

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

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