Package com.adyen.model.tapi
Class CardReaderAPDURequest
- java.lang.Object
-
- com.adyen.model.tapi.CardReaderAPDURequest
-
public class CardReaderAPDURequest extends Object
It contains the APDU request to send to the chip of the card, and a possible invitation message to display on the CashierInterface or the CustomerInterface. Content of the Card Reader APDU Request message.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AP_D_U_CLASSstatic StringJSON_PROPERTY_AP_D_U_DATAstatic StringJSON_PROPERTY_AP_D_U_EXPECTED_LENGTHstatic StringJSON_PROPERTY_AP_D_U_INSTRUCTIONstatic StringJSON_PROPERTY_AP_D_U_PAR1static StringJSON_PROPERTY_AP_D_U_PAR2
-
Constructor Summary
Constructors Constructor Description CardReaderAPDURequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CardReaderAPDURequestapDUClass(byte[] apDUClass)Class field of the APDU command (CLA).CardReaderAPDURequestapDUData(byte[] apDUData)Data field of the APDU command (Lc + Data).CardReaderAPDURequestapDUExpectedLength(byte[] apDUExpectedLength)Expected length of the data field of the APDU response to the command (Le).CardReaderAPDURequestapDUInstruction(byte[] apDUInstruction)Instruction field of the APDU command (INS).CardReaderAPDURequestapDUPar1(byte[] apDUPar1)Parameter 1 field of the APDU command (P1).CardReaderAPDURequestapDUPar2(byte[] apDUPar2)Parameter 2 field of the APDU command(P2).booleanequals(Object o)Return true if this CardReaderAPDURequest object is equal to o.static CardReaderAPDURequestfromJson(String jsonString)Create an instance of CardReaderAPDURequest given an JSON stringbyte[]getApDUClass()Class field of the APDU command (CLA).byte[]getApDUData()Data field of the APDU command (Lc + Data).byte[]getApDUExpectedLength()Expected length of the data field of the APDU response to the command (Le).byte[]getApDUInstruction()Instruction field of the APDU command (INS).byte[]getApDUPar1()Parameter 1 field of the APDU command (P1).byte[]getApDUPar2()Parameter 2 field of the APDU command(P2).Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.inthashCode()CardReaderAPDURequestincludeNullValues(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.voidsetApDUClass(byte[] apDUClass)Class field of the APDU command (CLA).voidsetApDUData(byte[] apDUData)Data field of the APDU command (Lc + Data).voidsetApDUExpectedLength(byte[] apDUExpectedLength)Expected length of the data field of the APDU response to the command (Le).voidsetApDUInstruction(byte[] apDUInstruction)Instruction field of the APDU command (INS).voidsetApDUPar1(byte[] apDUPar1)Parameter 1 field of the APDU command (P1).voidsetApDUPar2(byte[] apDUPar2)Parameter 2 field of the APDU command(P2).voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.StringtoJson()Convert an instance of CardReaderAPDURequest to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_AP_D_U_CLASS
public static final String JSON_PROPERTY_AP_D_U_CLASS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AP_D_U_INSTRUCTION
public static final String JSON_PROPERTY_AP_D_U_INSTRUCTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AP_D_U_PAR1
public static final String JSON_PROPERTY_AP_D_U_PAR1
- See Also:
- Constant Field Values
-
JSON_PROPERTY_AP_D_U_PAR2
public static final String JSON_PROPERTY_AP_D_U_PAR2
- 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_AP_D_U_EXPECTED_LENGTH
public static final String JSON_PROPERTY_AP_D_U_EXPECTED_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
apDUClass
public CardReaderAPDURequest apDUClass(byte[] apDUClass)
Class field of the APDU command (CLA). APDU request for Card Reader device request. For specific card like synchronous card, a private value should be used in accordance to ISO 7816- 4 (private range D0-FE).- Parameters:
apDUClass- Class field of the APDU command (CLA). APDU request for Card Reader device request. For specific card like synchronous card, a private value should be used in accordance to ISO 7816- 4 (private range D0-FE).- Returns:
- the current
CardReaderAPDURequestinstance, allowing for method chaining
-
getApDUClass
public byte[] getApDUClass()
Class field of the APDU command (CLA). APDU request for Card Reader device request. For specific card like synchronous card, a private value should be used in accordance to ISO 7816- 4 (private range D0-FE).- Returns:
- apDUClass Class field of the APDU command (CLA). APDU request for Card Reader device request. For specific card like synchronous card, a private value should be used in accordance to ISO 7816- 4 (private range D0-FE).
-
setApDUClass
public void setApDUClass(byte[] apDUClass)
Class field of the APDU command (CLA). APDU request for Card Reader device request. For specific card like synchronous card, a private value should be used in accordance to ISO 7816- 4 (private range D0-FE).- Parameters:
apDUClass- Class field of the APDU command (CLA). APDU request for Card Reader device request. For specific card like synchronous card, a private value should be used in accordance to ISO 7816- 4 (private range D0-FE).
-
apDUInstruction
public CardReaderAPDURequest apDUInstruction(byte[] apDUInstruction)
Instruction field of the APDU command (INS).- Parameters:
apDUInstruction- Instruction field of the APDU command (INS).- Returns:
- the current
CardReaderAPDURequestinstance, allowing for method chaining
-
getApDUInstruction
public byte[] getApDUInstruction()
Instruction field of the APDU command (INS).- Returns:
- apDUInstruction Instruction field of the APDU command (INS).
-
setApDUInstruction
public void setApDUInstruction(byte[] apDUInstruction)
Instruction field of the APDU command (INS).- Parameters:
apDUInstruction- Instruction field of the APDU command (INS).
-
apDUPar1
public CardReaderAPDURequest apDUPar1(byte[] apDUPar1)
Parameter 1 field of the APDU command (P1).- Parameters:
apDUPar1- Parameter 1 field of the APDU command (P1).- Returns:
- the current
CardReaderAPDURequestinstance, allowing for method chaining
-
getApDUPar1
public byte[] getApDUPar1()
Parameter 1 field of the APDU command (P1).- Returns:
- apDUPar1 Parameter 1 field of the APDU command (P1).
-
setApDUPar1
public void setApDUPar1(byte[] apDUPar1)
Parameter 1 field of the APDU command (P1).- Parameters:
apDUPar1- Parameter 1 field of the APDU command (P1).
-
apDUPar2
public CardReaderAPDURequest apDUPar2(byte[] apDUPar2)
Parameter 2 field of the APDU command(P2).- Parameters:
apDUPar2- Parameter 2 field of the APDU command(P2).- Returns:
- the current
CardReaderAPDURequestinstance, allowing for method chaining
-
getApDUPar2
public byte[] getApDUPar2()
Parameter 2 field of the APDU command(P2).- Returns:
- apDUPar2 Parameter 2 field of the APDU command(P2).
-
setApDUPar2
public void setApDUPar2(byte[] apDUPar2)
Parameter 2 field of the APDU command(P2).- Parameters:
apDUPar2- Parameter 2 field of the APDU command(P2).
-
apDUData
public CardReaderAPDURequest apDUData(byte[] apDUData)
Data field of the APDU command (Lc + Data).- Parameters:
apDUData- Data field of the APDU command (Lc + Data).- Returns:
- the current
CardReaderAPDURequestinstance, 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).
-
apDUExpectedLength
public CardReaderAPDURequest apDUExpectedLength(byte[] apDUExpectedLength)
Expected length of the data field of the APDU response to the command (Le).- Parameters:
apDUExpectedLength- Expected length of the data field of the APDU response to the command (Le).- Returns:
- the current
CardReaderAPDURequestinstance, allowing for method chaining
-
getApDUExpectedLength
public byte[] getApDUExpectedLength()
Expected length of the data field of the APDU response to the command (Le).- Returns:
- apDUExpectedLength Expected length of the data field of the APDU response to the command (Le).
-
setApDUExpectedLength
public void setApDUExpectedLength(byte[] apDUExpectedLength)
Expected length of the data field of the APDU response to the command (Le).- Parameters:
apDUExpectedLength- Expected length of the data field of the APDU response to the command (Le).
-
includeNullValues
public CardReaderAPDURequest 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 CardReaderAPDURequest 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 CardReaderAPDURequest fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of CardReaderAPDURequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CardReaderAPDURequest
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to CardReaderAPDURequest
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of CardReaderAPDURequest to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-