Gamebase SDK for Android  2.31.0
NHN Cloud Gamebase Platform
TransferAccountFailInfo Class Reference

If the transferAccountWithIdPLogin API fails with error AUTH_TRANSFERACCOUNT_BLOCK (3042),
this VO will tell you the number of failed attempts and the block duration. More...

Inheritance diagram for TransferAccountFailInfo:
Inheritance graph
Collaboration diagram for TransferAccountFailInfo:
Collaboration graph

Public Member Functions

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

Static Public Member Functions

static TransferAccountFailInfo 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 appId
 
String id
 
String status
 
int failCount
 
long blockEndDate
 
long regDate
 

Detailed Description

If the transferAccountWithIdPLogin API fails with error AUTH_TRANSFERACCOUNT_BLOCK (3042),
this VO will tell you the number of failed attempts and the block duration.

Since
Added 2.2.0

Example Usage:

void transferAccountSample(String id, String password) {
Gamebase.transferAccountWithIdPLogin(accountId, accountPassword, new GamebaseDataCallback<AuthToken>() {
@Override
public void onCallback(AuthToken authToken, GamebaseException exception) {
if (!Gamebase.isSuccess(exception)) {
// Transfering Account failed.
TransferAccountFailInfo failInfo = TransferAccountFailInfo.from(exception);
if (failInfo != null) {
// Transfering Account failed by entering the wrong id / pw multiple times.
// You can tell when the account transfer is blocked by the TransferAccountFailInfo.
String failedId = failInfo.id;
int failCount = failInfo.failCount;
Date blockedDate = new Date(failInfo.blockEndDate);
return;
}
// Transfering Account failed by another reason.
return;
}
// Transfering Account success.
// Implement post login process
}
});
}
See also
com.toast.android.gamebase.Gamebase#transferAccountWithIdPLogin(String, String, GamebaseDataCallback)
com.toast.android.gamebase.base.GamebaseException

Member Function Documentation

◆ from()

static TransferAccountFailInfo 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

◆ appId

String appId

◆ blockEndDate

long blockEndDate

◆ failCount

int failCount

◆ id

String id

◆ regDate

long regDate

◆ status

String status
com.toast.android.gamebase.auth.transfer.data.TransferAccountFailInfo.failCount
int failCount
Definition: TransferAccountFailInfo.java:51