Skip to main content

Ready to market your stellar app?

Samsung Developer Program is your gateway to app monetization success.

Learn More

Samsung Developer Program

Inventory Method Details

ToString

public override string ToString()

Returns a string of the purchase map and SKU map.

Returns:

A string containing the purchase map and SKU map.

GetSkuDetails

public SkuDetailsGetSkuDetails(string sku)

Get the details of the specified SKU item.

Parameters:

sku

SKU identifier of the item

Returns:

SkuDetails of the specified SKU when the SKU exists in the _skuMap. Returns null when the SKU does not exist.

GetPurchase

public Purchase GetPurchase(string sku)

Gets purchase information for the specified SKU item.

Parameters:

sku SKU identifier of the item

Returns:

Returns purchase information for the specified item. Returns null when there is no purchase.

HasPurchase

public Purchase HasPurchase(string sku)

Determines whether or not a purchase exists of the specified SKU item, and returns the results.

Parameters:

sku

SKU identifier of the item

Returns:

Returns true when a purchase for the item exists. Returns false otherwise.

HasDetails

public boolHasDetails(string sku)

Determines whether or not details exist about the specified SKU item, and returns the results.

Parameters:

sku

SKU identifier of the item

Returns:

Returns true when item details are available. Returns false otherwise.

ErasePurchase

public void ErasePurchase(string sku)

Deletes the purchase information of the specified SKU item from the inventory.

Parameters:

sku

SKU identifier of the item

GetAllOwnedSkus()

public List<string> GetAllOwnedSkus()

Gets the list of all purchased item SKUs by the user.

Returns:

Returns a list of all purchased item SKUs.

GetAllOwnedSkus

public List<string> GetAllOwnedSkus(string itemType)

Gets the list of all item SKUs of the specified item type that were purchased by the user.

Parameters:

itemType

Type of item:

inapp            Consumable or non-consumable item

subs              Non-recurring or auto-recurring subscription item

Returns:

Returns a list of all purchased SKUs of the requested item type.

GetAllPurchases

public List<Purchase> GetAllPurchases()

Gets all item SKUs purchased by the user.

Returns:

Returns a list of all SKUs in the _purchaseMap.

GetAllAvailableSkus

public List<SkuDetails> GetAllAvailableSkus()

Gets the SKUs of all available items.

Returns:

Returns a list of SKUs of all items available for purchase.

AddSkuDetails

public void AddSkuDetails(SkuDetails d)

Adds the item details in the specified object instance to the associated SkuDetails.

Parameters:

d

Name of the SKU details object instance

AddPurchase

public void AddPurchase(Purchase p)

Adds the purchase details in the specified object instance to the associated SKU item.

Parameters:

p

Name of the Purchase object instance


  • Was this article helpful?