I want to Purchase inventory item below code but i receive error,
PlayFab.EconomyModels.EntityKey entity = new PlayFab.EconomyModels.EntityKey { Id = ClientEntity.Id, Type = ClientEntity.Type };
List<PlayFab.EconomyModels.PurchasePriceAmount> PAmounts = new List<PlayFab.EconomyModels.PurchasePriceAmount>();
PlayFab.EconomyModels.PurchasePriceAmount amountData = new PlayFab.EconomyModels.PurchasePriceAmount();
amountData.ItemId = mCatItem.Id;
amountData.Amount = mCatItem.PriceOptions.Prices[0].Amounts[0].Amount;
PAmounts.Add(amountData);
var requrest = new PlayFab.EconomyModels.PurchaseInventoryItemsRequest
{
Amount = 1,
Entity = entity,
Item = new PlayFab.EconomyModels.InventoryItemReference
{
Id = mCatItem.Id,
},
PriceAmounts = PAmounts,
DeleteEmptyStacks = false
};
PlayFabEconomyAPI.PurchaseInventoryItems(requrest, OnPurchaseSuccess, OnPurchaseFailure);
On the other hand, I want to add Economy v2 Currency / get Currency for logged in user, can you give me examples about these. I can not find any examples about this request. the documentation shows api referances but its not clear for me.
Regards.