Class Reward
Reward
Inherited Members
Namespace: Unity.Services.Apis.Economy
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "reward")]
[Preserve]
public class Reward
Constructors
Reward(string, int, object)
Initializes a new instance of the Reward class.
Declaration
[Preserve]
public Reward(string resourceId = null, int amount = 0, object defaultInstanceData = null)
Parameters
Type | Name | Description |
---|---|---|
string | resourceId | The ID of a currency or inventory item resource that is credited as part of the purchase. (required). |
int | amount | The amount of the resource credited as part of the purchase. (required). |
object | defaultInstanceData | When the reward is an inventory item resource, this specifies instance data automatically saved against the new inventory item. Max size when serialised 5 KB. This property has been deprecated and will only return "null".. |
Properties
Amount
The amount of the resource credited as part of the purchase.
Declaration
[DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public int Amount { get; set; }
Property Value
Type | Description |
---|---|
int | The amount of the resource credited as part of the purchase. |
DefaultInstanceData
When the reward is an inventory item resource, this specifies instance data automatically saved against the new inventory item. Max size when serialised 5 KB. This property has been deprecated and will only return "null".
Declaration
[DataMember(Name = "defaultInstanceData", EmitDefaultValue = true)]
[Obsolete]
[Preserve]
public object DefaultInstanceData { get; set; }
Property Value
Type | Description |
---|---|
object | When the reward is an inventory item resource, this specifies instance data automatically saved against the new inventory item. Max size when serialised 5 KB. This property has been deprecated and will only return "null". |
ResourceId
The ID of a currency or inventory item resource that is credited as part of the purchase.
Declaration
[DataMember(Name = "resourceId", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string ResourceId { get; set; }
Property Value
Type | Description |
---|---|
string | The ID of a currency or inventory item resource that is credited as part of the purchase. |