Gamebase SDK for Android  2.41.2
NHN Cloud Gamebase Platform
BanInfo Class Reference

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

Inheritance diagram for BanInfo:
Inheritance graph
Collaboration diagram for BanInfo:
Collaboration graph

Public Member Functions

String toJsonString ()
 
String toPrettyJsonString ()
 
String toString ()
 

Static Public Member Functions

static BanInfo from (GamebaseException exception)
 Factory method to create VO instance. More...
 
static< T > T fromJson (@NonNull String json, Class< T > classOfT)
 
static< T > T fromJson (@NonNull JSONObject jsonObject, Class< T > classOfT)
 
static< T > T fromJson (@NonNull String json, Type type)
 

Public Attributes

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

Detailed Description

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

Since
Added 1.11.0.

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.
}
});
}
See also
com.toast.android.gamebase.Gamebase#loginForLastLoggedInProvider(Activity, GamebaseDataCallback)
com.toast.android.gamebase.Gamebase#login(Activity, String, GamebaseDataCallback)
com.toast.android.gamebase.Gamebase#login(Activity, String, Map, GamebaseDataCallback)
com.toast.android.gamebase.Gamebase#login(Activity, Map, GamebaseDataCallback)
com.toast.android.gamebase.Gamebase#addMapping(Activity, String, GamebaseDataCallback)
com.toast.android.gamebase.Gamebase#addMapping(Activity, String, Map, GamebaseDataCallback)
com.toast.android.gamebase.Gamebase#addMapping(Activity, Map, GamebaseDataCallback)
com.toast.android.gamebase.base.GamebaseException

Member Function Documentation

◆ from()

static BanInfo from ( GamebaseException  exception)
static

Factory method to create VO instance.

Parameters
exceptionExtracts the VO class instance from this exception.
Returns
VO instance
Here is the call graph for this function:

◆ fromJson() [1/3]

static <T> T fromJson ( @NonNull JSONObject  jsonObject,
Class< T >  classOfT 
)
staticinherited
Here is the call graph for this function:

◆ fromJson() [2/3]

static <T> T fromJson ( @NonNull String  json,
Class< T >  classOfT 
)
staticinherited
Here is the caller graph for this function:

◆ fromJson() [3/3]

static <T> T fromJson ( @NonNull String  json,
Type  type 
)
staticinherited

◆ toJsonString()

String toJsonString ( )
inherited
Here is the caller graph for this function:

◆ toPrettyJsonString()

String toPrettyJsonString ( )
inherited

◆ toString()

String toString ( )
inherited

Reimplemented in TransferAccountRenewConfiguration.

Here is the call graph for this function:

Member Data Documentation

◆ banType

String banType

There are two types of the banning.


"TEMPORARY", "PERMANENT".

◆ beginDate

long beginDate

Time when banning was started.

◆ csInfo

String csInfo

The URL of the customer center web page.

◆ csUrl

String csUrl

The email address of the customer center.

◆ endDate

long endDate

Time when banning will be released.

◆ message

String message

Banning message entered from the Gamebase console.

◆ userId

String userId

User ID who was banned.