All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.paymenthighway.model.request.RevertTransactionRequest Maven / Gradle / Ivy

There is a newer version: 2.1.1.1
Show newest version
package io.paymenthighway.model.request;

/**
 * Revert Transaction request POJO
 */
public class RevertTransactionRequest extends Request {

  String amount = null;
  boolean blocking = true;

  /**
   * Reverts the full amount
   */
  public RevertTransactionRequest() {
  }

  /**
   * reverts specified amount
   *
   * @param amount Amount to revert
   */
  public RevertTransactionRequest(String amount) {
    this.amount = amount;
  }

  /**
   * reverts specified amount
   * If the blocking parameter is set to false, the debit
   * and credit calls return immediately, without waiting
   * for the transaction to be fully processed. In this case
   * one is encouraged to poll the /transaction/[id] GET request
   * to check the result of the transaction
   *
   * @param amount Amount to revert
   * @param blocking Is call blocking
   */
  public RevertTransactionRequest(String amount, boolean blocking) {
    this.amount = amount;
    this.blocking = blocking;
  }

  /*
   * Getters.
   */
  public String getAmount() {
    return amount;
  }

  public boolean isBlocking() {
    return blocking;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy