StoreAvailability Class

Definition

Represents a specific instance of a product SKU that can be purchased.

public ref class StoreAvailability sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Services.Store.StoreContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class StoreAvailability final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Services.Store.StoreContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class StoreAvailability
Public NotInheritable Class StoreAvailability
Inheritance
Object Platform::Object IInspectable StoreAvailability
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Services.Store.StoreContract (introduced in v1.0)

Remarks

Products in the Store are organized in a hierarcy of product, SKU, and availability objects. Products are represented by StoreProduct objects. The SKUs for each product are represented by StoreSku objects, and the availabilities for each SKU are represented by StoreAvailability objects. For more information, see In-app purchases and trials.

To access the availabilities for a SKU, use the Availabilities property of the StoreSku object in which you are interested.

Properties

EndDate

Gets the end date for the current SKU availability.

ExtendedJsonData

Gets complete data for the current SKU availability from the Store in JSON format.

Price

Gets price info for the current SKU availability, including the base price, current price, and sale info.

StoreId

Gets the Store ID of the current SKU availability from the Microsoft Store catalog.

Methods

RequestPurchaseAsync()

Requests the purchase of the current SKU availability and displays the UI that is used to complete the transaction via the Microsoft Store.

Important

This method must be called on the UI thread.

RequestPurchaseAsync(StorePurchaseProperties)

Requests the purchase of the current SKU availability and displays the UI that is used to complete the transaction via the Microsoft Store. This method provides the option to specify additional details for a specific offer within a large catalog of products that are represented by a single listing in the Microsoft Store, including the product name to display to the user during the purchase.

Important

This method must be called on the UI thread.

Applies to

See also