docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IEconomyInventoryApi

    Represents a collection of functions to interact with the API endpoints

    Inherited Members
    IApiAccessor.Configuration
    IApiAccessor.GetBasePath()
    Namespace: Unity.Services.Apis.Economy
    Assembly: solution.dll
    Syntax
    public interface IEconomyInventoryApi : IApiAccessor

    Methods

    AddInventoryItem(string, string, AddInventoryRequest, string, string, string, CancellationToken)

    Add inventory item

    Declaration
    ApiOperation<InventoryResponse> AddInventoryItem(string projectId, string playerId, AddInventoryRequest addInventoryRequest, string configAssignmentHash = null, string unityInstallationId = null, string analyticsUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    ID of the player.

    AddInventoryRequest addInventoryRequest
    string configAssignmentHash

    Configuration assignment hash that should be used when processing this request. (optional)

    string unityInstallationId

    Unique identifier that identifies an installation on the client’s device. The same player can have different installationIds if they have the game installed on different devices. It is available to all Unity packages that integrate with the Services SDK Core package. (optional)

    string analyticsUserId

    A unique string that identifies the player and is consistent across their subsequent play sessions for analytics purposes. It is the primary user identifier and it comes from the Core package. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<InventoryResponse>

    The operation

    DeleteInventoryItem(string, string, string, string, string, string, string, InventoryDeleteRequest, CancellationToken)

    Delete player's inventory item

    Declaration
    ApiOperation DeleteInventoryItem(string projectId, string playerId, string playersInventoryItemId, string configAssignmentHash = null, string unityInstallationId = null, string analyticsUserId = null, string writeLock = null, InventoryDeleteRequest inventoryDeleteRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    ID of the player.

    string playersInventoryItemId

    The playersInventoryItemId of the item to be updated.

    string configAssignmentHash

    Configuration assignment hash that should be used when processing this request. (optional)

    string unityInstallationId

    Unique identifier that identifies an installation on the client’s device. The same player can have different installationIds if they have the game installed on different devices. It is available to all Unity packages that integrate with the Services SDK Core package. (optional)

    string analyticsUserId

    A unique string that identifies the player and is consistent across their subsequent play sessions for analytics purposes. It is the primary user identifier and it comes from the Core package. (optional)

    string writeLock

    The writelock for a database entry. (optional)

    InventoryDeleteRequest inventoryDeleteRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    GetPlayerInventory(string, string, string, string, string, string, int?, List<string>, List<string>, CancellationToken)

    List player inventory

    Declaration
    ApiOperation<PlayerInventoryResponse> GetPlayerInventory(string projectId, string playerId, string configAssignmentHash = null, string unityInstallationId = null, string analyticsUserId = null, string after = null, int? limit = null, List<string> playersInventoryItemIds = null, List<string> inventoryItemIds = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    ID of the player.

    string configAssignmentHash

    Configuration assignment hash that should be used when processing this request. (optional)

    string unityInstallationId

    Unique identifier that identifies an installation on the client’s device. The same player can have different installationIds if they have the game installed on different devices. It is available to all Unity packages that integrate with the Services SDK Core package. (optional)

    string analyticsUserId

    A unique string that identifies the player and is consistent across their subsequent play sessions for analytics purposes. It is the primary user identifier and it comes from the Core package. (optional)

    string after

    The playersInventoryItemId after which to retrieve the next page of balances. (optional)

    int? limit

    Number of items to be returned. Defaults to 20. (optional)

    List<string> playersInventoryItemIds

    List of playersInventoryItemIds in array notation, for example, playersInventoryItemIds[]=ID1&playersInventoryItemIds[]=ID2. (optional)

    List<string> inventoryItemIds

    List of inventory item IDs in array notation, for example, inventoryItemIds[]=ID1&inventoryItemIds[]=ID2. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<PlayerInventoryResponse>

    The operation

    UpdateInventoryItem(string, string, string, InventoryRequestUpdate, string, string, string, CancellationToken)

    Update player's inventory item

    Declaration
    ApiOperation<InventoryResponse> UpdateInventoryItem(string projectId, string playerId, string playersInventoryItemId, InventoryRequestUpdate inventoryRequestUpdate, string configAssignmentHash = null, string unityInstallationId = null, string analyticsUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    ID of the project.

    string playerId

    ID of the player.

    string playersInventoryItemId

    The playersInventoryItemId of the item to be updated.

    InventoryRequestUpdate inventoryRequestUpdate
    string configAssignmentHash

    Configuration assignment hash that should be used when processing this request. (optional)

    string unityInstallationId

    Unique identifier that identifies an installation on the client’s device. The same player can have different installationIds if they have the game installed on different devices. It is available to all Unity packages that integrate with the Services SDK Core package. (optional)

    string analyticsUserId

    A unique string that identifies the player and is consistent across their subsequent play sessions for analytics purposes. It is the primary user identifier and it comes from the Core package. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<InventoryResponse>

    The operation

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)