protected String toJSONFragment() {
        StringBuffer json = new StringBuffer();
        boolean first = true;
        if (isSetTotalBalance()) {
            if (!first) json.append(", ");
            json.append("\"TotalBalance\" : {");
            Amount  totalBalance = getTotalBalance();


            json.append(totalBalance.toJSONFragment());
            json.append("}");
            first = false;
        }
        if (isSetPendingInBalance()) {
            if (!first) json.append(", ");
            json.append("\"PendingInBalance\" : {");
            Amount  pendingInBalance = getPendingInBalance();


            json.append(pendingInBalance.toJSONFragment());
            json.append("}");
            first = false;
        }
        if (isSetPendingOutBalance()) {
            if (!first) json.append(", ");
            json.append("\"PendingOutBalance\" : {");
            Amount  pendingOutBalance = getPendingOutBalance();


            json.append(pendingOutBalance.toJSONFragment());
            json.append("}");
            first = false;
        }
        if (isSetAvailableBalances()) {
            if (!first) json.append(", ");
            json.append("\"AvailableBalances\" : {");
            AvailableBalances  availableBalances = getAvailableBalances();


            json.append(availableBalances.toJSONFragment());
            json.append("}");
            first = false;
        }
        return json.toString();
    }