Class CatalogProvider
Inherited Members
Namespace: UnityEngine .Purchasing
Assembly: Unity.Purchasing.dll
Syntax
public class CatalogProvider : ICatalogProvider, IBaseCatalogProvider
Methods
AddProduct(string, ProductType)
Add a product to the configuration builder.
Declaration
public void AddProduct(string id, ProductType type)
Parameters
Type | Name | Description |
---|---|---|
string | id | The id of the product. |
Product |
type | The type of the product. |
AddProduct(string, ProductType, StoreSpecificIds?)
Add a product to the configuration builder.
Declaration
public void AddProduct(string id, ProductType type, StoreSpecificIds? storeIDs)
Parameters
Type | Name | Description |
---|---|---|
string | id | The id of the product. |
Product |
type | The type of the product. |
Store |
storeIDs | The object representing store IDs the product is to be added to. |
AddProduct(string, ProductType, StoreSpecificIds?, IEnumerable<PayoutDefinition>?)
Add a product to the configuration builder.
Declaration
public void AddProduct(string id, ProductType type, StoreSpecificIds? storeIDs, IEnumerable<PayoutDefinition>? payouts)
Parameters
Type | Name | Description |
---|---|---|
string | id | The id of the product. |
Product |
type | The type of the product. |
Store |
storeIDs | The object representing store IDs the product is to be added to. |
IEnumerable<Payout |
payouts | The enumerator of the payout definitions of the product. |
AddProduct(string, ProductType, StoreSpecificIds?, PayoutDefinition)
Add a product to the configuration builder.
Declaration
public void AddProduct(string id, ProductType type, StoreSpecificIds? storeIDs, PayoutDefinition payout)
Parameters
Type | Name | Description |
---|---|---|
string | id | The id of the product. |
Product |
type | The type of the product. |
Store |
storeIDs | The object representing store IDs the product is to be added to. |
Payout |
payout | The payout definition of the product. |
AddProducts(IEnumerable<ProductDefinition>, Dictionary<string, StoreSpecificIds>?)
Add multiple products to the configuration builder.
Declaration
public void AddProducts(IEnumerable<ProductDefinition> productsDefinitions, Dictionary<string, StoreSpecificIds>? storeIDsByProductId)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Product |
productsDefinitions | |
Dictionary<string, Store |
storeIDsByProductId | The object representing store IDs for each product id. |
FetchProducts(Action<List<ProductDefinition>>)
Fetch all the products in the catalog, asynchronously.
Declaration
public void FetchProducts(Action<List<ProductDefinition>> callback)
Parameters
Type | Name | Description |
---|---|---|
Action<List<Product |
callback | Event containing the set of products upon completion. |
FetchProducts(Action<List<ProductDefinition>>, string?)
Fetch all the products in the catalog, asynchronously.
Declaration
public void FetchProducts(Action<List<ProductDefinition>> callback, string? storeName)
Parameters
Type | Name | Description |
---|---|---|
Action<List<Product |
callback | Event containing the set of products upon completion. |
string | storeName | The name of the store the products are from. |
GetProducts(string?)
The set of products in the catalog.
Declaration
public List<ProductDefinition> GetProducts(string? storeName = null)
Parameters
Type | Name | Description |
---|---|---|
string | storeName |
Returns
Type | Description |
---|---|
List<Product |