docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VirtualPurchaseResource

    The definition for a economy resource that represents a virtual purchase.

    Inheritance
    object
    VirtualPurchaseResource
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Services.Apis.Economy
    Assembly: solution.dll
    Syntax
    [Preserve]
    public class VirtualPurchaseResource

    Constructors

    VirtualPurchaseResource(string, string, TypeEnum, ModifiedMetadata, ModifiedMetadata, List<Cost>, List<Reward>, object)

    Initializes a new instance of the VirtualPurchaseResource class.

    Declaration
    [Preserve]
    public VirtualPurchaseResource(string id = null, string name = null, VirtualPurchaseResource.TypeEnum type = (VirtualPurchaseResource.TypeEnum)0, ModifiedMetadata created = null, ModifiedMetadata modified = null, List<Cost> costs = null, List<Reward> rewards = null, object customData = null)
    Parameters
    Type Name Description
    string id

    Identifier for the resource. (required).

    string name

    Name of the resource. (required).

    VirtualPurchaseResource.TypeEnum type

    Type of the item, for example CURRENCY, INVENTORY_ITEM, VIRTUAL_PURCHASE, MONEY_PURCHASE. (required).

    ModifiedMetadata created

    created (required).

    ModifiedMetadata modified

    modified (required).

    List<Cost> costs

    The costs deducted from the player when making the purchase. A cost is an ID of a currency or inventory item, plus an amount..

    List<Reward> rewards

    The rewards credited to the player when making the purchase. A reward is composed of the ID of a currency or inventory item, the amount of that currency or item, and the default instance data (for inventory items)..

    object customData

    customData.

    Properties

    Costs

    The costs deducted from the player when making the purchase. A cost is an ID of a currency or inventory item, plus an amount.

    Declaration
    [Preserve]
    public List<Cost> Costs { get; set; }
    Property Value
    Type Description
    List<Cost>

    The costs deducted from the player when making the purchase. A cost is an ID of a currency or inventory item, plus an amount.

    Created

    Gets or Sets Created

    Declaration
    [Preserve]
    public ModifiedMetadata Created { get; set; }
    Property Value
    Type Description
    ModifiedMetadata

    CustomData

    Gets or Sets CustomData

    Declaration
    [Preserve]
    public object CustomData { get; set; }
    Property Value
    Type Description
    object

    Id

    Identifier for the resource.

    Declaration
    [Preserve]
    public string Id { get; set; }
    Property Value
    Type Description
    string

    Identifier for the resource.

    Modified

    Gets or Sets Modified

    Declaration
    [Preserve]
    public ModifiedMetadata Modified { get; set; }
    Property Value
    Type Description
    ModifiedMetadata

    Name

    Name of the resource.

    Declaration
    [Preserve]
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Name of the resource.

    Rewards

    The rewards credited to the player when making the purchase. A reward is composed of the ID of a currency or inventory item, the amount of that currency or item, and the default instance data (for inventory items).

    Declaration
    [Preserve]
    public List<Reward> Rewards { get; set; }
    Property Value
    Type Description
    List<Reward>

    The rewards credited to the player when making the purchase. A reward is composed of the ID of a currency or inventory item, the amount of that currency or item, and the default instance data (for inventory items).

    Type

    Type of the item, for example CURRENCY, INVENTORY_ITEM, VIRTUAL_PURCHASE, MONEY_PURCHASE.

    Declaration
    [Preserve]
    public VirtualPurchaseResource.TypeEnum Type { get; set; }
    Property Value
    Type Description
    VirtualPurchaseResource.TypeEnum

    Type of the item, for example CURRENCY, INVENTORY_ITEM, VIRTUAL_PURCHASE, MONEY_PURCHASE.

    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)