Class ProductCatalogItem
Represents a single product from the product catalog. Each item contains some common fields and some fields that are specific to a particular store.
Inherited Members
Namespace: UnityEngine.Purchasing
Syntax
[Serializable]
public class ProductCatalogItem
Fields
applePriceTier
The price tier for the Apple Store.
Declaration
public int applePriceTier
Field Value
Type | Description |
---|---|
Int32 |
defaultDescription
The default localized description of the product.
Declaration
public LocalizedProductDescription defaultDescription
Field Value
Type | Description |
---|---|
LocalizedProductDescription |
googlePrice
The price for GooglePlay.
Declaration
public Price googlePrice
Field Value
Type | Description |
---|---|
Price |
id
The ID of the item.
Declaration
public string id
Field Value
Type | Description |
---|---|
String |
pricingTemplateID
The price template for GooglePlay.
Declaration
public string pricingTemplateID
Field Value
Type | Description |
---|---|
String |
screenshotPath
Screenshot path for Apple configuration.
Declaration
public string screenshotPath
Field Value
Type | Description |
---|---|
String |
type
The ProductType
of the item.
Declaration
public ProductType type
Field Value
Type | Description |
---|---|
ProductType |
udpPrice
The price for UDP.
Declaration
public Price udpPrice
Field Value
Type | Description |
---|---|
Price |
Properties
allStoreIDs
Gets all of the StoreIds
associated with this item.
Declaration
public ICollection<StoreID> allStoreIDs { get; }
Property Value
Type | Description |
---|---|
ICollection<StoreID> | A collection of all store IDs for this item. |
HasAvailableLocale
Property that gets whether or not a valid locale is unassigned.
Declaration
public bool HasAvailableLocale { get; }
Property Value
Type | Description |
---|---|
Boolean | Whether or not a new locale is avalable. |
NextAvailableLocale
Property that gets the next avalaible locale on the list.
Declaration
public TranslationLocale NextAvailableLocale { get; }
Property Value
Type | Description |
---|---|
TranslationLocale | The next avalable locale. |
Payouts
Gets the list of payouts for this product.
Declaration
public IList<ProductCatalogPayout> Payouts { get; }
Property Value
Type | Description |
---|---|
IList<ProductCatalogPayout> | The list of payouts |
translatedDescriptions
Property that gets the translated descriptions.
Declaration
public ICollection<LocalizedProductDescription> translatedDescriptions { get; }
Property Value
Type | Description |
---|---|
ICollection<LocalizedProductDescription> | A collection of all translated descriptions. |
Methods
AddDescription(TranslationLocale)
Adds a default product description, localized to a specific locale.
Declaration
public LocalizedProductDescription AddDescription(TranslationLocale locale)
Parameters
Type | Name | Description |
---|---|---|
TranslationLocale | locale | The locale of the description desired. |
Returns
Type | Description |
---|---|
LocalizedProductDescription | The localized description of this item. |
AddPayout()
Adds a new payout to the list.
Declaration
public void AddPayout()
Clone()
Creates a copy of this object.
Declaration
public ProductCatalogItem Clone()
Returns
Type | Description |
---|---|
ProductCatalogItem | A new instance of |
GetDescription(TranslationLocale)
Gets the product description, localized to a specific locale.
Declaration
public LocalizedProductDescription GetDescription(TranslationLocale locale)
Parameters
Type | Name | Description |
---|---|---|
TranslationLocale | locale | The locale of the description desired. |
Returns
Type | Description |
---|---|
LocalizedProductDescription | The localized description of this item. |
GetOrCreateDescription(TranslationLocale)
Gets the product description, localized to a specific locale, or adds a default one if it's not already set.
Declaration
public LocalizedProductDescription GetOrCreateDescription(TranslationLocale locale)
Parameters
Type | Name | Description |
---|---|---|
TranslationLocale | locale | The locale of the description desired. |
Returns
Type | Description |
---|---|
LocalizedProductDescription | The localized description of this item. |
GetStoreID(String)
Gets the store id by name.
Declaration
public string GetStoreID(string store)
Parameters
Type | Name | Description |
---|---|---|
String | store | The name of the store. |
Returns
Type | Description |
---|---|
String | The id of the store if found, otherwise returns null. |
RemoveDescription(TranslationLocale)
Removes a product description, localized to a specific locale.
Declaration
public void RemoveDescription(TranslationLocale locale)
Parameters
Type | Name | Description |
---|---|---|
TranslationLocale | locale | The locale of the description desired. |
RemovePayout(ProductCatalogPayout)
Removes a payout to the list.
Declaration
public void RemovePayout(ProductCatalogPayout payout)
Parameters
Type | Name | Description |
---|---|---|
ProductCatalogPayout | payout | The payout to be removed. |
SetStoreID(String, String)
Assigns or adds the a store for this item by name and id.
Declaration
public void SetStoreID(string aStore, string aId)
Parameters
Type | Name | Description |
---|---|---|
String | aStore | The name of the store. |
String | aId | The unique id of the store. |
SetStoreIDs(ICollection<StoreID>)
Assigns or modifies a collection of StoreID
s associated with this item.
Declaration
public void SetStoreIDs(ICollection<StoreID> storeIds)
Parameters
Type | Name | Description |
---|---|---|
ICollection<StoreID> | storeIds | The set of |