Interface ICatalogProvider
Catalog Provider, facilitating the retrieval of a catalog's products.
Inherited Members
Namespace: UnityEngine.Purchasing.Extension
Assembly: Unity.Purchasing.dll
Syntax
public interface ICatalogProvider : IBaseCatalogProvider
Methods
AddProduct(string, ProductType)
Add a product to the configuration builder.
Declaration
void AddProduct(string id, ProductType type)
Parameters
Type | Name | Description |
---|---|---|
string | id | The id of the product. |
ProductType | type | The type of the product. |
AddProduct(string, ProductType, StoreSpecificIds?)
Add a product to the configuration builder.
Declaration
void AddProduct(string id, ProductType type, StoreSpecificIds? storeIDs)
Parameters
Type | Name | Description |
---|---|---|
string | id | The id of the product. |
ProductType | type | The type of the product. |
StoreSpecificIds | 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
void AddProduct(string id, ProductType type, StoreSpecificIds? storeIDs, IEnumerable<PayoutDefinition> payouts)
Parameters
Type | Name | Description |
---|---|---|
string | id | The id of the product. |
ProductType | type | The type of the product. |
StoreSpecificIds | storeIDs | The object representing store IDs the product is to be added to. |
IEnumerable<PayoutDefinition> | payouts | The enumerator of the payout definitions of the product. |
AddProduct(string, ProductType, StoreSpecificIds?, PayoutDefinition)
Add a product to the configuration builder.
Declaration
void AddProduct(string id, ProductType type, StoreSpecificIds? storeIDs, PayoutDefinition payout)
Parameters
Type | Name | Description |
---|---|---|
string | id | The id of the product. |
ProductType | type | The type of the product. |
StoreSpecificIds | storeIDs | The object representing store IDs the product is to be added to. |
PayoutDefinition | payout | The payout definition of the product. |
AddProducts(IEnumerable<ProductDefinition>, Dictionary<string, StoreSpecificIds>?)
Add multiple products to the configuration builder.
Declaration
void AddProducts(IEnumerable<ProductDefinition> products, Dictionary<string, StoreSpecificIds>? storeIDsByProductId = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ProductDefinition> | products | The enumerator of the product definitions to be added. The ProductDefinition.storeSpecificId will not be used since the catalog can be the same for multiple stores. Use the storeIDsByProductId instead. |
Dictionary<string, StoreSpecificIds> | storeIDsByProductId | The object representing store IDs for each product id. |
FetchProducts(Action<List<ProductDefinition>>, string)
Fetch all the products in the catalog, asynchronously.
Declaration
void FetchProducts(Action<List<ProductDefinition>> callback, string storeName)
Parameters
Type | Name | Description |
---|---|---|
Action<List<ProductDefinition>> | callback | Event containing the set of products upon completion. |
string | storeName | The name of the store the products are from. |
GetProducts(string?)
The list of products in the catalog.
Declaration
List<ProductDefinition> GetProducts(string? storeName = null)
Parameters
Type | Name | Description |
---|---|---|
string | storeName | The name of the store to retrieve products from. If null, retrieves products without store-specific IDs. |
Returns
Type | Description |
---|---|
List<ProductDefinition> | A list of ProductDefinition objects representing the products in the catalog. |