package net.dean.jraw.models;

import net.dean.jraw.models.meta.JsonProperty;
import net.dean.jraw.models.meta.Model;
import com.fasterxml.jackson.databind.JsonNode;

/**
 * Represents an account with additional information visible only to the logged-in user.
 */
@Model(kind = Model.Kind.ACCOUNT)
public final class LoggedInAccount extends Account {
    /** Instantiates a new LoggedInAccount */
    public LoggedInAccount(JsonNode data) {
        super(data);
    }

    /** Checks if the user has unread mail. */
    @JsonProperty
    public Boolean hasMail() {
        return data("has_mail", Boolean.class);
    }

    /** Checks if the user has moderator mail */
    @JsonProperty(nullable = true)
    public Boolean hasModMail() {
        return data("has_mod_mail", Boolean.class);
    }

    /** Checks if the user has a verified email */
    @JsonProperty
    public Boolean hasVerifiedEmail() {
        return data("has_verified_email", Boolean.class);
    }

    /** Gets the amount of non-moderator mail the user has. */
    @JsonProperty
    public Integer getInboxCount() {
        return data("inbox_count", Integer.class);
    }

    /** Gets the amount of gold creddits (one month worth of reddit gold) the user has. */
    @JsonProperty
    public Integer getCreddits() {
        return data("gold_creddits", Integer.class);
    }
}

@@ -24,16 +24,65 @@
 odels;%0A%0A
+import com.fasterxml.jackson.databind.JsonNode;%0A%0A
 import n
@@ -164,54 +164,38 @@
 el;%0A
+%0A
 import 
-com.fasterxml.jackson.databind.JsonNode
+java.text.NumberFormat
 ;%0A%0A/
@@ -1165,32 +1165,331 @@
 .class);%0A    %7D%0A%0A
+    /** Gets the localized amount of non-moderator mail the user has. */%0A    public String getLocalizedInboxCount() %7B%0A        try %7B%0A            return NumberFormat.getInstance().format(getInboxCount());%0A        %7D catch (final IllegalArgumentException ex) %7B%0A            return null;%0A        %7D%0A    %7D%0A%0A
     /** Gets the

Add ability to get localized inbox count