class CloseSessionCmdBuild extends AbstractPoCommandBuilder<CloseSessionRespPars> {

  public CloseSessionCmdBuild(
      PoClass poClass, boolean ratificationAsked, byte[] terminalSessionSignature) {
    super(command, null);
    // The optional parameter terminalSessionSignature could contain 4 or 8
    // bytes.
    if (terminalSessionSignature != null
        && terminalSessionSignature.length != 4
        && terminalSessionSignature.length != 8) {
      throw new IllegalArgumentException(
          "Invalid terminal sessionSignature: " + ByteArrayUtil.toHex(terminalSessionSignature));
    }

    byte p1 = ratificationAsked ? (byte) 0x80 : (byte) 0x00;
    /*
     * case 4: this command contains incoming and outgoing data. We define le = 0, the actual
     * length will be processed by the lower layers.
     */
    byte le = 0;

    request =
        setApduRequest(poClass.getValue(), command, p1, (byte) 0x00, terminalSessionSignature, le);
  }

  public  CloseSessionCmdBuild(
      PoClass poClass, boolean ratificationAsked, byte[] terminalSessionSignature);
  public  CloseSessionCmdBuild(PoClass poClass);

}