Loading...
Searching...
No Matches
FOnlineEntitlementsAccelByte Class Reference
Inheritance diagram for FOnlineEntitlementsAccelByte:

Public Member Functions

 DEFINE_ONLINE_DELEGATE_FOUR_PARAM (OnConsumeEntitlementComplete, bool, const FUniqueNetId &, const TSharedPtr< FOnlineEntitlement > &, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_FOUR_PARAM (OnGetCurrentUserEntitlementHistoryComplete, int32, bool, const TArray< FAccelByteModelsBaseUserEntitlementHistory > &, const FOnlineError &)
 DEFINE_ONLINE_PLAYER_DELEGATE_FOUR_PARAM (MAX_LOCAL_PLAYERS, OnQueryPlatformSubscriptionComplete, bool, const FUniqueNetId &, const TArray< FAccelByteModelsThirdPartySubscriptionTransactionInfo > &, const FOnlineError &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnSyncMetaQuestIAPComplete, const FUniqueNetId &, const TArray< TSharedRef< FPurchaseReceipt > > &, const FOnlineError &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnEntitlementUpdatedNotification, const FUniqueNetId &, const FAccelByteModelsEntitlementUpdatedNotification &)
 DEFINE_ONLINE_DELEGATE_FOUR_PARAM (OnGetUserEntitlementHistoryComplete, int32, bool, const TArray< FAccelByteModelsUserEntitlementHistory > &, const FOnlineError &)
virtual TSharedPtr< FOnlineEntitlement > GetEntitlement (const FUniqueNetId &UserId, const FUniqueEntitlementId &EntitlementId) override
virtual TSharedPtr< FOnlineEntitlement > GetItemEntitlement (const FUniqueNetId &UserId, const FString &ItemId) override
virtual void GetAllEntitlements (const FUniqueNetId &UserId, const FString &Namespace, TArray< TSharedRef< FOnlineEntitlement > > &OutUserEntitlements) override
virtual bool QueryEntitlements (const FUniqueNetId &UserId, const FString &Namespace, const FPagedQuery &Page=FPagedQuery{}) override
void ConsumeEntitlement (const FUniqueNetId &UserId, const FUniqueEntitlementId &EntitlementId, int32 UseCount, TArray< FString > Options={}, const FString &RequestId={})
void SyncPlatformPurchase (int32 LocalUserNum, FAccelByteModelsEntitlementSyncBase EntitlementSyncBase, const FOnRequestCompleted &CompletionDelegate=FOnRequestCompleted())
void SyncPlatformPurchase (int32 LocalUserNum, const TSharedRef< FPurchaseReceipt > &Receipt, const FOnRequestCompleted &CompletionDelegate=FOnRequestCompleted())
void SyncPlatformPurchase (const FUniqueNetId &InLocalUserId, const FOnRequestCompleted &CompletionDelegate)
 Synchronize MetaQuest Consumable Entitlement/IAP.
void SyncPlatformPurchase (int32 LocalUserNum, const FAccelByteModelsPlatformSyncMobileGoogle &Request, const FOnRequestCompleted &CompletionDelegate=FOnRequestCompleted())
void SyncDLC (const FUniqueNetId &InLocalUserId, const FOnRequestCompleted &CompletionDelegate)
void SyncMetaSubscription (const FUniqueNetId &InLocalUserId, const FAccelByteModelsSyncOculusSubscriptionRequest &SyncRequest, const FOnSyncMetaSubscriptionCompleteDelegate &CompletionDelegate)
void GetCurrentUserEntitlementHistory (const FUniqueNetId &UserId, const FUniqueEntitlementId &EntitlementId)
void GetCurrentUserEntitlementHistory (const FUniqueNetId &UserId, const EAccelByteEntitlementClass &EntitlementClass=EAccelByteEntitlementClass::NONE, FDateTime StartDate=0, FDateTime EndDate=0, const FPagedQuery &Page=FPagedQuery{})
void GetCurrentUserEntitlementHistory (const FUniqueNetId &UserId, bool bForceUpdate=true, const FUniqueEntitlementId &EntitlementId=TEXT(""), const EAccelByteEntitlementClass &EntitlementClass=EAccelByteEntitlementClass::NONE, FDateTime StartDate=0, FDateTime EndDate=0, const FPagedQuery &Page=FPagedQuery{})
void GetCurrentUserEntitlementHistory (int32 LocalUserNum, const FUniqueEntitlementId &EntitlementId)
void GetCurrentUserEntitlementHistory (int32 LocalUserNum, const EAccelByteEntitlementClass &EntitlementClass=EAccelByteEntitlementClass::NONE, FDateTime StartDate=0, FDateTime EndDate=0, const FPagedQuery &Page=FPagedQuery{})
void GetCurrentUserEntitlementHistory (int32 LocalUserNum, bool bForceUpdate=true, const FUniqueEntitlementId &EntitlementId=TEXT(""), const EAccelByteEntitlementClass &EntitlementClass=EAccelByteEntitlementClass::NONE, FDateTime StartDate=0, FDateTime EndDate=0, const FPagedQuery &Page=FPagedQuery{})
void GetUserEntitlementHistory (int32 LocalUserNum, const FUniqueEntitlementId &EntitlementId, bool bForceUpdate=true)
void GetUserEntitlementHistory (const FUniqueNetId &UserId, const FUniqueEntitlementId &EntitlementId, bool bForceUpdate=true)
virtual bool GetCachedCurrentUserEntitlementHistory (const FUniqueNetIdAccelByteUserRef &InUserId, const FUniqueEntitlementId &InEntitlementId, TArray< FAccelByteModelsBaseUserEntitlementHistory > &OutEntitlementHistory)
virtual bool DeleteCachedCurrentUserEntitlementHistory (const FUniqueNetIdAccelByteUserRef &InUserId, const FUniqueEntitlementId &InEntitlementId)
virtual bool GetCachedUserEntitlementHistory (const FUniqueNetIdAccelByteUserRef &InUserId, const FUniqueEntitlementId &InEntitlementId, TArray< FAccelByteModelsUserEntitlementHistory > &OutEntitlementHistory)
virtual bool DeleteCachedUserEntitlementHistory (const FUniqueNetIdAccelByteUserRef &InUserId, const FUniqueEntitlementId &InEntitlementId)
void QueryPlatformSubscription (const int32 &InLocalUserNum, const FOnlineQuerySubscriptionRequestAccelByte &QueryRequest)
bool SyncSteamAbnormalIAPTransaction (FUniqueNetId const &LocalUserId, FOnSyncSteamAbnormalIAPTransactionComplete const &CompletionDelegate)
 Attempt to sync abnormal Steam transactions. Only to be used when Steam sync mode is set to TRANSACTION in the admin portal.

Static Public Member Functions

static bool GetFromSubsystem (const IOnlineSubsystem *Subsystem, TSharedPtr< FOnlineEntitlementsAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool GetFromWorld (const UWorld *World, TSharedPtr< FOnlineEntitlementsAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)

Protected Member Functions

void OnEntitlementUpdatedNotificationReceived (const FAccelByteModelsEntitlementUpdatedNotification &Response, int32 InLocalUserNum)

Protected Attributes

FOnlineSubsystemAccelByteWPtr AccelByteSubsystem
TMap< int32, FDelegateHandle > OnEntitlementUpdatedNotificationReceivedDelegateHandleMap

Member Function Documentation

◆ ConsumeEntitlement()

void FOnlineEntitlementsAccelByte::ConsumeEntitlement ( const FUniqueNetId & UserId,
const FUniqueEntitlementId & EntitlementId,
int32 UseCount,
TArray< FString > Options = {},
const FString & RequestId = {} )

Consume a user entitlement. Trigger FOnConsumeEntitlementComplete on complete

Parameters
UserIdId of the entilement owner
EntitlementIdThe id of the entitlement.
UseCountNumber of consumed entitlement.
OptionsOptions of consumed entitlements.
RequestIdRequest id(Optional), A unique tracking ID provided by the developer, can just left it empty if they don't want to track When a request id is submitted, it will return original successful response

◆ DeleteCachedCurrentUserEntitlementHistory()

bool FOnlineEntitlementsAccelByte::DeleteCachedCurrentUserEntitlementHistory ( const FUniqueNetIdAccelByteUserRef & InUserId,
const FUniqueEntitlementId & InEntitlementId )
virtual

This function removes a cache of data that was generated by the 'GetCurrentUserEntitlementHistory' function

Parameters
InUserIdThe entitlement owner user id.
InEntitlementIdThe id of the entitlement.
Returns
boolean - Result after deleting current user entitlement history inside the cache

◆ DeleteCachedUserEntitlementHistory()

bool FOnlineEntitlementsAccelByte::DeleteCachedUserEntitlementHistory ( const FUniqueNetIdAccelByteUserRef & InUserId,
const FUniqueEntitlementId & InEntitlementId )
virtual

This function removes a cache of data that was generated by the 'GetUserEntitlementHistory' function

Parameters
InUserIdThe entitlement owner user id.
InEntitlementIdThe id of the entitlement.
Returns
boolean - Result after deleting user entitlement history inside the cache

◆ GetCachedCurrentUserEntitlementHistory()

bool FOnlineEntitlementsAccelByte::GetCachedCurrentUserEntitlementHistory ( const FUniqueNetIdAccelByteUserRef & InUserId,
const FUniqueEntitlementId & InEntitlementId,
TArray< FAccelByteModelsBaseUserEntitlementHistory > & OutEntitlementHistory )
virtual

This function returns a cache of data that was generated by the 'GetCurrentUserEntitlementHistory' function

Parameters
InUserIdThe entitlement owner user id.
InEntitlementIdThe id of the entitlement.
OutEntitlementHistoryList of User Inventory Items found. It also returns a value that associated with the entitlement.
Returns
boolean - Result after getting current user entitlement history inside the cache

◆ GetCachedUserEntitlementHistory()

bool FOnlineEntitlementsAccelByte::GetCachedUserEntitlementHistory ( const FUniqueNetIdAccelByteUserRef & InUserId,
const FUniqueEntitlementId & InEntitlementId,
TArray< FAccelByteModelsUserEntitlementHistory > & OutEntitlementHistory )
virtual

This function returns a cache of data that was generated by the 'GetUserEntitlementHistory' function

Parameters
InUserIdThe entitlement owner user id.
InEntitlementIdThe id of the entitlement.
OutEntitlementHistoryList of user entilement history found. It also returns a value that associated with the entitlement.
Returns
boolean - Result after looking user entitlement history inside the cache

◆ GetCurrentUserEntitlementHistory() [1/6]

void FOnlineEntitlementsAccelByte::GetCurrentUserEntitlementHistory ( const FUniqueNetId & UserId,
bool bForceUpdate = true,
const FUniqueEntitlementId & EntitlementId = TEXT(""),
const EAccelByteEntitlementClass & EntitlementClass = EAccelByteEntitlementClass::NONE,
FDateTime StartDate = 0,
FDateTime EndDate = 0,
const FPagedQuery & Page = FPagedQuery{} )

Get user entitlement history. Trigger FOnGetUserEntitlementHistoryComplete on complete Note: This endpoint supports only for player/user.

Parameters
UserIdUser id of the entitlement owner.
bForceUpdate(Optional) Set it to 'True' to get the history from backend.
EntitlementId(Optional) If bForceUpdate = false, set entitlement id to get history from cache.
EntitlementClass(Optional) The entitlement class or type to get.
StartDate(Optional) Defines the preferred starting date or time to query user entitlement history.
EndDate(Optional) Defines the preferred ending date or time to query user entitlement history.
Page(Optional) Number of content per page to retrieve and page to retrieve. Default value start (offset) : 0, count (limit) : 100.

◆ GetCurrentUserEntitlementHistory() [2/6]

void FOnlineEntitlementsAccelByte::GetCurrentUserEntitlementHistory ( const FUniqueNetId & UserId,
const EAccelByteEntitlementClass & EntitlementClass = EAccelByteEntitlementClass::NONE,
FDateTime StartDate = 0,
FDateTime EndDate = 0,
const FPagedQuery & Page = FPagedQuery{} )

Get user entitlement history. Trigger FOnGetUserEntitlementHistoryComplete on complete Note: This endpoint supports only for player/user.

Parameters
UserIdUser id of the entitlement owner.
EntitlementClass(Optional) The entitlement class or type to get.
StartDate(Optional) Defines the preferred starting date or time to query user entitlement history.
EndDate(Optional) Defines the preferred ending date or time to query user entitlement history.
Page(Optional) Number of content per page to retrieve and page to retrieve. Default value start (offset) : 0, count (limit) : 100.

◆ GetCurrentUserEntitlementHistory() [3/6]

void FOnlineEntitlementsAccelByte::GetCurrentUserEntitlementHistory ( const FUniqueNetId & UserId,
const FUniqueEntitlementId & EntitlementId )

Get user entitlement history inside the cache. Trigger FOnGetUserEntitlementHistoryComplete on complete Note: This endpoint supports only for player/user.

Parameters
UserIdUser id of the entitlement owner.
EntitlementIdThe id of the entitlement.

◆ GetCurrentUserEntitlementHistory() [4/6]

void FOnlineEntitlementsAccelByte::GetCurrentUserEntitlementHistory ( int32 LocalUserNum,
bool bForceUpdate = true,
const FUniqueEntitlementId & EntitlementId = TEXT(""),
const EAccelByteEntitlementClass & EntitlementClass = EAccelByteEntitlementClass::NONE,
FDateTime StartDate = 0,
FDateTime EndDate = 0,
const FPagedQuery & Page = FPagedQuery{} )

Get user entitlement history. Trigger FOnGetUserEntitlementHistoryComplete on complete Note: This endpoint supports only for player/user.

Parameters
LocalUserNumIndex of user as the owner of the entitlement.
bForceUpdate(Optional) Set it to 'True' to get the history from backend.
EntitlementId(Optional) If bForceUpdate = false, set entitlement id to get history from cache.
EntitlementClass(Optional) The entitlement class or type to get.
StartDate(Optional) Defines the preferred starting date or time to query user entitlement history.
EndDate(Optional) Defines the preferred ending date or time to query user entitlement history.
Page(Optional) Number of content per page to retrieve and page to retrieve. Default value start (offset) : 0, count (limit) : 100.

◆ GetCurrentUserEntitlementHistory() [5/6]

void FOnlineEntitlementsAccelByte::GetCurrentUserEntitlementHistory ( int32 LocalUserNum,
const EAccelByteEntitlementClass & EntitlementClass = EAccelByteEntitlementClass::NONE,
FDateTime StartDate = 0,
FDateTime EndDate = 0,
const FPagedQuery & Page = FPagedQuery{} )

Get user entitlement history. Trigger FOnGetUserEntitlementHistoryComplete on complete Note: This endpoint supports only for player/user.

Parameters
LocalUserNumIndex of user as the owner of the entitlement.
EntitlementClass(Optional) The entitlement class or type to get.
StartDate(Optional) Defines the preferred starting date or time to query user entitlement history.
EndDate(Optional) Defines the preferred ending date or time to query user entitlement history.
Page(Optional) Number of content per page to retrieve and page to retrieve. Default value start (offset) : 0, count (limit) : 100.

◆ GetCurrentUserEntitlementHistory() [6/6]

void FOnlineEntitlementsAccelByte::GetCurrentUserEntitlementHistory ( int32 LocalUserNum,
const FUniqueEntitlementId & EntitlementId )

Get user entitlement history inside the cache. Trigger FOnGetUserEntitlementHistoryComplete on complete Note: This endpoint supports only for player/user.

Parameters
LocalUserNumIndex of user as the owner of the entitlement.
EntitlementIdThe id of the entitlement.

◆ GetFromSubsystem()

bool FOnlineEntitlementsAccelByte::GetFromSubsystem ( const IOnlineSubsystem * Subsystem,
TSharedPtr< FOnlineEntitlementsAccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem passed in.

Parameters
SubsystemSubsystem instance that we wish to get this interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetFromWorld()

bool FOnlineEntitlementsAccelByte::GetFromWorld ( const UWorld * World,
TSharedPtr< FOnlineEntitlementsAccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem associated with the world passed in.

Parameters
WorldWorld instance that we wish to get the interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetUserEntitlementHistory() [1/2]

void FOnlineEntitlementsAccelByte::GetUserEntitlementHistory ( const FUniqueNetId & UserId,
const FUniqueEntitlementId & EntitlementId,
bool bForceUpdate = true )

Get user entitlement history. Trigger FOnGetUserEntitlementHistoryComplete on complete Note: This endpoint supports only for dedicated server.

Parameters
UserIdId of the entilement owner
EntitlementIdThe id of the entitlement.
bForceUpdate(Optional) Set it to 'True' to get the history from backend.

◆ GetUserEntitlementHistory() [2/2]

void FOnlineEntitlementsAccelByte::GetUserEntitlementHistory ( int32 LocalUserNum,
const FUniqueEntitlementId & EntitlementId,
bool bForceUpdate = true )

Get user entitlement history. Trigger FOnGetUserEntitlementHistoryComplete on complete Note: This endpoint supports only for dedicated server.

Parameters
LocalUserNumIndex of user as the owner of the entitlement.
EntitlementIdThe id of the entitlement.
bForceUpdate(Optional) Set it to 'True' to get the history from backend.

◆ SyncPlatformPurchase()

void FOnlineEntitlementsAccelByte::SyncPlatformPurchase ( const FUniqueNetId & InLocalUserId,
const FOnRequestCompleted & CompletionDelegate )

Synchronize MetaQuest Consumable Entitlement/IAP.

Parameters
InLocalUserIdUser ID of the entitlement owner.
CompletionDelegateDelegate will be triggered after the request completed

◆ SyncSteamAbnormalIAPTransaction()

bool FOnlineEntitlementsAccelByte::SyncSteamAbnormalIAPTransaction ( FUniqueNetId const & LocalUserId,
FOnSyncSteamAbnormalIAPTransactionComplete const & CompletionDelegate )

Attempt to sync abnormal Steam transactions. Only to be used when Steam sync mode is set to TRANSACTION in the admin portal.

Parameters
LocalUserIdID of the local user that the transaction sync is performed for
CompletionDelegateDelegate triggered when the sync operation has completed

Member Data Documentation

◆ AccelByteSubsystem

FOnlineSubsystemAccelByteWPtr FOnlineEntitlementsAccelByte::AccelByteSubsystem
protected

Instance of the subsystem that created this interface