class SvDebitCmdBuild extends AbstractPoCommandBuilder<SvDebitRespPars> {

  public void finalizeBuilder(byte[] debitComplementaryData) {
    if ((poRevision == PoRevision.REV3_2 && debitComplementaryData.length != 20)
        || (poRevision != PoRevision.REV3_2 && debitComplementaryData.length != 15)) {
      throw new IllegalArgumentException("Bad SV prepare load data length.");
    }

    byte p1 = debitComplementaryData[4];
    byte p2 = debitComplementaryData[5];

    dataIn[0] = debitComplementaryData[6];
    System.arraycopy(debitComplementaryData, 0, dataIn, 8, 4);
    System.arraycopy(debitComplementaryData, 7, dataIn, 12, 3);
    System.arraycopy(debitComplementaryData, 10, dataIn, 15, debitComplementaryData.length - 10);

    this.request = setApduRequest(poClass.getValue(), command, p1, p2, dataIn, null);
  }

  public  SvDebitCmdBuild(
      PoClass poClass, PoRevision poRevision, int amount, byte kvc, byte[] date, byte[] time);

}