class SvUndebitCmdBuild extends AbstractPoCommandBuilder<SvUndebitRespPars> {

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

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

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

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

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

}