Package com.blockchyp.client
Class TerminalRouteResponse
java.lang.Object
com.blockchyp.client.dto.Acknowledgement
com.blockchyp.client.TerminalRouteResponse
- All Implemented Interfaces:
IAbstractAcknowledgement
Models metadata about a terminal route, including it's location on the local network
and transient credentials.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetError()Gets a narrative description of the error, if any.Returns the current local IP address of the terminal on its local subnet.Gets the public key of the terminal.Gets the raw public key of the terminal.Echoes back the terminal name for the route lookup.Gets the timestamp associated with the route request.Gets transient credentials to be used with the terminal route.booleanReturns the cloud relay flag.booleanisExists()Gets the exists flag.booleanGets the success flag.voidsetCloudRelayEnabled(boolean cloudRelayEnabled) Sets the cloud relay flag.voidSets a narrative description of the error, if any.voidsetExists(boolean exists) Sets the exists flag.voidsetIpAddress(String ipAddress) Sets the local IP address.voidsetPublicKey(String publicKey) Sets the compressed public key for the terminal.voidsetRawKey(RawPublicKey rawKey) Sets the raw public key of the terminal.voidsetSuccess(boolean success) Sets the success flag.voidsetTerminalName(String terminalName) Sets the terminal name.voidsetTimestamp(Date timestamp) Sets the timestamp associated with the route request.voidsetTransientCredentials(APICredentials transientCredentials) Sets transient credentials to be used with the terminal route.Methods inherited from class com.blockchyp.client.dto.Acknowledgement
getResponseDescription, setResponseDescription
-
Constructor Details
-
TerminalRouteResponse
public TerminalRouteResponse()
-
-
Method Details
-
isSuccess
public boolean isSuccess()Gets the success flag.- Specified by:
isSuccessin interfaceIAbstractAcknowledgement- Overrides:
isSuccessin classAcknowledgement- Returns:
- true if the API call succeeded.
-
setSuccess
public void setSuccess(boolean success) Sets the success flag.- Overrides:
setSuccessin classAcknowledgement- Parameters:
success- true if the API call succeeded.
-
getError
Gets a narrative description of the error, if any.- Specified by:
getErrorin interfaceIAbstractAcknowledgement- Overrides:
getErrorin classAcknowledgement- Returns:
- narrative description of any error.
-
setError
Sets a narrative description of the error, if any.- Overrides:
setErrorin classAcknowledgement- Parameters:
error- narrative description of any error.
-
getTerminalName
Echoes back the terminal name for the route lookup.- Returns:
- name of the terminal assigned at activation.
-
setTerminalName
Sets the terminal name.- Parameters:
terminalName- name of the terminal assigned at activation.
-
getIpAddress
Returns the current local IP address of the terminal on its local subnet. Updated every hour.- Returns:
- standard IPv4 IP address.
-
setIpAddress
Sets the local IP address.- Parameters:
ipAddress- standard IPv4 IP address.
-
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
Sets the compressed public key for the terminal.- Parameters:
publicKey- Base58 encoded compressed public key.
-
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
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
Gets transient credentials to be used with the terminal route.- Returns:
APICredentials
-
setTransientCredentials
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
Gets the timestamp associated with the route request. Used for cache expiry.- Returns:
- date and time the route request was processed.
-
setTimestamp
Sets the timestamp associated with the route request. Used for cache expiry.- Parameters:
timestamp- date and time the route request was processed.
-