ProductListing クラス

定義

アドオンの詳細を示すローカライズされた情報を提供します (アプリ内製品または IAP とも呼ばれます)。

public ref class ProductListing sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ProductListing final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ProductListing
Public NotInheritable Class ProductListing
継承
Object Platform::Object IInspectable ProductListing
属性

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)

このコード例では、シミュレートされたアプリ データから ListingInformation を取得し、ProductListing オブジェクトにアドオンを取得する方法を示します。

// get the license info for this app from the simulator
ListingInformation listing = await CurrentAppSimulator.LoadListingInformationAsync();

// get the ProductListing object for the product named "product1"
ProductListing thisProduct = listing.ProductListings["product1"];

// format the purchase string or this in-app offer
String purchasePrice = "You can buy " + thisProduct.Name + 
    " for: " + thisProduct.FormattedPrice + ".";

注釈

このオブジェクトにアクセスするには、ListingInformation オブジェクトの ProductListings プロパティが返すコレクションの要素を選択します。

バージョン履歴

Windows のバージョン SDK バージョン 追加された値
1511 10586 CurrencyCode
1511 10586 FormattedBasePrice
1511 10586 IsOnSale
1511 10586 SaleEndDate

プロパティ

CurrencyCode

USDCAD など、ユーザーの市場に関連付けられている通貨コードを取得します。

Description

アドオンの説明を取得します (アプリ内製品または IAP とも呼ばれます)。

FormattedBasePrice

現在の市場に適した書式を持つアドオン (アプリ内製品または IAP とも呼ばれます) の基本価格を取得します。

FormattedPrice

現在の市場に適した書式を使用して、アプリ内製品の購入価格を取得します。

ImageUri

アドオン (アプリ内製品または IAP とも呼ばれます) に関連付けられているイメージの URI を取得します。

IsOnSale

アドオン (アプリ内製品または IAP とも呼ばれます) が販売されているかどうかを示す値を取得します。

Keywords

アドオンに関連付けられているキーワードの一覧を取得します (アプリ内製品または IAP とも呼ばれます)。 これらの文字列は、パートナー センターのアドオンのプロパティ ページの [キーワード] フィールドの値に対応します。 これらのキーワードは、LoadListingInformationByKeywordsAsync を呼び出すときなど、キーワード (keyword)で製品リストをフィルター処理する場合に便利です。

Name

現在の市場の顧客に表示されるアドオン (アプリ内製品または IAP とも呼ばれます) のわかりやすい名前を取得します。

ProductId

この ProductListing が表すアドオンの製品 ID を取得します。

ProductType

このアドオンの種類を取得します (アプリ内製品または IAP とも呼ばれます)。 指定できる値は ProductType によって定義されます。

SaleEndDate

アドオン (アプリ内製品または IAP とも呼ばれます) の販売期間の終了日を取得します。

Tag

アドオン (アプリ内製品または IAP とも呼ばれます) に関するカスタム情報を含むカスタム開発者データ文字列 (タグとも呼ばれます) を取得します。 この文字列は、パートナー センターのアドオンのプロパティ ページの [カスタム開発者データ] フィールドの値に対応します。

適用対象

こちらもご覧ください