Package com.adyen.model.tapi
Class CardReaderAPDUResponse
- java.lang.Object
-
- com.adyen.model.tapi.CardReaderAPDUResponse
-
public class CardReaderAPDUResponse extends Object
Content of the Card Reader APDU Response message. It contains the result of the requested service, APDU response sent by the chip of the card in response to the APDU request.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AP_D_U_DATAstatic StringJSON_PROPERTY_CARD_STATUS_WORDSstatic StringJSON_PROPERTY_RESPONSE
-
Constructor Summary
Constructors Constructor Description CardReaderAPDUResponse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CardReaderAPDUResponseapDUData(byte[] apDUData)Data field of the APDU command (Lc + Data).CardReaderAPDUResponsecardStatusWords(byte[] cardStatusWords)Status of a smartcard response to a command (SW1-SW2).booleanequals(Object o)Return true if this CardReaderAPDUResponse object is equal to o.static CardReaderAPDUResponsefromJson(String jsonString)Create an instance of CardReaderAPDUResponse given an JSON stringbyte[]getApDUData()Data field of the APDU command (Lc + Data).byte[]getCardStatusWords()Status of a smartcard response to a command (SW1-SW2).Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.ResponsegetResponse()Get responseinthashCode()CardReaderAPDUResponseincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.CardReaderAPDUResponseresponse(Response response)responsevoidsetApDUData(byte[] apDUData)Data field of the APDU command (Lc + Data).voidsetCardStatusWords(byte[] cardStatusWords)Status of a smartcard response to a command (SW1-SW2).voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetResponse(Response response)responseStringtoJson()Convert an instance of CardReaderAPDUResponse to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_RESPONSE
public static final String JSON_PROPERTY_RESPONSE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AP_D_U_DATA
public static final String JSON_PROPERTY_AP_D_U_DATA
- See Also:
- Constant Field Values
-
JSON_PROPERTY_CARD_STATUS_WORDS
public static final String JSON_PROPERTY_CARD_STATUS_WORDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
response
public CardReaderAPDUResponse response(Response response)
response- Parameters:
response-- Returns:
- the current
CardReaderAPDUResponseinstance, allowing for method chaining
-
getResponse
public Response getResponse()
Get response- Returns:
- response
-
setResponse
public void setResponse(Response response)
response- Parameters:
response-
-
apDUData
public CardReaderAPDUResponse apDUData(byte[] apDUData)
Data field of the APDU command (Lc + Data).- Parameters:
apDUData- Data field of the APDU command (Lc + Data).- Returns:
- the current
CardReaderAPDUResponseinstance, allowing for method chaining
-
getApDUData
public byte[] getApDUData()
Data field of the APDU command (Lc + Data).- Returns:
- apDUData Data field of the APDU command (Lc + Data).
-
setApDUData
public void setApDUData(byte[] apDUData)
Data field of the APDU command (Lc + Data).- Parameters:
apDUData- Data field of the APDU command (Lc + Data).
-
cardStatusWords
public CardReaderAPDUResponse cardStatusWords(byte[] cardStatusWords)
Status of a smartcard response to a command (SW1-SW2).- Parameters:
cardStatusWords- Status of a smartcard response to a command (SW1-SW2).- Returns:
- the current
CardReaderAPDUResponseinstance, allowing for method chaining
-
getCardStatusWords
public byte[] getCardStatusWords()
Status of a smartcard response to a command (SW1-SW2).- Returns:
- cardStatusWords Status of a smartcard response to a command (SW1-SW2).
-
setCardStatusWords
public void setCardStatusWords(byte[] cardStatusWords)
Status of a smartcard response to a command (SW1-SW2).- Parameters:
cardStatusWords- Status of a smartcard response to a command (SW1-SW2).
-
includeNullValues
public CardReaderAPDUResponse includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this CardReaderAPDUResponse object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
fromJson
public static CardReaderAPDUResponse fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of CardReaderAPDUResponse given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CardReaderAPDUResponse
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to CardReaderAPDUResponse
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of CardReaderAPDUResponse to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-