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. |
Product |
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. |
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
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
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
void AddProducts(IEnumerable<ProductDefinition> products, Dictionary<string, StoreSpecificIds>? storeIDsByProductId = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Product |
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, Store |
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<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
List<ProductDefinition> GetProducts(string? storeName = null)
Parameters
Type | Name | Description |
---|---|---|
string | storeName |
Returns
Type | Description |
---|---|
List<Product |