ProductListing class

ProductListing class

Provides localized information that details an add-on (also called an in-app product or IAP).

Syntax


/* For information about creating or accessing this object, see Remarks. */

Members

The ProductListing class has these types of members:

Properties

The ProductListing class has these properties.

PropertyAccess typeDescription

CurrencyCode

Read-only

Gets the currency code associated with the user's market, such as USD or CAD.

Description

Read-only

Gets the description for the add-on (also called an in-app product or IAP).

FormattedBasePrice

Read-only

Gets the base price for the add-on (also called an in-app product or IAP) with the appropriate formatting for the current market.

FormattedPrice

Read-only

Gets the purchase price for the in-app product with the appropriate formatting for the current market.

ImageUri

Read-only

Gets the URI of the image associated with the add-on (also called an in-app product or IAP).

IsOnSale

Read-only

Gets a value that indicates whether the add-on (also called an in-app product or IAP) is on sale.

Keywords

Read-only

Gets the list of keywords associated with the add-on (also called an in-app product or IAP). These keywords are useful for filtering product lists by keyword, for example, when calling LoadListingInformationByKeywordsAsync.

Name

Read-only

Gets the descriptive name of the add-on (also called an in-app product or IAP) that is displayed customers in the current market.

ProductId

Read-only

Gets the product ID for the add-on (also called an in-app product or IAP).

ProductType

Read-only

Gets the type of this add-on (also called an in-app product or IAP). Possible values are defined by ProductType.

SaleEndDate

Read-only

Gets the end date of the sale period for the add-on (also called an in-app product or IAP).

Tag

Read-only

Gets the custom developer data string (also called a tag) that contains custom information about an add-on (also called an in-app product or IAP). This string corresponds to the value of the Custom developer data field in the properties page for the add-on in the Windows Dev Center dashboard.

 

Remarks

You access this object by picking an element of the collection that the ProductListings property of the ListingInformation object returns.

Examples

This code example here shows how to get the ListingInformation from simulated app data and then get the ProductListing object an add-on.


// get current app object using the simulator interface
currentApp = Windows.ApplicationModel.Store.CurrentAppSimulator;

// get the listing information for the products this app supports
currentApp.loadListingInformationAsync().then(
    function (listing) {
        // loadListingInformationAsync returns the ListingInformation object in listing.
        // now get info about a specific product and write it to the screen.
        thisProduct = listing.productListings.lookup("product1");
        id("purchasePrice").innerText = "You can buy " + thisProduct.name +
            " for: " + thisProduct.formattedPrice + ".";
    }
);


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel.Store
Windows::ApplicationModel::Store [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel.Store
Windows::ApplicationModel::Store [C++]

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

See also

Object
ListingInformation
ProductListings

 

 

Show:
© 2017 Microsoft