userpurchasemanager - TogetherGames/Public-Unity-CSharp GitHub Wiki
together.UserPurchaseManager
The UserPurchaseManager class contains a collection UserPurchases. With this class, a developer will be able to Create and Retrieve All their UserPurchases.
List<UserPurchase> UserPurchases
Stores all the UserPurchases contained in the Manager.
Adds a UserPurchase to the internally managed list without persistence.
Note
This methos is deprecated
Returns void
UserPurchaseManager.Add( userPurchase )
UserPurchase userPurchase
Instance of a UserPurchase to add internally
--------------------------------------------------------------------------------Finds the UserPurchase with the specified UserPurchaseID if it exists, otherwise returns null
Returns UserPurchase
UserPurchaseManager.FindByUserPurchaseID( userPurchaseID )
long userPurchaseID
The ID of the UserPurchase to find
--------------------------------------------------------------------------------Gets the number of UserPurchases currently managed internally.
Returns int
UserPurchaseManager.GetCount( )
Gets the UserPurchase at the specified index if it exists, otherwise returns null.
Returns UserPurchase
UserPurchaseManager.Get( index )
int index
The index of the UserPurchase to find
--------------------------------------------------------------------------------Returns the index of the specified UserPurchase if it exists, otherwise returns -1.
Returns int
UserPurchaseManager.IndexOf( userItem )
UserPurchase userItem
Instance of the UserPurchase to find the index of
--------------------------------------------------------------------------------Returns the index of the UserPurchase with the specified UserPurchaseID if it exists, otherwise returns -1.
Returns int
UserPurchaseManager.IndexOfByUserPurchaseID( userPurchaseID )
long userPurchaseID
The ID of the UserPurchase to find the index of
--------------------------------------------------------------------------------Removes a UserPurchase from the internally managed list. This does not delete the purchase from the user's account persistently.
Note
This method is deprecated
Returns void
UserPurchaseManager.Remove( index )
int index
The index of the UserPurchase to remove internally
--------------------------------------------------------------------------------Creates a new UserPurchase record. Upon success, this will automatically update the internal list.
Returns void
UserPurchaseManager.Create( roomID, achievementID, itemID, description, count, userPurchaseProperties, callbackFunc )
long roomID
The ID of the room where the purchase occurred. Pass in 0 for no room.
[long](#) achievementIDThe ID of the achievement that was purchase.
[long](#) itemIDThe ID of the item that was purchased.
[string](#) descriptionA textual description of the purchase.
[int](#) countthe Number of (Achievements, Items, things) purchased.
[PropertyCollection](./propertycollection) userPurchasePropertiesThe properties to assign to the UserPurchase record. Pass an instance to link properties. Pass null to assign no properties.
[OnCompleteHandler](./oncompletehandler) callbackFuncThe function to call upon completion.
--------------------------------------------------------------------------------Gets all UserPurchases done by a User. Upon success, this will automatically update the internal list.
Returns void
UserPurchaseManager.GetAll( callbackFunc )
OnCompleteHandler callbackFunc
The function to call upon completion.
--------------------------------------------------------------------------------