Class 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.
    • Constructor Detail

      • CardReaderAPDURequest

        public CardReaderAPDURequest()
    • 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 CardReaderAPDURequest instance, 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 CardReaderAPDURequest instance, 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 CardReaderAPDURequest instance, 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 CardReaderAPDURequest instance, 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 CardReaderAPDURequest instance, 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 CardReaderAPDURequest instance, 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.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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