Class RedeemableGift

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class RedeemableGift extends Object
Contains current gift card balance information.
  • Field Details

  • Constructor Details

    • RedeemableGift

      public RedeemableGift()
  • Method Details

    • balance

      public RedeemableGift balance(BigDecimal balance)
    • getBalance

      @Nullable public BigDecimal getBalance()
      Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000.
      Returns:
      balance
    • setBalance

      public void setBalance(BigDecimal balance)
    • credits

      public RedeemableGift credits(BigDecimal credits)
    • getCredits

      @Nullable public BigDecimal getCredits()
      The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`.
      Returns:
      credits
    • setCredits

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

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