# BanInfo

open class BanInfo : ValueObject

If the login or addMapping API fails with error BANNED_MEMBER (7), this VO class tells you the ban information.

Example Usage:

    void onLoginWithBannedMember() {
        Gamebase.login(activity, provider, new GamebaseDataCallback<AuthToken>() {
            @Override
            public void onCallback(AuthToken data, GamebaseException exception) {
                if (!Gamebase.isSuccess(exception)) {
                    BanInfo banInfo = BanInfo.from(exception);
                    if (banInfo != null) {
                        // Login failed because the user is banned.
                        // Show the user the reason for the block and the block period.
                        return;
                    }
                    // Login failed by another reason.
                    return;
                }
                // Login Success.
            }
        });
    }

Content copied to clipboard

#### Since

Added 1.11.0.

#### See also

Gamebase
GamebaseException

## Properties

banType
Link copied to clipboard
open var banType: String
There are two types of the banning.
beginDate
Link copied to clipboard
open var beginDate: Long
Time when banning was started.
csInfo
Link copied to clipboard
open var csInfo: String
The URL of the customer center web page.
csUrl
Link copied to clipboard
open var csUrl: String
The email address of the customer center.
endDate
Link copied to clipboard
open var endDate: Long
Time when banning will be released.
message
Link copied to clipboard
open var message: String
Banning message entered from the Gamebase console.
userId
Link copied to clipboard
open var userId: String
User ID who was banned.

## Functions

from
Link copied to clipboard
open fun from(exception: GamebaseException): BanInfo
Factory method to create VO instance.
fromJson
Link copied to clipboard
open fun <T> fromJson(@NonNull json: String, classOfT: Class<T>): T
open fun <T> fromJson(@NonNull json: String, type: Type): T
open fun <T> fromJson(@NonNull jsonObject: JSONObject, classOfT: Class<T>): T
toJsonString
Link copied to clipboard
open fun toJsonString(): String
toPrettyJsonString
Link copied to clipboard
open fun toPrettyJsonString(): String
toString
Link copied to clipboard
open fun toString(): String