Class RealMoneyPurchaseResource
The definition for a economy resource that represents a real money purchase.
Inherited Members
Namespace: Unity.Services.Apis.Economy
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "real-money-purchase-resource")]
[Preserve]
public class RealMoneyPurchaseResource
Constructors
RealMoneyPurchaseResource(string, string, TypeEnum, RealMoneyPurchaseResourceStoreIdentifiers, List<Reward>, object, ModifiedMetadata, ModifiedMetadata)
Initializes a new instance of the Real
Declaration
[Preserve]
public RealMoneyPurchaseResource(string id = null, string name = null, RealMoneyPurchaseResource.TypeEnum type = (RealMoneyPurchaseResource.TypeEnum)0, RealMoneyPurchaseResourceStoreIdentifiers storeIdentifiers = null, List<Reward> rewards = null, object customData = null, ModifiedMetadata created = null, ModifiedMetadata modified = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | ID of the resource. (required). |
string | name | A descriptive name for the resource. (required). |
Real |
type | Type of the item, for example |
Real |
storeIdentifiers | storeIdentifiers (required). |
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). (required). |
object | customData | Max size when serialised 5 KB. (required). |
Modified |
created | created (required). |
Modified |
modified | modified (required). |
Properties
Created
Gets or Sets Created
Declaration
[DataMember(Name = "created", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public ModifiedMetadata Created { get; set; }
Property Value
Type | Description |
---|---|
Modified |
CustomData
Max size when serialised 5 KB.
Declaration
[DataMember(Name = "customData", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public object CustomData { get; set; }
Property Value
Type | Description |
---|---|
object | Max size when serialised 5 KB. |
Id
ID of the resource.
Declaration
[DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | ID of the resource. |
Modified
Gets or Sets Modified
Declaration
[DataMember(Name = "modified", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public ModifiedMetadata Modified { get; set; }
Property Value
Type | Description |
---|---|
Modified |
Name
A descriptive name for the resource.
Declaration
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | A descriptive name for 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
[DataMember(Name = "rewards", IsRequired = true, EmitDefaultValue = true)]
[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). |
StoreIdentifiers
Gets or Sets StoreIdentifiers
Declaration
[DataMember(Name = "storeIdentifiers", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public RealMoneyPurchaseResourceStoreIdentifiers StoreIdentifiers { get; set; }
Property Value
Type | Description |
---|---|
Real |
Type
Type of the item, for example CURRENCY
, INVENTORY_ITEM
, VIRTUAL_PURCHASE
, MONEY_PURCHASE
.
Declaration
[DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public RealMoneyPurchaseResource.TypeEnum Type { get; set; }
Property Value
Type | Description |
---|---|
Real |
Type of the item, for example |