Class TerminalRouteResponse

java.lang.Object
com.blockchyp.client.dto.Acknowledgement
com.blockchyp.client.TerminalRouteResponse
All Implemented Interfaces:
IAbstractAcknowledgement

public class TerminalRouteResponse extends Acknowledgement
Models metadata about a terminal route, including it's location on the local network and transient credentials.
  • Constructor Details

    • TerminalRouteResponse

      public TerminalRouteResponse()
  • Method Details

    • isSuccess

      public boolean isSuccess()
      Gets the success flag.
      Specified by:
      isSuccess in interface IAbstractAcknowledgement
      Overrides:
      isSuccess in class Acknowledgement
      Returns:
      true if the API call succeeded.
    • setSuccess

      public void setSuccess(boolean success)
      Sets the success flag.
      Overrides:
      setSuccess in class Acknowledgement
      Parameters:
      success - true if the API call succeeded.
    • getError

      public String getError()
      Gets a narrative description of the error, if any.
      Specified by:
      getError in interface IAbstractAcknowledgement
      Overrides:
      getError in class Acknowledgement
      Returns:
      narrative description of any error.
    • setError

      public void setError(String error)
      Sets a narrative description of the error, if any.
      Overrides:
      setError in class Acknowledgement
      Parameters:
      error - narrative description of any error.
    • getTerminalName

      public String getTerminalName()
      Echoes back the terminal name for the route lookup.
      Returns:
      name of the terminal assigned at activation.
    • setTerminalName

      public void setTerminalName(String terminalName)
      Sets the terminal name.
      Parameters:
      terminalName - name of the terminal assigned at activation.
    • getIpAddress

      public String getIpAddress()
      Returns the current local IP address of the terminal on its local subnet. Updated every hour.
      Returns:
      standard IPv4 IP address.
    • setIpAddress

      public void setIpAddress(String ipAddress)
      Sets the local IP address.
      Parameters:
      ipAddress - standard IPv4 IP address.
    • getPublicKey

      public String getPublicKey()
      Gets the public key of the terminal. This can be used to verify the digital signature of a terminal response and detect man in the middle attacks.
      Returns:
      Base58 encoded compressed public key.
    • setPublicKey

      public void setPublicKey(String publicKey)
      Sets the compressed public key for the terminal.
      Parameters:
      publicKey - Base58 encoded compressed public key.
    • getRawKey

      public RawPublicKey getRawKey()
      Gets the raw public key of the terminal. This is for situations where working with the compressed and encoded public key is too difficult.
      Returns:
      Elliptic Curve Public Key.
    • setRawKey

      public void setRawKey(RawPublicKey rawKey)
      Sets the raw public key of the terminal.
      Parameters:
      rawKey - Elliptic Curve Public Key.
    • isExists

      public boolean isExists()
      Gets the exists flag.
      Returns:
      true if the terminal exists.
    • setExists

      public void setExists(boolean exists)
      Sets the exists flag.
      Parameters:
      exists - true if the terminal exists.
    • isCloudRelayEnabled

      public boolean isCloudRelayEnabled()
      Returns the cloud relay flag. If true, then all requests for the terminal are relayed through the payment gateway instead of sent over the local network. This would typically be done in situations where the terminal and the client application are on difference subnets.
      Returns:
      true if cloud relay is enabled.
    • setCloudRelayEnabled

      public void setCloudRelayEnabled(boolean cloudRelayEnabled)
      Sets the cloud relay flag.
      Parameters:
      cloudRelayEnabled - true if cloud relay is enabled.
    • getTransientCredentials

      public APICredentials getTransientCredentials()
      Gets transient credentials to be used with the terminal route.
      Returns:
      APICredentials
    • setTransientCredentials

      public void setTransientCredentials(APICredentials transientCredentials)
      Sets transient credentials to be used with the terminal route. Transient credentials protect your root credentials in situations where https communication with the local terminal is not feasible.
      Parameters:
      transientCredentials - APICredentials
    • getTimestamp

      public Date getTimestamp()
      Gets the timestamp associated with the route request. Used for cache expiry.
      Returns:
      date and time the route request was processed.
    • setTimestamp

      public void setTimestamp(Date timestamp)
      Sets the timestamp associated with the route request. Used for cache expiry.
      Parameters:
      timestamp - date and time the route request was processed.