Gamebase SDK for Android 2.49.0
NHN Cloud Gamebase Platform
Loading...
Searching...
No Matches
ForcingMappingTicket Class Reference

If the addMapping API fails with error AUTH_ADD_MAPPING_ALREADY_MAPPED_TO_OTHER_MEMBER (3302),
you can force addMapping with this VO. More...

Inheritance diagram for ForcingMappingTicket:
Inheritance graph
Collaboration diagram for ForcingMappingTicket:
Collaboration graph

Public Member Functions

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

Static Public Member Functions

static ForcingMappingTicket from (@NonNull final 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 mappedUserId
 UserId that can be cleared by force mapping. More...
 
String mappedUserValid
 The status of mapped user. More...
 
String idPCode
 
String forcingMappingKey
 
long expirationDate
 
String accessToken
 

Detailed Description

If the addMapping API fails with error AUTH_ADD_MAPPING_ALREADY_MAPPED_TO_OTHER_MEMBER (3302),
you can force addMapping with this VO.

Since
Added 2.2.0

Example Usage:

void addMappingForcibly() {
Gamebase.addMapping(activity, mappingProvider, new GamebaseDataCallback<AuthToken>() {
@Override
public void onCallback(AuthToken authToken, GamebaseException exception) {
if (!Gamebase.isSuccess(exception)) {
// ForcingMappingTicket from GamebaseException
final ForcingMappingTicket ticket = ForcingMappingTicket.from(exception);
if (ticket != null)
// Show the mappedUserId to be erased to the user, and ask whether or not to force addMapping.
ticket.mappedUserId; // This userId will be erased.
@Override
public void onCallback(AuthToken forceAddMappingAuthToken, GamebaseException forceAddMappingException) {
if (Gamebase.isSuccess(forceAddMappingException)) {
// Force AddMapping Success.
return;
}
// Force AddMapping Failed.
...
}
}
}
} else {
// AddMapping Failed.
...
}
return;
}
// AddMapping Succeeded.
}
});
}
This class is a wrapper class that is provided to use various features of Gamebase platform.
Definition: Gamebase.java:61
static void addMappingForcibly(@NonNull final Activity activity, @NonNull final ForcingMappingTicket forcingMappingTicket, @Nullable final GamebaseDataCallback< AuthToken > callback)
Forcibly trying to map the currently authenticated user identifier of Gamebase with the credential of...
Definition: Gamebase.java:579
static void addMapping(@NonNull final Activity activity, @NonNull final String providerName, @Nullable final GamebaseDataCallback< AuthToken > callback)
Mapping the currently authenticated user identifier of Gamebase with another external authentication.
Definition: Gamebase.java:379
static boolean isSuccess(@Nullable final GamebaseException exception)
Returns true if the GamebaseException object is null or the error code is zero.
Definition: Gamebase.java:160
If the addMapping API fails with error AUTH_ADD_MAPPING_ALREADY_MAPPED_TO_OTHER_MEMBER (3302),...
Definition: ForcingMappingTicket.java:67
String mappedUserId
UserId that can be cleared by force mapping.
Definition: ForcingMappingTicket.java:73
String forcingMappingKey
Definition: ForcingMappingTicket.java:90
static ForcingMappingTicket from(@NonNull final GamebaseException exception)
Factory method to create VO instance.
Definition: ForcingMappingTicket.java:105
Class responsible for creating error codes and error objects.
Definition: GamebaseError.java:23
static final int AUTH_ADD_MAPPING_ALREADY_MAPPED_TO_OTHER_MEMBER
Definition: GamebaseError.java:110
An object that contains the success or failure of the execution of the Gamebase function.
Definition: GamebaseException.java:26
int getCode()
Get result code.
Definition: GamebaseException.java:157
Generic callback interface that returns data.
Definition: GamebaseDataCallback.java:12
See also
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.Gamebase#addMappingForcibly(Activity, String, String, GamebaseDataCallback)
com.toast.android.gamebase.Gamebase#addMappingForcibly(Activity, String, String, Map, GamebaseDataCallback)
com.toast.android.gamebase.Gamebase#addMappingForcibly(Activity, Map, String, GamebaseDataCallback)
com.toast.android.gamebase.base.GamebaseException

Member Function Documentation

◆ from()

static ForcingMappingTicket from ( @NonNull final 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

◆ accessToken

String accessToken

◆ expirationDate

long expirationDate

◆ forcingMappingKey

String forcingMappingKey

◆ idPCode

String idPCode

◆ mappedUserId

String mappedUserId

UserId that can be cleared by force mapping.

◆ mappedUserValid

String mappedUserValid

The status of mapped user.

Use this value if you want to restrict addMapping according to user status.

See https://docs.toast.com/ko/Game/Gamebase/ko/api-guide/#member-valid-code In ForcingMappingTicket, mappedUserValid cannot be 'D' or 'M'.

Y : Normal user. ('Y'es) D : Withdrawn user. ('D'eleted) B : 'B'anned user. T : Withdrawal-suspended user. ('T'emporaryWithdrawn) P : Ban-suspended user. ('P'ostpone) M : 'M'issing account