Class VouchersBalanceUpdateRequestBody

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class VouchersBalanceUpdateRequestBody extends Object
Request body schema for `vouchers/{code}/balance`.
  • Field Details

  • Constructor Details

    • VouchersBalanceUpdateRequestBody

      public VouchersBalanceUpdateRequestBody()
  • Method Details

    • amount

      public VouchersBalanceUpdateRequestBody amount(Integer amount)
    • getAmount

      @Nullable public Integer getAmount()
      The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000.
      Returns:
      amount
    • setAmount

      public void setAmount(Integer amount)
    • sourceId

      public VouchersBalanceUpdateRequestBody sourceId(String sourceId)
    • getSourceId

      @Nullable public String getSourceId()
      The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service.
      Returns:
      sourceId
    • setSourceId

      public void setSourceId(String sourceId)
    • reason

      public VouchersBalanceUpdateRequestBody reason(String reason)
    • getReason

      @Nullable public String getReason()
      Reason why the transaction occurred.
      Returns:
      reason
    • setReason

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

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