@Override
    public String toString()
    {
        StringBuilder sb = new StringBuilder();

        sb.append(STX);
        sb.append(FC);

        if (pan == null)
        {
            throw new NullPointerException("PAN cannot be null!");
        }
        sb.append(pan);
        sb.append(FS);

        if (name == null)
        {
            throw new NullPointerException("Name cannot be null!");
        }
        sb.append(name);
        sb.append(FS);

        sb.append(expirationDate != null && !expirationDate.trim().isEmpty() ? expirationDate : FS);
        sb.append(serviceCode != null && !serviceCode.trim().isEmpty() ? serviceCode : FS);

        if (discretionaryData != null)
        {
            sb.append(discretionaryData);
        }

        sb.append(ETX);

        if (lrc != null)
        {
            sb.append(lrc);
        }

        if (sb.length() > MAX_LENGTH)
        {
            throw new StringIndexOutOfBoundsException(sb.length());
        }

        return sb.toString();
    }