Inventory
Summary
| Members | Descriptions |
|---|---|
class URH_PendingOrder | Base class to handle pending orders waiting for a final response. |
class URH_PendingPromoCodeOrder | Class to handle pending promo code redemptions. |
class URH_PendingInventoryUpdateOrder | Class to handle pending inventory update calls. |
class URH_PendingPlayerOrder | Class to handle pending player orders. |
class URH_PendingOrderDetailsOrder | Class to handle pending order details orders. |
class URH_PlayerOrderWatch | Class to track watches on players orders. |
class URH_PlayerOrderEntry | Player Order Entry class defines the data of an Order used to submit one to the InventoryAPI. |
class URH_PlayerInventory | Inventory Subsystem created per player for tracking and updating player inventory. |
class URH_InventoryBlueprintLibrary | Inventory Blueprint Library with helper methods for inventory item struct. |
struct FRH_InventorySession | Struct for tracking an inventory session. |
struct FRH_ItemInventory | Inventory Item struct for defining cached inventory items and making inventory write calls. |
struct FRH_BaseInventoryOperation | Base Inventory Operation struct for defining shared input data for Inventory Modification API calls. |
struct FRH_CreateInventory | Create Inventory Operation struct for setting up data to Create an Inventory record. |
struct FRH_UpdateInventory | Update Inventory Operation struct for setting up data to Update an Inventory record. |
class URH_PendingOrder
class URH_PendingOrder
: public UObject
Base class to handle pending orders waiting for a final response.
Summary
| Members | Descriptions |
|---|---|
public FString OrderId | Id of the pending order. |
public bool RequestOrders(FRH_GenericSuccessWithErrorBlock Delegate) | Polls to see if the order has completed. |
public inline FORCEINLINE bool RequestOrders(FRH_GenericSuccessBlock Delegate) | |
protected inline virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content) | Triggers a broadcasts when the order is sucessfully processed. |
protected virtual void RequestOrdersResponse(const TGetOrderById::Response & Resp) | Handles the response to a Get Player Order call. |
protected URH_PlayerInventory*GetPlayerInventory() const | Gets the Player Inventory. |
Members
public FString OrderId
Id of the pending order.
public bool RequestOrders(FRH_GenericSuccessWithErrorBlock Delegate)
Polls to see if the order has completed.
Parameters
DelegateCallback if the poll is successful.
Returns
True if a call was made.
public inline FORCEINLINE bool RequestOrders(FRH_GenericSuccessBlock Delegate)
protected inline virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content)
Triggers a broadcasts when the order is sucessfully processed.
Parameters
-
PlayerInventoryThe Inventory Subystem to help will callback params. -
ContentThe results of the order being processed.
protected virtual void RequestOrdersResponse(const TGetOrderById::Response & Resp)
Handles the response to a Get Player Order call.
Parameters
RespResponse given for the call.
protected URH_PlayerInventory*GetPlayerInventory() const
Gets the Player Inventory.
class URH_PendingPromoCodeOrder
class URH_PendingPromoCodeOrder
: public URH_PendingOrder
Class to handle pending promo code redemptions.
Summary
| Members | Descriptions |
|---|---|
public FString PromoCode | Promo code attempting to be redeemed. |
public FRH_PromoCodeResultBlock PromoCodeResultsDelegate | Delegate callback with the promo code results. |
public inline void Init(const FString & InOrderId,const FString & InPromoCode,FRH_PromoCodeResultBlock InPromoCodeDelegate) | Initalized the pending request. |
protected virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content) | Triggers a broadcasts when the order is sucessfully processed. |
Members
public FString PromoCode
Promo code attempting to be redeemed.
public FRH_PromoCodeResultBlock PromoCodeResultsDelegate
Delegate callback with the promo code results.
public inline void Init(const FString & InOrderId,const FString & InPromoCode,FRH_PromoCodeResultBlock InPromoCodeDelegate)
Initalized the pending request.
Parameters
-
InOrderIdOrderId of the pending order. -
InPromoCodePromo code being redeemed in the order. -
InPromoCodeDelegateCallback delegate to fire when complete.
protected virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content)
Triggers a broadcasts when the order is sucessfully processed.
Parameters
-
PlayerInventoryThe Inventory Subystem to help will callback params. -
ContentThe results of the order being processed.
class URH_PendingInventoryUpdateOrder
class URH_PendingInventoryUpdateOrder
: public URH_PendingOrder
Class to handle pending inventory update calls.
Summary
| Members | Descriptions |
|---|---|
public FRH_OnInventoryUpdateDelegateBlock InventoryUpdateDelegate | Delegate callback with inventory update results. |
public inline void Init(const FString & InOrderId,FRH_OnInventoryUpdateDelegateBlock InInventoryUpdateDelegate) | Initalized the pending request. |
protected virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content) | Triggers a broadcasts when the order is sucessfully processed. |
Members
public FRH_OnInventoryUpdateDelegateBlock InventoryUpdateDelegate
Delegate callback with inventory update results.
public inline void Init(const FString & InOrderId,FRH_OnInventoryUpdateDelegateBlock InInventoryUpdateDelegate)
Initalized the pending request.
Parameters
-
InOrderIdOrderId of the pending order. -
InInventoryUpdateDelegateCallback delegate to fire when complete.
protected virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content)
Triggers a broadcasts when the order is sucessfully processed.
Parameters
-
PlayerInventoryThe Inventory Subystem to help will callback params. -
ContentThe results of the order being processed.
class URH_PendingPlayerOrder
class URH_PendingPlayerOrder
: public URH_PendingOrder
Class to handle pending player orders.
Summary
| Members | Descriptions |
|---|---|
public FRH_OrderResultBlock OrderResultDelegate | Delegate callback with player order results. |
public TArray< URH_PlayerOrderEntry* >OrderEntries | List of all the order entries submitted in the order. |
public inline void Init(const FString & InOrderId,const TArray< URH_PlayerOrderEntry * > & InOrderEntries,FRH_OrderResultBlock InOrderResultDelegate) | Initalized the pending request. |
protected virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content) | Triggers a broadcasts when the order is sucessfully processed. |
Members
public FRH_OrderResultBlock OrderResultDelegate
Delegate callback with player order results.
public TArray< URH_PlayerOrderEntry* >OrderEntries
List of all the order entries submitted in the order.
public inline void Init(const FString & InOrderId,const TArray< URH_PlayerOrderEntry * > & InOrderEntries,FRH_OrderResultBlock InOrderResultDelegate)
Initalized the pending request.
Parameters
-
InOrderIdOrderId of the pending order. -
InOrderEntriesOrder entries submitted with the order -
InOrderResultDelegateCallback delegate to fire when complete.
protected virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content)
Triggers a broadcasts when the order is sucessfully processed.
Parameters
-
PlayerInventoryThe Inventory Subystem to help will callback params. -
ContentThe results of the order being processed.
class URH_PendingOrderDetailsOrder
class URH_PendingOrderDetailsOrder
: public URH_PendingOrder
Class to handle pending order details orders.
Summary
| Members | Descriptions |
|---|---|
public FRH_OrderDetailsBlock OrderDetailsDelegate | Delegate callback with player order results. |
public inline void Init(const FString & InOrderId,FRH_OrderDetailsBlock InOrderDetailDelegate) | Initalized the pending request. |
protected virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content) | Triggers a broadcasts when the order is sucessfully processed. |
Members
public FRH_OrderDetailsBlock OrderDetailsDelegate
Delegate callback with player order results.
public inline void Init(const FString & InOrderId,FRH_OrderDetailsBlock InOrderDetailDelegate)
Initalized the pending request.
Parameters
-
InOrderIdOrderId of the pending order. -
InOrderResultDelegateCallback delegate to fire when complete.
protected virtual void BroadcastComplete(URH_PlayerInventory* PlayerInventory,constFRHAPI_PlayerOrder & Content)
Triggers a broadcasts when the order is sucessfully processed.
Parameters
-
PlayerInventoryThe Inventory Subystem to help will callback params. -
ContentThe results of the order being processed.
class URH_PlayerOrderWatch
class URH_PlayerOrderWatch
: public UObject
Class to track watches on players orders.
Summary
| Members | Descriptions |
|---|---|
public TArray< FRH_OrderDetailsBlock > Delegates | List of delegates listening for order. |
public bool RequestOrders(FRH_GenericSuccessWithErrorBlock Delegate) | Gets the players orders. |
public inline FORCEINLINE bool RequestOrders(FRH_GenericSuccessBlock Delegate) | |
protected FString Cursor | Cursor location of last player orders response. |
protected virtual void RequestOrdersResponse(const TGetOrders::Response & Resp) | Handles the response to a Get Player Order call. |
protected URH_PlayerInventory*GetPlayerInventory() const | Gets the Player Inventory. |
Members
public TArray< FRH_OrderDetailsBlock > Delegates
List of delegates listening for order.
public bool RequestOrders(FRH_GenericSuccessWithErrorBlock Delegate)
Gets the players orders.
Parameters
DelegateCallback with the players orders.
Returns
True if the call was made.
public inline FORCEINLINE bool RequestOrders(FRH_GenericSuccessBlock Delegate)
protected FString Cursor
Cursor location of last player orders response.
protected virtual void RequestOrdersResponse(const TGetOrders::Response & Resp)
Handles the response to a Get Player Order call.
Parameters
RespResponse given for the call.
protected URH_PlayerInventory*GetPlayerInventory() const
Gets the Player Inventory.
class URH_PlayerOrderEntry
class URH_PlayerOrderEntry
: public UObject
Player Order Entry class defines the data of an Order used to submit one to the InventoryAPI.
Summary
| Members | Descriptions |
|---|---|
public ERHAPI_PlayerOrderEntryType FillType | The Fill Type of this order Entry. |
public FRHAPI_Loot LootItem | The Loot Item the order is for. |
public int32 LootId | The Loot Id of the loot item. |
public int32 Quantity | The amount of the loot item the order is for. |
public FString ExternalTransactionId | The id that the client can provide for the order for record keeping. |
public int32 PriceItemId | The item id of the item being used to pay for the order. |
public int32 Price | The amount of the item being used for payment, this is verified to match the expected price. |
public int32 CouponItemId | The item id of a coupon item being used if one is being applied for an item discount. |
public TMap< FString, FString > CustomData | Custom data for the given order to be placed on the item. |
public inline ERHAPI_PlayerOrderEntryType GetFillType() const | Gets the Fill Type of the order. |
public inline const FRHAPI_Loot&GetLootItem() const | Gets the Loot Item the order is for. |
public inline const int32 & GetLootId() const | Gets the Loot Id of the loot item. |
public inline int32 GetQuantity() const | Gets the amount of the loot item the order is for. |
public inline FString GetExternalTransactionId() const | Gets the id that the client can provide for the order for record keeping. |
public inline const int32 & GetPriceItemId() const | Gets the item id of the item being used to pay for the order. |
public inline int32 GetPrice() const | Gets the amount of the item being used for payment, this is verified to match the expected price. |
public inline const int32 & GetCouponItemId() const | Gets the item id of a coupon item being used if one is being applied for an item discount. |
public inline void AddCustomData(const FString & Key,const FString & Value) | Adds custom data to the order entry. |
Members
public ERHAPI_PlayerOrderEntryType FillType
The Fill Type of this order Entry.
public FRHAPI_Loot LootItem
The Loot Item the order is for.
public int32 LootId
The Loot Id of the loot item.
public int32 Quantity
The amount of the loot item the order is for.
public FString ExternalTransactionId
The id that the client can provide for the order for record keeping.
public int32 PriceItemId
The item id of the item being used to pay for the order.
public int32 Price
The amount of the item being used for payment, this is verified to match the expected price.
public int32 CouponItemId
The item id of a coupon item being used if one is being applied for an item discount.
public TMap< FString, FString > CustomData
Custom data for the given order to be placed on the item.
public inline ERHAPI_PlayerOrderEntryType GetFillType() const
Gets the Fill Type of the order.
public inline const FRHAPI_Loot&GetLootItem() const
Gets the Loot Item the order is for.
public inline const int32 & GetLootId() const
Gets the Loot Id of the loot item.
public inline int32 GetQuantity() const
Gets the amount of the loot item the order is for.
public inline FString GetExternalTransactionId() const
Gets the id that the client can provide for the order for record keeping.
public inline const int32 & GetPriceItemId() const
Gets the item id of the item being used to pay for the order.
public inline int32 GetPrice() const
Gets the amount of the item being used for payment, this is verified to match the expected price.
public inline const int32 & GetCouponItemId() const
Gets the item id of a coupon item being used if one is being applied for an item discount.
public inline void AddCustomData(const FString & Key,const FString & Value)
Adds custom data to the order entry.
Parameters
-
KeyThe key for the custom data. -
ValueThe value for the custom data.
class URH_PlayerInventory
class URH_PlayerInventory
: public UObject
Inventory Subsystem created per player for tracking and updating player inventory.
Summary
| Members | Descriptions |
|---|---|
public FRH_InventoryUpdatedDelegate OnInventoryCacheUpdated | Delegate to listen to changes to the players cached inventory. |
public FRH_InventoryUpdatedDynamicDelegate OnInventoryCacheUpdatedBP | |
public void Initialize() | Initialize the subobject. |
public inline URH_PlayerInfo*GetPlayerInfo() const | Gets the player info set on the subsystem. |
public FGuid GetRHPlayerUuid() const | Gets the associated player infos Unique Player Id. |
public FAuthContextPtr GetAuthContext() const | Gets the Auth Context that has authority to operate on this players inventory. |
public inline void SetPlayerInfo(URH_PlayerInfo * InPlayerInfo) | Sets the Player Info owner of the subsystem. |
public void GetInventoryCount(const int32 & ItemId,const FRH_GetInventoryCountBlock & Delegate) const | Gets the Players Inventory Count of the item for the connected platform, async pulls needed item data if it isn’t already cached. |
public inline void BLUEPRINT_GetInventoryCount(const int32 & ItemId,const FRH_GetInventoryCountDynamicDelegate & Delegate) | |
public void IsInventoryItemOwned(const int32 & ItemId,const FRH_GetInventoryStateBlock & Delegate) const | Gets if the player owns at least one of the item for the connected platform, async pulls needed item data if it isn’t already cached. |
public inline void BLUEPRINT_IsInventoryItemOwned(const int32 & ItemId,const FRH_GetInventoryStateDynamicDelegate & Delegate) | |
public void IsInventoryItemRented(const int32 & ItemId,const FRH_GetInventoryStateBlock & Delegate) const | Gets if the player has rented at least one of the item for the connected platform, async pulls needed item data if it isn’t already cached. |
public inline void BLUEPRINT_IsInventoryItemRented(const int32 & ItemId,const FRH_GetInventoryStateDynamicDelegate & Delegate) | |
public inline FRH_InventorySession GetCachedInventorySession() const | Gets the active inventory session for the player. |
public TArray< FRH_ItemInventory>GetAllCachedInventory() const | Gets the cached inventory for the player. |
public TArray< FRH_ItemInventory>GetCachedInventoryForItem(const int32 & ItemId) const | Gets the cached inventory records for an item id for the player. |
public TArray< FRH_ItemInventory>GetCachedInventoryForItems(const TArray< int32 > & ItemIds) const | Gets the cached inventory records for multiple item ids for the player. |
public TArray< FRH_ItemInventory>GetCachedInventoryForType(const ERHAPI_InventoryType & Type) const | Gets the cached inventory records for an inventory type for the player. |
public TArray< FRH_ItemInventory>GetCachedInventoryForItemsAndTypes(const TArray< int32 > & ItemIds,const TArray< ERHAPI_InventoryType > & Types) const | Gets the cached inventory records for multiple item ids that have the given inventory type for the player. |
public bool GetCachedInventoryForInventoryId(const FGuid & InventoryId,FRH_ItemInventory & Item) const | Gets an exact cached inventory record for the player. |
public inline const TArray< FRHAPI_PlayerOrder> &GetOrderResults() const | Gets all order results that have come in for the player. |
public inline void ClearCachedInventory() | Clears all cached inventory for the player. |
public inline void ClearOrderCache() | Clears all cached order results for the player. |
public void GetInventorySession(const FRH_OnInventorySessionUpdateDelegateBlock & Delegate) | Calls the Inventory API to get the players active Inventory Session. |
public inline void BLUEPRINT_GetInventorySession(const FRH_OnInventorySessionUpdateDynamicDelegate & Delegate) | |
public void CreateInventorySession(const TOptional< ERHAPI_Platform > Platform,const FRH_OnInventorySessionUpdateDelegateBlock & Delegate) | Calls the Inventory API to get the create an Inventory Session for the player. |
public inline void BLUEPRINT_CreateInventorySession(const FRH_OnInventorySessionUpdateDynamicDelegate & Delegate) | |
public inline void BLUEPRINT_CreateInventorySessionForPlatform(const ERHAPI_Platform Platform,const FRH_OnInventorySessionUpdateDynamicDelegate & Delegate) | Calls the Inventory API to get the create an Inventory Session for the player for a given Platform. |
public void GetInventory(TArray< int32 > ItemIds,const FRH_OnInventoryUpdateDelegateBlock & Delegate) | Calls the Inventory API to get the the inventory for the player. |
public inline void BLUEPRINT_GetInventory(TArray< int32 > ItemIds,const FRH_OnInventoryUpdateDynamicDelegate & Delegate) | |
public inline void CreatePlayerOrder(ERHAPI_PlayerOrderEntryType FillType,ERHAPI_Source OrderSource,TArray< URH_PlayerOrderEntry * > OrderEntries,FRH_OrderResultBlock Delegate) | Creates an order for the player, used for purchasing and other loot related actions. |
public inline void BLUEPRINT_CreatePlayerOrder(ERHAPI_PlayerOrderEntryType FillType,ERHAPI_Source OrderSource,TArray< URH_PlayerOrderEntry * > OrderEntries,const FRH_OrderResultDynamicDelegate & Delegate) | |
public inline void CreateNewPlayerOrder(ERHAPI_Source OrderSource,TArray< URH_PlayerOrderEntry * > OrderEntries,FRH_OrderResultBlock Delegate) | Creates an order for the player, used for purchasing and other loot related actions. |
public inline void BLUEPRINT_CreateNewPlayerOrder(ERHAPI_Source OrderSource,TArray< URH_PlayerOrderEntry * > OrderEntries,const FRH_OrderResultDynamicDelegate & Delegate) | |
public void CreateNewPlayerOrder(ERHAPI_Source OrderSource,bool IsTransaction,TArray< URH_PlayerOrderEntry * > OrderEntries,FRH_OrderResultBlock Delegate) | Creates an order for the player, used for purchasing and other loot related actions. |
public inline void BLUEPRINT_CreateNewPlayerOrder2(ERHAPI_Source OrderSource,bool IsTransaction,TArray< URH_PlayerOrderEntry * > OrderEntries,const FRH_OrderResultDynamicDelegate & Delegate) | |
public void RedeemPromoCode(const FString & PromoCode,FRH_PromoCodeResultBlock Delegate) | Creates an order for the player that redeems a promotion code. |
public inline void BLUEPRINT_RedeemPromoCode(const FString & PromoCode,const FRH_PromoCodeResultDynamicDelegate & Delegate) | |
public void SetOrderWatch(FRH_OrderDetailsBlock Delegate) | Sets a watch to start polling for orders for the player. |
public inline void BLUEPRINT_SetOrderWatch(const FRH_OrderDetailsDynamicDelegate & Delegate) | |
public void ClearOrderWatch(FRH_OrderDetailsBlock Delegate) | Clears a watch for the player. |
public inline void BLUEPRINT_ClearOrderWatch(const FRH_OrderDetailsDynamicDelegate & Delegate) | |
public void AddPendingOrdersFromEntitlementsArray(TArray< FRHAPI_PlatformEntitlement > & Entitlements,FRH_OrderDetailsBlock Delegate) | Adds pending order monitoring for each processed entitlement. |
public inline void BLUEPRINT_AddPendingOrdersFromEntitlementsArray(TArray< FRHAPI_PlatformEntitlement > & Entitlements,const FRH_OrderDetailsDynamicDelegate & Delegate) | |
public void AddPendingOrdersFromEntitlementResult(const FRHAPI_PlatformEntitlementProcessResult & EntitlementResult,FRH_OrderDetailsBlock Delegate) | Adds pending order monitoring for each processed entitlement. |
public inline void BLUEPRINT_AddPendingOrdersFromEntitlementResult(const FRHAPI_PlatformEntitlementProcessResult & EntitlementResult,const FRH_OrderDetailsDynamicDelegate & Delegate) | |
public void CheckPollStatus() | Used to pulse polling of watches and pending purchases. |
public void CreateInventory(const TOptional< FGuid > ClientOrderReferenceId,const TArray< FRH_CreateInventory > & CreateInventories,const ERHAPI_Source Source,const FRH_OnInventoryUpdateDelegateBlock & Delegate) | Requests direct inventory creation to the players inventory. |
public inline void BLUEPRINT_CreateInventory(const FGuid ClientOrderReferenceId,const TArray< FRH_CreateInventory > & CreateInventories,const FRH_OnInventoryUpdateDynamicDelegate & Delegate,const ERHAPI_Source Source) | |
public inline void BLUEPRINT_CreateInventoryWithoutClientOrderRefId(const TArray< FRH_CreateInventory > & CreateInventories,const FRH_OnInventoryUpdateDynamicDelegate & Delegate,const ERHAPI_Source Source) | Requests direct inventory creation to the players inventory. |
public void UpdateInventory(const TOptional< FGuid > ClientOrderReferenceId,const TArray< FRH_UpdateInventory > & UpdateInventories,const ERHAPI_Source Source,const FRH_OnInventoryUpdateDelegateBlock & Delegate) | Requests direct inventory modifications to the players inventory. |
public inline void BLUEPRINT_UpdateInventory(const FGuid ClientOrderReferenceId,const TArray< FRH_UpdateInventory > & UpdateInventories,const FRH_OnInventoryUpdateDynamicDelegate & Delegate,const ERHAPI_Source Source) | |
public inline void BLUEPRINT_UpdateInventoryWithoutClientOrderRefId(const TArray< FRH_UpdateInventory > & UpdateInventories,const FRH_OnInventoryUpdateDynamicDelegate & Delegate,const ERHAPI_Source Source) | Requests direct inventory modifications to the players inventory. |
public void ClearPendingOrder(const FRHAPI_PlayerOrder & OrderResult) | Used by the PendingOrder to clear itself from the pending order list when it completes. |
public void ParseOrderResult(const FRHAPI_PlayerOrder & Content) | Parses a player order result API into a URH_PlayerOrderEntry. |
protected TMap< int32, TArray< FRH_ItemInventory> >InventoryCache | Inventory cache map of Item Id to inventory records. |
protected TArray< FString > ParsedInventoryOrders | Array of inventory orders that have recently been parsed to prevent double parsing orders through normal polling. |
protected FRH_AutoPollerPtr InventoryPoller | Poller for inventory updates. |
protected FRH_AutoPollerPtr PendingInventoryPoller | Polled for pending inventory. |
protected TArray< FRHAPI_PlayerOrder>CachedOrderResults | Array of order results. |
protected URH_PlayerOrderWatch*OrderWatch | Tracking for orders that come in for the player. |
protected TArray< URH_PendingOrder* >PendingOrders | Array of orders that have been requested that have not been returned yet. |
protected FRH_InventorySession InventorySession | The active inventory session. |
protected URH_PlayerInfo*PlayerInfo | The Player Info associated with this Inventory. |
protected bool bReceivedInventoryNotification | Tracking of Inventory Notifications. |
protected bool bReceivedPendingInventoryNotification | Tracking of Pending Inventory Notifications. |
protected inline bool ShouldPollInventory() const | Gets if the inventory should be polled due to an active watch. |
protected inline bool ShouldPollPendingInventory() const | Gets if pending inventory should be polled due to outstanding orders. |
protected void HandleNotification(const FRHAPI_Notification & Notification,const FString & APIName,const TArray< FString > & APIParams) | Handles an incoming notification, checks if it is an invnetory notification, then operates if need be. |
protected void PollInventory(const FRH_PollCompleteFunc & Delegate) | Start a poll for inventory updates. |
protected void PollPendingInventory(const FRH_PollCompleteFunc & Delegate) | Start a poll for pending inventory updates. |
protected inline void BroadcastOnInventoryCacheUpdated(TArray< int32 > ItemIds) | Helper function to broadcast inventory changes. |
protected void OnUserChanged() | Callback that occurs whenever the local player this subsystem is associated with changes. |
protected void InitPropertiesWithDefaultValues() | Initializes the subsystem with defaults for its cached data. |
protected void PopulateInstanceData(FRHAPI_PlayerOrderCreate & PlayerOrderCreate) const | Adds instance specific data to an Player Order. |
protected void CreatePlayerOrderResponse(const TCreateOrder::Response & Resp,FRH_OrderResultBlock Delegate,TArray< URH_PlayerOrderEntry * > OrderEntries) | Handles the response to a Create Player Order call. |
protected void RedeemPromoCodeResponse(const TCreateOrder::Response & Resp,FRH_PromoCodeResultBlock Delegate,FString PromoCode) | Handles the response to a Redeem Promo Code call. |
protected void HandleCreateInventorySession(const RallyHereAPI::FResponse_CreateNewInventorySessionByPlayerUuid & Response,FRH_OnInventorySessionUpdateDelegateBlock Delegate) | Handles the response to a Create Inventory Session call. |
protected void HandleGetInventorySession(const RallyHereAPI::FResponse_GetInventorySessionInfoByPlayerUuid & Response,FRH_OnInventorySessionUpdateDelegateBlock Delegate) | Handles the response to a Get Inventory Session call. |
protected void HandleGetInventory(const RallyHereAPI::FResponse_GetPlayerInventoryUuid & Response,const TArray< int32 > ItemIds,FRH_OnInventoryUpdateDelegateBlock Delegate) | Handles the response to a Get Inventory call. |
protected void HandleCreateInventory(const RallyHereAPI::FResponse_CreatePlayerInventoryUuid & Response,FRH_OnInventoryUpdateDelegateBlock Delegate) | Handles the response to a Create Inventory call. |
protected void HandleUpdateInventory(const RallyHereAPI::FResponse_ModifyManyPlayerInventoryUuid & Response,FRH_OnInventoryUpdateDelegateBlock Delegate) | Handles the response to a Update Inventory call. |
protected void WriteOrderEntries(TArray< FRHAPI_PlayerOrderEntryCreate> & Entries,TArray<URH_PlayerOrderEntry * > OrderEntries) | Converts the class of Order Entries to the struct used by the API system for calls. |
protected void UpdateInventoryFromOrderDetails(const TArray< FRHAPI_PlayerOrderDetail > & OrderDetails) | Updates the cached inventory with data from an incoming order. |
protected void GetInventoryCount_INTERNAL(URH_CatalogItem * Item,const FRH_GetInventoryCountBlock & Delegate) const | Internal helper function to complete Get Inventory Count. |
protected void IsInventoryItemOwned_INTERNAL(URH_CatalogItem * Item,const FRH_GetInventoryStateBlock & Delegate) const | Internal helper function to complete Is Inventory Item Owned. |
protected void IsInventoryItemRented_INTERNAL(URH_CatalogItem * Item,const FRH_GetInventoryStateBlock & Delegate) const | Internal helper function to complete Is Inventory Item Rented. |
protected URH_GameInstanceSubsystem*GetGameInstanceSubsystem() const | Helper function to get Game Instance Subsystem. |
protected URH_CatalogSubsystem*GetCatalogSubsystem() const | Helper function to get Catalog Subsystem. |
typedef TCreateOrder |
Members
public FRH_InventoryUpdatedDelegate OnInventoryCacheUpdated
Delegate to listen to changes to the players cached inventory.
public FRH_InventoryUpdatedDynamicDelegate OnInventoryCacheUpdatedBP
public void Initialize()
Initialize the subobject.
public inline URH_PlayerInfo*GetPlayerInfo() const
Gets the player info set on the subsystem.
Returns
The set player info.
public FGuid GetRHPlayerUuid() const
Gets the associated player infos Unique Player Id.
Returns
The set player infos Unique Player Id.
public FAuthContextPtr GetAuthContext() const
Gets the Auth Context that has authority to operate on this players inventory.
Returns
The local or instance Auth Context.
public inline void SetPlayerInfo(URH_PlayerInfo * InPlayerInfo)
Sets the Player Info owner of the subsystem.
public void GetInventoryCount(const int32 & ItemId,const FRH_GetInventoryCountBlock & Delegate) const
Gets the Players Inventory Count of the item for the connected platform, async pulls needed item data if it isn’t already cached.
Parameters
-
ItemIdThe id of the item requesting count of. -
DelegateCallback with the count of the inventory item.
public inline void BLUEPRINT_GetInventoryCount(const int32 & ItemId,const FRH_GetInventoryCountDynamicDelegate & Delegate)
public void IsInventoryItemOwned(const int32 & ItemId,const FRH_GetInventoryStateBlock & Delegate) const
Gets if the player owns at least one of the item for the connected platform, async pulls needed item data if it isn’t already cached.
Parameters
-
ItemIdThe id of the item requesting count of. -
DelegateCallback with the state of the items ownership.
public inline void BLUEPRINT_IsInventoryItemOwned(const int32 & ItemId,const FRH_GetInventoryStateDynamicDelegate & Delegate)
public void IsInventoryItemRented(const int32 & ItemId,const FRH_GetInventoryStateBlock & Delegate) const
Gets if the player has rented at least one of the item for the connected platform, async pulls needed item data if it isn’t already cached.
Parameters
-
ItemIdThe id of the item requesting count of. -
DelegateCallback with the state of the items rented status.
public inline void BLUEPRINT_IsInventoryItemRented(const int32 & ItemId,const FRH_GetInventoryStateDynamicDelegate & Delegate)
public inline FRH_InventorySession GetCachedInventorySession() const
Gets the active inventory session for the player.
Returns
The active inventory session.
public TArray< FRH_ItemInventory>GetAllCachedInventory() const
Gets the cached inventory for the player.
Returns
Array of inventory records.
public TArray< FRH_ItemInventory>GetCachedInventoryForItem(const int32 & ItemId) const
Gets the cached inventory records for an item id for the player.
Parameters
ItemIdThe id of the item requesting inventory records for.
Returns
Array of inventory records.
public TArray< FRH_ItemInventory>GetCachedInventoryForItems(const TArray< int32 > & ItemIds) const
Gets the cached inventory records for multiple item ids for the player.
Parameters
ItemIdsThe ids of the item requesting inventory records for.
Returns
Array of inventory records.
public TArray< FRH_ItemInventory>GetCachedInventoryForType(const ERHAPI_InventoryType & Type) const
Gets the cached inventory records for an inventory type for the player.
Parameters
TypeThe type of inventory records being requested.
Returns
Array of inventory records.
public TArray< FRH_ItemInventory>GetCachedInventoryForItemsAndTypes(const TArray< int32 > & ItemIds,const TArray< ERHAPI_InventoryType > & Types) const
Gets the cached inventory records for multiple item ids that have the given inventory type for the player.
Parameters
-
ItemIdsThe ids of the item requesting inventory records for. -
TypeThe type of inventory records being requested.
Returns
Array of inventory records.
public bool GetCachedInventoryForInventoryId(const FGuid & InventoryId,FRH_ItemInventory & Item) const
Gets an exact cached inventory record for the player.
Parameters
-
InventoryIdthe Unique Id of the inventory record being requested. -
ItemThe inventory record requested.
Returns
If true, the inventory record was found.
public inline const TArray< FRHAPI_PlayerOrder> &GetOrderResults() const
Gets all order results that have come in for the player.
Returns
Array of order results.
public inline void ClearCachedInventory()
Clears all cached inventory for the player.
public inline void ClearOrderCache()
Clears all cached order results for the player.
public void GetInventorySession(const FRH_OnInventorySessionUpdateDelegateBlock & Delegate)
Calls the Inventory API to get the players active Inventory Session.
Parameters
DelegateCallback delegate for getting the players session.
public inline void BLUEPRINT_GetInventorySession(const FRH_OnInventorySessionUpdateDynamicDelegate & Delegate)
public void CreateInventorySession(const TOptional< ERHAPI_Platform > Platform,const FRH_OnInventorySessionUpdateDelegateBlock & Delegate)
Calls the Inventory API to get the create an Inventory Session for the player.
Parameters
DelegateCallback delegate for creating the players session.
public inline void BLUEPRINT_CreateInventorySession(const FRH_OnInventorySessionUpdateDynamicDelegate & Delegate)
public inline void BLUEPRINT_CreateInventorySessionForPlatform(const ERHAPI_Platform Platform,const FRH_OnInventorySessionUpdateDynamicDelegate & Delegate)
Calls the Inventory API to get the create an Inventory Session for the player for a given Platform.
Parameters
DelegateCallback delegate for creating the players session.
public void GetInventory(TArray< int32 > ItemIds,const FRH_OnInventoryUpdateDelegateBlock & Delegate)
Calls the Inventory API to get the the inventory for the player.
Parameters
-
ItemIdsThe Item Ids of inventory requested, if empty all inventory will be returned. -
DelegateCallback delegate for getting the inventory.
public inline void BLUEPRINT_GetInventory(TArray< int32 > ItemIds,const FRH_OnInventoryUpdateDynamicDelegate & Delegate)
public inline void CreatePlayerOrder(ERHAPI_PlayerOrderEntryType FillType,ERHAPI_Source OrderSource,TArray< URH_PlayerOrderEntry * > OrderEntries,FRH_OrderResultBlock Delegate)
Creates an order for the player, used for purchasing and other loot related actions.
Parameters
-
FillTypeThe type of player order being created -
OrderSourceWhere the order is being created from -
OrderEntriesArray of orders being requested -
DelegateCallback delegate for the completion of the order request
public inline void BLUEPRINT_CreatePlayerOrder(ERHAPI_PlayerOrderEntryType FillType,ERHAPI_Source OrderSource,TArray< URH_PlayerOrderEntry * > OrderEntries,const FRH_OrderResultDynamicDelegate & Delegate)
public inline void CreateNewPlayerOrder(ERHAPI_Source OrderSource,TArray< URH_PlayerOrderEntry * > OrderEntries,FRH_OrderResultBlock Delegate)
Creates an order for the player, used for purchasing and other loot related actions.
Parameters
-
OrderSourceWhere the order is being created from. -
OrderEntriesArray of orders being requested. -
DelegateCallback delegate for the completion of the order request.
public inline void BLUEPRINT_CreateNewPlayerOrder(ERHAPI_Source OrderSource,TArray< URH_PlayerOrderEntry * > OrderEntries,const FRH_OrderResultDynamicDelegate & Delegate)
public void CreateNewPlayerOrder(ERHAPI_Source OrderSource,bool IsTransaction,TArray< URH_PlayerOrderEntry * > OrderEntries,FRH_OrderResultBlock Delegate)
Creates an order for the player, used for purchasing and other loot related actions.
Parameters
-
OrderSourceWhere the order is being created from. -
IsTransactionIf true, all orders must succeed for any to be completed. -
OrderEntriesArray of orders being requested. -
DelegateCallback delegate for the completion of the order request.
public inline void BLUEPRINT_CreateNewPlayerOrder2(ERHAPI_Source OrderSource,bool IsTransaction,TArray< URH_PlayerOrderEntry * > OrderEntries,const FRH_OrderResultDynamicDelegate & Delegate)
public void RedeemPromoCode(const FString & PromoCode,FRH_PromoCodeResultBlock Delegate)
Creates an order for the player that redeems a promotion code.
Parameters
-
PromoCodeThe Promo Code being redeemed. -
DelegateCallback delegate for the completion of the promo code redemption.
public inline void BLUEPRINT_RedeemPromoCode(const FString & PromoCode,const FRH_PromoCodeResultDynamicDelegate & Delegate)
public void SetOrderWatch(FRH_OrderDetailsBlock Delegate)
Sets a watch to start polling for orders for the player.
Parameters
DelegateCallback delegate whenever the player has any orders.
public inline void BLUEPRINT_SetOrderWatch(const FRH_OrderDetailsDynamicDelegate & Delegate)
public void ClearOrderWatch(FRH_OrderDetailsBlock Delegate)
Clears a watch for the player.
public inline void BLUEPRINT_ClearOrderWatch(const FRH_OrderDetailsDynamicDelegate & Delegate)
public void AddPendingOrdersFromEntitlementsArray(TArray< FRHAPI_PlatformEntitlement > & Entitlements,FRH_OrderDetailsBlock Delegate)
Adds pending order monitoring for each processed entitlement.
Parameters
-
EntitlementsArray of processed entitlements that need monitoring. -
DelegateCallback delegate when the inventory update completes.
public inline void BLUEPRINT_AddPendingOrdersFromEntitlementsArray(TArray< FRHAPI_PlatformEntitlement > & Entitlements,const FRH_OrderDetailsDynamicDelegate & Delegate)
public void AddPendingOrdersFromEntitlementResult(const FRHAPI_PlatformEntitlementProcessResult & EntitlementResult,FRH_OrderDetailsBlock Delegate)
Adds pending order monitoring for each processed entitlement.
Parameters
-
EntitlementResultResult from entitlement processing that needs monitoring. -
DelegateCallback delegate when the inventory update completes.
public inline void BLUEPRINT_AddPendingOrdersFromEntitlementResult(const FRHAPI_PlatformEntitlementProcessResult & EntitlementResult,const FRH_OrderDetailsDynamicDelegate & Delegate)
public void CheckPollStatus()
Used to pulse polling of watches and pending purchases.
public void CreateInventory(const TOptional< FGuid > ClientOrderReferenceId,const TArray< FRH_CreateInventory > & CreateInventories,const ERHAPI_Source Source,const FRH_OnInventoryUpdateDelegateBlock & Delegate)
Requests direct inventory creation to the players inventory.
Parameters
-
ClientOrderReferenceIdClient specified ref id for an inventory change. -
CreateInventoriesArray of items to be created in the players inventory. -
SourceWhere the order is being created from. -
DelegateCallback delegate when the inventory creation completes.
public inline void BLUEPRINT_CreateInventory(const FGuid ClientOrderReferenceId,const TArray< FRH_CreateInventory > & CreateInventories,const FRH_OnInventoryUpdateDynamicDelegate & Delegate,const ERHAPI_Source Source)
public inline void BLUEPRINT_CreateInventoryWithoutClientOrderRefId(const TArray< FRH_CreateInventory > & CreateInventories,const FRH_OnInventoryUpdateDynamicDelegate & Delegate,const ERHAPI_Source Source)
Requests direct inventory creation to the players inventory.
Parameters
-
CreateInventoriesArray of items to be created in the players inventory. -
SourceWhere the order is being created from. -
DelegateCallback delegate when the inventory creation completes.
public void UpdateInventory(const TOptional< FGuid > ClientOrderReferenceId,const TArray< FRH_UpdateInventory > & UpdateInventories,const ERHAPI_Source Source,const FRH_OnInventoryUpdateDelegateBlock & Delegate)
Requests direct inventory modifications to the players inventory.
Parameters
-
ClientOrderReferenceIdClient specified ref id for an inventory change. -
UpdateInventoriesArray of items to be created in the players inventory. -
SourceWhere the order is being created from. -
DelegateCallback delegate when the inventory modification completes.
public inline void BLUEPRINT_UpdateInventory(const FGuid ClientOrderReferenceId,const TArray< FRH_UpdateInventory > & UpdateInventories,const FRH_OnInventoryUpdateDynamicDelegate & Delegate,const ERHAPI_Source Source)
public inline void BLUEPRINT_UpdateInventoryWithoutClientOrderRefId(const TArray< FRH_UpdateInventory > & UpdateInventories,const FRH_OnInventoryUpdateDynamicDelegate & Delegate,const ERHAPI_Source Source)
Requests direct inventory modifications to the players inventory.
Parameters
-
UpdateInventoriesArray of items to be created in the players inventory. -
SourceWhere the order is being created from. -
DelegateCallback delegate when the inventory modification completes.
public void ClearPendingOrder(const FRHAPI_PlayerOrder & OrderResult)
Used by the PendingOrder to clear itself from the pending order list when it completes.
Parameters
OrderResultThe pending order result to clear.
public void ParseOrderResult(const FRHAPI_PlayerOrder & Content)
Parses a player order result API into a URH_PlayerOrderEntry.
Parameters
ContentThe PlayerOrder data to parse.
protected TMap< int32, TArray< FRH_ItemInventory> >InventoryCache
Inventory cache map of Item Id to inventory records.
protected TArray< FString > ParsedInventoryOrders
Array of inventory orders that have recently been parsed to prevent double parsing orders through normal polling.
protected FRH_AutoPollerPtr InventoryPoller
Poller for inventory updates.
protected FRH_AutoPollerPtr PendingInventoryPoller
Polled for pending inventory.
protected TArray< FRHAPI_PlayerOrder>CachedOrderResults
Array of order results.
protected URH_PlayerOrderWatch*OrderWatch
Tracking for orders that come in for the player.
protected TArray< URH_PendingOrder* >PendingOrders
Array of orders that have been requested that have not been returned yet.
protected FRH_InventorySession InventorySession
The active inventory session.
protected URH_PlayerInfo*PlayerInfo
The Player Info associated with this Inventory.
protected bool bReceivedInventoryNotification
Tracking of Inventory Notifications.
protected bool bReceivedPendingInventoryNotification
Tracking of Pending Inventory Notifications.
protected inline bool ShouldPollInventory() const
Gets if the inventory should be polled due to an active watch.
protected inline bool ShouldPollPendingInventory() const
Gets if pending inventory should be polled due to outstanding orders.
protected void HandleNotification(const FRHAPI_Notification & Notification,const FString & APIName,const TArray< FString > & APIParams)
Handles an incoming notification, checks if it is an invnetory notification, then operates if need be.
Parameters
-
NotificationThe notification to handle. -
APINameThe name of the API that sent the notification. -
APIParamsThe parameters of the API that sent the notification.
protected void PollInventory(const FRH_PollCompleteFunc & Delegate)
Start a poll for inventory updates.
Parameters
DelegateCallback delegate for the polling.
protected void PollPendingInventory(const FRH_PollCompleteFunc & Delegate)
Start a poll for pending inventory updates.
Parameters
DelegateCallback delegate for the polling.
protected inline void BroadcastOnInventoryCacheUpdated(TArray< int32 > ItemIds)
Helper function to broadcast inventory changes.
Parameters
ItemIdsThe item ids that have been updated.
protected void OnUserChanged()
Callback that occurs whenever the local player this subsystem is associated with changes.
protected void InitPropertiesWithDefaultValues()
Initializes the subsystem with defaults for its cached data.
protected void PopulateInstanceData(FRHAPI_PlayerOrderCreate & PlayerOrderCreate) const
Adds instance specific data to an Player Order.
Parameters
PlayerOrderCreateThe Player order to add the data to.
protected void CreatePlayerOrderResponse(const TCreateOrder::Response & Resp,FRH_OrderResultBlock Delegate,TArray< URH_PlayerOrderEntry * > OrderEntries)
Handles the response to a Create Player Order call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes. -
OrderEntriesThe Order Entries submitted with the create call.
protected void RedeemPromoCodeResponse(const TCreateOrder::Response & Resp,FRH_PromoCodeResultBlock Delegate,FString PromoCode)
Handles the response to a Redeem Promo Code call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes. -
PromoCodeThe Code that was submitted to redeem.
protected void HandleCreateInventorySession(const RallyHereAPI::FResponse_CreateNewInventorySessionByPlayerUuid & Response,FRH_OnInventorySessionUpdateDelegateBlock Delegate)
Handles the response to a Create Inventory Session call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes.
protected void HandleGetInventorySession(const RallyHereAPI::FResponse_GetInventorySessionInfoByPlayerUuid & Response,FRH_OnInventorySessionUpdateDelegateBlock Delegate)
Handles the response to a Get Inventory Session call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes.
protected void HandleGetInventory(const RallyHereAPI::FResponse_GetPlayerInventoryUuid & Response,const TArray< int32 > ItemIds,FRH_OnInventoryUpdateDelegateBlock Delegate)
Handles the response to a Get Inventory call.
Parameters
-
RespResponse given for the call. -
ItemIdsThe Items Ids that inventory was requested of. -
DelegateDelegate passed in for original call to respond to when call completes.
protected void HandleCreateInventory(const RallyHereAPI::FResponse_CreatePlayerInventoryUuid & Response,FRH_OnInventoryUpdateDelegateBlock Delegate)
Handles the response to a Create Inventory call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes.
protected void HandleUpdateInventory(const RallyHereAPI::FResponse_ModifyManyPlayerInventoryUuid & Response,FRH_OnInventoryUpdateDelegateBlock Delegate)
Handles the response to a Update Inventory call.
Parameters
-
RespResponse given for the call. -
DelegateDelegate passed in for original call to respond to when call completes.
protected void WriteOrderEntries(TArray< FRHAPI_PlayerOrderEntryCreate> & Entries,TArray<URH_PlayerOrderEntry * > OrderEntries)
Converts the class of Order Entries to the struct used by the API system for calls.
Parameters
-
EntriesStruct based Order entries for submission. -
OrderEntriesClass based Order entries for conversion.
protected void UpdateInventoryFromOrderDetails(const TArray< FRHAPI_PlayerOrderDetail > & OrderDetails)
Updates the cached inventory with data from an incoming order.
Parameters
OrderDetailsThe details of the incoming order.
protected void GetInventoryCount_INTERNAL(URH_CatalogItem * Item,const FRH_GetInventoryCountBlock & Delegate) const
Internal helper function to complete Get Inventory Count.
Parameters
-
ItemThe Item to get the count of. -
DelegateCallback delegate to send the count to.
protected void IsInventoryItemOwned_INTERNAL(URH_CatalogItem * Item,const FRH_GetInventoryStateBlock & Delegate) const
Internal helper function to complete Is Inventory Item Owned.
Parameters
-
ItemThe Item to get the ownership of. -
DelegateCallback delegate to send the ownership status to.
protected void IsInventoryItemRented_INTERNAL(URH_CatalogItem * Item,const FRH_GetInventoryStateBlock & Delegate) const
Internal helper function to complete Is Inventory Item Rented.
Parameters
-
ItemThe Item to get the rental status of. -
DelegateCallback delegate to send the rental status to.
protected URH_GameInstanceSubsystem*GetGameInstanceSubsystem() const
Helper function to get Game Instance Subsystem.
protected URH_CatalogSubsystem*GetCatalogSubsystem() const
Helper function to get Catalog Subsystem.
typedef TCreateOrder
class URH_InventoryBlueprintLibrary
class URH_InventoryBlueprintLibrary
: public UBlueprintFunctionLibrary
Inventory Blueprint Library with helper methods for inventory item struct.
Summary
| Members | Descriptions |
|---|
Members
struct FRH_InventorySession
Struct for tracking an inventory session.
Summary
| Members | Descriptions |
|---|---|
public FString SessionId | The Session Id. |
public ERHAPI_Platform SessionPlatform | The platform associated with the session. |
public FString OrderId | The Order Id associated with any loot that may have been created when the session was created. |
public TArray< int32 > AppliedDurableLoot | Array of durable loot that was applied to the inventory by the session. |
public inline FRH_InventorySession() | Default constructor. |
Members
public FString SessionId
The Session Id.
public ERHAPI_Platform SessionPlatform
The platform associated with the session.
public FString OrderId
The Order Id associated with any loot that may have been created when the session was created.
public TArray< int32 > AppliedDurableLoot
Array of durable loot that was applied to the inventory by the session.
public inline FRH_InventorySession()
Default constructor.
struct FRH_ItemInventory
Inventory Item struct for defining cached inventory items and making inventory write calls.
Summary
| Members | Descriptions |
|---|---|
public FGuid InventoryId | Unique Id of the inventory record. |
public ERHAPI_InventoryType InventoryType | The ownership type of the record. |
public int32 ItemId | The item id of the record. |
public int32 Count | Amount of the record. |
public TOptional< FDateTime > Expires | If the record is a rental, when the rental expires. |
public FDateTime Acquired | The time that the record was first recorded. |
public TMap< FString, FString > CustomData | Custom data that is stored on the record. |
public ERHAPI_InventoryBucket Bucket | The bucket that the inventory record is in. |
public inline FRH_ItemInventory() | Default constructor. |
public inline void AddCustomData(const FString & Key,const FString & Value) | Adds custom data to the inventory record. |
public inline int32 RemoveCustomData(const FString & Key) | Removes custom data to the inventory record. |
public inline FString FindCustomDataWithKey(const FString & Key) | Gets custom data by key from the inventory record. |
public inline void Init(const int32 & ItemIdOfInventory,const FRHAPI_InventoryRecord & Inventory) | Initializes an inventory record from an Inventory Record API response. |
public inline bool operator==(const FRH_ItemInventory & Other) const | Equals operator override for comparison. |
Members
public FGuid InventoryId
Unique Id of the inventory record.
public ERHAPI_InventoryType InventoryType
The ownership type of the record.
public int32 ItemId
The item id of the record.
public int32 Count
Amount of the record.
public TOptional< FDateTime > Expires
If the record is a rental, when the rental expires.
public FDateTime Acquired
The time that the record was first recorded.
public TMap< FString, FString > CustomData
Custom data that is stored on the record.
public ERHAPI_InventoryBucket Bucket
The bucket that the inventory record is in.
public inline FRH_ItemInventory()
Default constructor.
public inline void AddCustomData(const FString & Key,const FString & Value)
Adds custom data to the inventory record.
Parameters
-
KeyThe key for the custom data. -
ValueThe value for the custom data.
public inline int32 RemoveCustomData(const FString & Key)
Removes custom data to the inventory record.
Parameters
KeyThe key for the custom data.
Returns
The number of elements removed.
public inline FString FindCustomDataWithKey(const FString & Key)
Gets custom data by key from the inventory record.
Parameters
KeyThe key for the custom data.
Returns
The value for the custome data.
public inline void Init(const int32 & ItemIdOfInventory,const FRHAPI_InventoryRecord & Inventory)
Initializes an inventory record from an Inventory Record API response.
Parameters
-
ItemIdOfInventoryThe Item Id for the record. -
InventoryThe inventory record from the API call.
public inline bool operator==(const FRH_ItemInventory & Other) const
Equals operator override for comparison.
struct FRH_BaseInventoryOperation
Base Inventory Operation struct for defining shared input data for Inventory Modification API calls.
Summary
| Members | Descriptions |
|---|---|
public int32 Count | The amount of the inventory operation. |
public int32 ItemId | The item id for the inventory operation. |
public TMap< FString, FString > CustomData | The custom data for the inventory operation. |
public ERHAPI_InventoryBucket Bucket | The bucket for the inventory operation. |
public TOptional< FDateTime > Expires | The expiriation date of the inventory operation. |
public bool InventoryShouldExpire | If set, then the the expiration date will be considered for the inventory operation. |
public inline FRH_BaseInventoryOperation() | Default constructor. |
public inline bool InitFromItemInventory(const FRH_ItemInventory & ItemInventory) | Initializes an inventory operation with the data from an Inventory Item. @params [in] ItemInventory The item inventory to initialize the operation with. |
Members
public int32 Count
The amount of the inventory operation.
public int32 ItemId
The item id for the inventory operation.
public TMap< FString, FString > CustomData
The custom data for the inventory operation.
public ERHAPI_InventoryBucket Bucket
The bucket for the inventory operation.
public TOptional< FDateTime > Expires
The expiriation date of the inventory operation.
public bool InventoryShouldExpire
If set, then the the expiration date will be considered for the inventory operation.
public inline FRH_BaseInventoryOperation()
Default constructor.
public inline bool InitFromItemInventory(const FRH_ItemInventory & ItemInventory)
Initializes an inventory operation with the data from an Inventory Item. @params [in] ItemInventory The item inventory to initialize the operation with.
Returns
If true, the operation was initialized successfully.
struct FRH_CreateInventory
struct FRH_CreateInventory
: public FRH_BaseInventoryOperation
Create Inventory Operation struct for setting up data to Create an Inventory record.
Summary
| Members | Descriptions |
|---|---|
public int32 Count | The amount of the inventory operation, defaults to 1. |
public ERHAPI_CreateInventoryType InventoryType | The item id for the inventory operation, defaults to Persistent. |
public inline bool InitFromItemInventory(const FRH_ItemInventory & ItemInventory) | Initializes an inventory operation with the data from an Inventory Item. @params [in] ItemInventory The item inventory to initialize the operation with. |
Members
public int32 Count
The amount of the inventory operation, defaults to 1.
public ERHAPI_CreateInventoryType InventoryType
The item id for the inventory operation, defaults to Persistent.
public inline bool InitFromItemInventory(const FRH_ItemInventory & ItemInventory)
Initializes an inventory operation with the data from an Inventory Item. @params [in] ItemInventory The item inventory to initialize the operation with.
Returns
If true, the operation was initialized successfully.
struct FRH_UpdateInventory
struct FRH_UpdateInventory
: public FRH_BaseInventoryOperation
Update Inventory Operation struct for setting up data to Update an Inventory record.
Summary
| Members | Descriptions |
|---|---|
public FGuid InventoryId | Unique Id of the inventory record being operated on. |
public int32 Count | The amount of the inventory operation, defaults to 0. |
public inline bool InitFromItemInventory(const FRH_ItemInventory & ItemInventory) | Initializes an inventory operation with the data from an Inventory Item. @params [in] ItemInventory The item inventory to initialize the operation with. |
Members
public FGuid InventoryId
Unique Id of the inventory record being operated on.
public int32 Count
The amount of the inventory operation, defaults to 0.
public inline bool InitFromItemInventory(const FRH_ItemInventory & ItemInventory)
Initializes an inventory operation with the data from an Inventory Item. @params [in] ItemInventory The item inventory to initialize the operation with.
Returns
If true, the operation was initialized successfully.