docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VirtualPurchaseItemRequest

    VirtualPurchaseItemRequest

    Inheritance
    object
    VirtualPurchaseItemRequest
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Apis.Admin.Economy
    Assembly: Unity.Services.Apis.dll
    Syntax
    [DataContract(Name = "virtual-purchase-item-request")]
    [Preserve]
    public class VirtualPurchaseItemRequest

    Constructors

    VirtualPurchaseItemRequest(string, string, TypeEnum, List<VirtualPurchaseItemRequestCostsInner>, List<VirtualPurchaseItemRequestRewardsInner>, object)

    Initializes a new instance of the VirtualPurchaseItemRequest class.

    Declaration
    [Preserve]
    public VirtualPurchaseItemRequest(string id = null, string name = null, VirtualPurchaseItemRequest.TypeEnum type = (VirtualPurchaseItemRequest.TypeEnum)0, List<VirtualPurchaseItemRequestCostsInner> costs = null, List<VirtualPurchaseItemRequestRewardsInner> rewards = null, object customData = null)
    Parameters
    Type Name Description
    string id

    ID of the item. (required).

    string name

    A descriptive name for the item. (required).

    VirtualPurchaseItemRequest.TypeEnum type

    type (required).

    List<VirtualPurchaseItemRequestCostsInner> 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. An item can be used in more than one cost line..

    List<VirtualPurchaseItemRequestRewardsInner> rewards

    The rewards credited to the player when making the purchase. A reward is an ID of a currency or inventory item, plus an amount. An item can be used in more than one reward line..

    object customData

    Max size when serialised 5 kilobits..

    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. An item can be used in more than one cost line.

    Declaration
    [DataMember(Name = "costs", EmitDefaultValue = false)]
    [Preserve]
    public List<VirtualPurchaseItemRequestCostsInner> Costs { get; set; }
    Property Value
    Type Description
    List<VirtualPurchaseItemRequestCostsInner>

    The costs deducted from the player when making the purchase. A cost is an ID of a currency or inventory item, plus an amount. An item can be used in more than one cost line.

    CustomData

    Max size when serialised 5 kilobits.

    Declaration
    [DataMember(Name = "customData", EmitDefaultValue = true)]
    [Preserve]
    public object CustomData { get; set; }
    Property Value
    Type Description
    object

    Max size when serialised 5 kilobits.

    Id

    ID of the item.

    Declaration
    [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
    [Preserve]
    public string Id { get; set; }
    Property Value
    Type Description
    string

    ID of the item.

    Name

    A descriptive name for the item.

    Declaration
    [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
    [Preserve]
    public string Name { get; set; }
    Property Value
    Type Description
    string

    A descriptive name for the item.

    Rewards

    The rewards credited to the player when making the purchase. A reward is an ID of a currency or inventory item, plus an amount. An item can be used in more than one reward line.

    Declaration
    [DataMember(Name = "rewards", EmitDefaultValue = false)]
    [Preserve]
    public List<VirtualPurchaseItemRequestRewardsInner> Rewards { get; set; }
    Property Value
    Type Description
    List<VirtualPurchaseItemRequestRewardsInner>

    The rewards credited to the player when making the purchase. A reward is an ID of a currency or inventory item, plus an amount. An item can be used in more than one reward line.

    Type

    Gets or Sets Type

    Declaration
    [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
    [Preserve]
    public VirtualPurchaseItemRequest.TypeEnum Type { get; set; }
    Property Value
    Type Description
    VirtualPurchaseItemRequest.TypeEnum
    In This Article
    Back to top
    Copyright © 2025 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)