Xsolla::Inventory::XsollaInventory
Public Functions
| Name | |
|---|---|
| static void | GetVirtualCurrencyBalance(Action< VirtualCurrencyBalances > onSuccess, Action< Error > onError, string platform =null) Returns the current user’s balance of virtual currency. For each virtual currency, complete data is returned. |
| static void | GetInventoryItems(Action< InventoryItems > onSuccess, Action< Error > onError, int limit =50, int offset =0, string locale =null, string platform =null) Returns a list of virtual items from the user’s inventory according to pagination settings. For each virtual item, complete data is returned. Attention: The number of items returned in a single response is limited. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields. |
| static void | ConsumeInventoryItem(ConsumeItem item, Action onSuccess, Action< Error > onError, string platform =null) Consumes an inventory item. Use for only for consumable virtual items. |
| static void | GetTimeLimitedItems(Action< TimeLimitedItems > onSuccess, Action< Error > onError, string platform =null) Returns a list of time-limited items from the user’s inventory. For each item, complete data is returned. |
Public Functions Documentation
function GetVirtualCurrencyBalance
- C#
1static void GetVirtualCurrencyBalance(
2 Action< VirtualCurrencyBalances > onSuccess,
3 Action< Error > onError,
4 string platform =null
5)
Returns the current user’s balance of virtual currency. For each virtual currency, complete data is returned.
Parameters:
- onSuccess Called after server response.
- onError Called after virtual currency balance was successfully received.
- platform Publishing platform the user plays on.
Can be xsolla (default), playstation_network, xbox_live, pc_standalone, nintendo_shop, google_play, app_store_ios, android_standalone, ios_standalone, android_other, ios_other, or pc_other.
function GetInventoryItems
- C#
1static void GetInventoryItems(
2 Action< InventoryItems > onSuccess,
3 Action< Error > onError,
4 int limit =50,
5 int offset =0,
6 string locale =null,
7 string platform =null
8)
Returns a list of virtual items from the user’s inventory according to pagination settings. For each virtual item, complete data is returned. Attention: The number of items returned in a single response is limited. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.
Parameters:
- onSuccess Called after purchased items were successfully received.
- onError Called after the request resulted with an error.
- limit Limit for the number of elements on the page. The maximum number of elements on a page is 50.
- offset Number of the element from which the list is generated (the count starts from 0).
- locale Defines localization of item’s text fields. Two-letter lowercase language code. Leave empty to use the default value.
- platform Publishing platform the user plays on.
Can be xsolla (default), playstation_network, xbox_live, pc_standalone, nintendo_shop, google_play, app_store_ios, android_standalone, ios_standalone, android_other, ios_other, or pc_other.
function ConsumeInventoryItem
- C#
1static void ConsumeInventoryItem(
2 ConsumeItem item,
3 Action onSuccess,
4 Action< Error > onError,
5 string platform =null
6)
Consumes an inventory item. Use for only for consumable virtual items.
Parameters:
- item Contains consume parameters.
- onSuccess Called after successful inventory item consumption.
- onError Called after the request resulted with an error.
- platform Publishing platform the user plays on.
Can be xsolla (default), playstation_network, xbox_live, pc_standalone, nintendo_shop, google_play, app_store_ios, android_standalone, ios_standalone, android_other, ios_other, or pc_other.
function GetTimeLimitedItems
- C#
1static void GetTimeLimitedItems(
2 Action< TimeLimitedItems > onSuccess,
3 Action< Error > onError,
4 string platform =null
5)
Returns a list of time-limited items from the user’s inventory. For each item, complete data is returned.
Parameters:
- onSuccess Called after list of user time limited items was successfully received.
- onError Called after the request resulted with an error.
- platform Publishing platform the user plays on.
Can be xsolla (default), playstation_network, xbox_live, pc_standalone, nintendo_shop, google_play, app_store_ios, android_standalone, ios_standalone, android_other, ios_other, or pc_other.
Found a typo or other text error? Select the text and press Ctrl+Enter.