# 快速参考

> View a quick reference guide for all available Economy SDK methods.

以下是 SDK 中可用方法的快速参考。有关更详细的信息，请参阅各命名空间的文档。

## 配置##configuration

通过 `Configuration` 命名空间中的方法，可以从全局经济配置中检索物品。

有关这些方法的更多详细信息，请参阅 [SDK 配置](./configuration.md)。

可用的方法有：

```cs title="C#"
public async Task<List<ConfigurationItemDefinition>> SyncConfigurationAsync();
public List<CurrencyDefinition> GetCurrencies()
public CurrencyDefinition GetCurrency(string id)
public List<InventoryItemDefinition> GetInventoryItems()
public InventoryItemDefinition GetInventoryItem(string id)
public List<VirtualPurchaseDefinition> GetVirtualPurchases()
public VirtualPurchaseDefinition GetVirtualPurchase(string id)
public List<RealMoneyPurchaseDefinition> GetRealMoneyPurchases()
public RealMoneyPurchaseDefinition GetRealMoneyPurchase(string id)
```

## 玩家余额##player-balances

使用 `PlayerBalances` 命名空间中的方法，可以检索和更新用户的货币余额。这些方法将从 [Authentication](../implementation#authentication) SDK 返回当前登录玩家的余额。

有关这些方法的更多详细信息，请参阅[玩家余额](./player-balances.md)。

可用的方法有：

```cs title="C#"
public async Task<GetBalanceResponse> GetBalancesAsync(GetBalancesOptions options = null)
public async Task<PlayerBalanceDefinition> SetBalanceAsync(string currencyId, int balance, SetBalanceOptions options = null)
public async Task<PlayerBalanceDefinition> IncrementBalanceAsync(string currencyId, int amount, IncrementBalanceOptions options = null)
public async Task<PlayerBalanceDefinition> DecrementBalanceAsync(string currencyId, int amount, DecrementBalanceOptions options = null)
```

## 玩家背包##player-inventory

使用 `PlayerInventory` 命名空间中的方法，可以检索和更新玩家的背包实例。这些方法将从 [Authentication](../implementation#authentication) SDK 返回当前登录玩家的背包数据。

有关这些方法的更多详细信息，请参阅[玩家背包](./player-inventory.md)。

可用的方法有：

```cs title="C#"
public async Task<GetInventoryResult> GetInventoryAsync(GetInventoryOptions options = null)
public async Task<PlayerInventoryInstance> AddInventoryItemAsync(string inventoryItemId, AddInventoryItemOptions options = null)
public async Task<PlayerInventoryInstance> UpdateInventoryInstanceAsync(string playersInventoryItemId, Dictionary<string, object> instanceData, UpdatePlayersInventoryItemOptions options = null)
public async Task DeleteInventoryInstanceAsync(string playersInventoryItemId, DeletePlayersInventoryItemOptions options = null)
```

## 购买##purchases

使用 `Purchases` 命名空间中的方法，您可以进行虚拟购买并为玩家兑换真实货币购买的商品。这些方法为当前使用 [Authentication](../implementation#authentication) SDK 登录的玩家进行购买。

有关这些方法的更多详情，请参阅[购买](./purchases.md)。

可用的方法有：

```cs title="C#"
public async Task<MakeVirtualPurchaseResult> MakeVirtualPurchaseAsync(string virtualPurchaseId, MakeVirtualPurchaseOptions options = null)
public async Task<RedeemAppleAppStorePurchaseResult> RedeemAppleAppStorePurchaseAsync(RedeemAppleAppStorePurchaseArgs args)
public async Task<RedeemGooglePlayPurchaseResult> RedeemGooglePlayPurchaseAsync(RedeemGooglePlayStorePurchaseArgs args)
```
