Loading...
Searching...
No Matches
FOnlineWalletV2AccelByte Class Reference

#include <OnlineWalletV2InterfaceAccelByte.h>

Inheritance diagram for FOnlineWalletV2AccelByte:

Public Member Functions

 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnGetCurrencyListCompleted, bool, const TArray< FAccelByteModelsCurrencyList > &, const FString &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnGetWalletInfoV2Completed, bool, const FAccelByteModelsWalletInfoResponse &, const FString &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnGetWalletTransactionsCompleted, bool, const TArray< FAccelByteModelsWalletTransactionInfo > &, const FString &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnWalletBalanceChangedNotification, const FUniqueNetId &, const FAccelByteModelsWalletBalanceChangedNotification &)
 DEFINE_ONLINE_PLAYER_DELEGATE_TWO_PARAM (MAX_LOCAL_PLAYERS, OnWalletStatusChangedNotification, const FUniqueNetId &, const FAccelByteModelsWalletStatusChangedNotification &)
bool GetCurrencyList (int32 LocalUserNum, bool bAlwaysRequestToService=false)
bool GetCurrencyFromCache (const FString &CurrencyCode, FAccelByteModelsCurrencyList &OutCurrency)
bool GetAllCurrencyFromCache (TArray< FAccelByteModelsCurrencyList > &OutCurrencyList)
void AddCurrencyToList (const FString &CurrencyCode, const TSharedRef< FAccelByteModelsCurrencyList > &InCurrencyList)
bool GetWalletInfoByCurrencyCodeV2 (int32 LocalUserNum, const FString &CurrencyCode, bool bAlwaysRequestToService=false)
bool GetWalletInfoFromCacheV2 (int32 LocalUserNum, const FString &CurrencyCode, FAccelByteModelsWalletInfoResponse &OutWalletInfo)
void AddWalletInfoToListV2 (int32 LocalUserNum, const FString &CurrencyCode, const TSharedRef< FAccelByteModelsWalletInfoResponse > &InWalletInfo)
bool ListWalletTransactionsByCurrencyCode (int32 LocalUserNum, const FString &CurrencyCode, int32 Offset=0, int32 Limit=20)

Static Public Member Functions

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

Protected Member Functions

 FOnlineWalletV2AccelByte ()
void OnWalletBalanceChangedNotificationReceived (const FAccelByteModelsWalletBalanceChangedNotification &Response, int32 InLocalUserNum)
void OnWalletStatusChangedNotificationReceived (const FAccelByteModelsWalletStatusChangedNotification &Response, int32 InLocalUserNum)

Protected Attributes

FOnlineSubsystemAccelByteWPtr AccelByteSubsystem = nullptr
TMap< int32, FDelegateHandle > OnWalletBalanceChangedNotificationReceivedDelegateHandleMap
TMap< int32, FDelegateHandle > OnWalletStatusChangedNotificationReceivedDelegateHandleMap

Detailed Description

Implementation of Wallet V2 service from AccelByte services

Constructor & Destructor Documentation

◆ FOnlineWalletV2AccelByte()

FOnlineWalletV2AccelByte::FOnlineWalletV2AccelByte ( )
inlineprotected

Hidden default constructor, the constructor that takes in a subsystem instance should be used instead.

Member Function Documentation

◆ GetFromSubsystem()

bool FOnlineWalletV2AccelByte::GetFromSubsystem ( const IOnlineSubsystem * Subsystem,
TSharedPtr< FOnlineWalletV2AccelByte, 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 FOnlineWalletV2AccelByte::GetFromWorld ( const UWorld * World,
TSharedPtr< FOnlineWalletV2AccelByte, 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

Member Data Documentation

◆ AccelByteSubsystem

FOnlineSubsystemAccelByteWPtr FOnlineWalletV2AccelByte::AccelByteSubsystem = nullptr
protected

Instance of the subsystem that created this interface