Class SimpleVoucherRedemption

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class SimpleVoucherRedemption extends Object
Defines the redemption limits on vouchers.
  • Field Details

  • Constructor Details

    • SimpleVoucherRedemption

      public SimpleVoucherRedemption()
  • Method Details

    • quantity

      public SimpleVoucherRedemption quantity(Integer quantity)
    • getQuantity

      @Nullable public Integer getQuantity()
      How many times a voucher can be redeemed. A `null` value means unlimited.
      Returns:
      quantity
    • setQuantity

      public void setQuantity(Integer quantity)
    • redeemedQuantity

      public SimpleVoucherRedemption redeemedQuantity(Integer redeemedQuantity)
    • getRedeemedQuantity

      @Nullable public Integer getRedeemedQuantity()
      How many times a voucher has already been redeemed.
      Returns:
      redeemedQuantity
    • setRedeemedQuantity

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

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