MarketplaceServiceクラス
ひとことで言うと
ゲームパスや開発者製品など、ゲーム内での購入を扱うサービスです。
公式の説明(英語):The service responsible for in-experience transactions.
クラスの関係
メソッド(24)
| 名前と書き方 | 説明 |
|---|---|
BindReceiptHandlerMarketplaceService:BindReceiptHandler(transactionType: ReceiptType, handler: Function, filter: Array?): RBXScriptConnection | Registers a callback to process receipts of a specific type. |
GetDeveloperProductsAsyncMarketplaceService:GetDeveloperProductsAsync(): Instance | Returns a Pages object which contains information for all of the current experience's developer products. |
GetProductInfoAsyncMarketplaceService:GetProductInfoAsync(assetId: int64, infoType: InfoType): Dictionary | Returns the product information of an asset using its asset ID. |
GetRobloxSubscriptionDetailsAsyncMarketplaceService:GetRobloxSubscriptionDetailsAsync(user: Player): Dictionary | Returns the subscription details for the given user for the Roblox Subscription ecosystem. |
GetSubscriptionProductInfoAsyncMarketplaceService:GetSubscriptionProductInfoAsync(subscriptionId: string): Dictionary | Returns the product information of a subscription for the given subscriptionId. |
GetUsersPriceLevelsAsyncMarketplaceService:GetUsersPriceLevelsAsync(userIds: Array): List<PriceLevelInfo> | Returns the regionalized price levels of users, representing the recommended price for an item in each user's regional market. |
GetUserSubscriptionDetailsAsyncMarketplaceService:GetUserSubscriptionDetailsAsync(user: Player, subscriptionId: string): Dictionary | Returns a table that contains the details of the user's subscription for a given subscriptionId. |
GetUserSubscriptionPaymentHistoryAsyncMarketplaceService:GetUserSubscriptionPaymentHistoryAsync(user: Player, subscriptionId: string): Array | Returns an Library.table|Array that contains up to one year of the user's subscription payment history for the given subscriptionId. |
GetUserSubscriptionStatusAsyncMarketplaceService:GetUserSubscriptionStatusAsync(user: Player, subscriptionId: string): Dictionary | Returns a table that contains the subscription status of the user for the given subscriptionId. |
OpenShopMarketplaceService:OpenShop(player: Player): () | Opens a personalized in-game Shop for the given player. |
PlayerOwnsAssetAsyncMarketplaceService:PlayerOwnsAssetAsync(player: Instance, assetId: int64): boolean | Returns whether the given user has the given asset. |
PlayerOwnsBundleAsyncMarketplaceService:PlayerOwnsBundleAsync(player: Player, bundleId: int64): boolean | Returns whether the given player owns the given bundle. |
PromptBulkPurchaseMarketplaceService:PromptBulkPurchase(player: Player, lineItems: Array, options: Dictionary): () | Prompts a user to purchase multiple avatar items with the given assetId or bundleId. |
PromptBundlePurchaseMarketplaceService:PromptBundlePurchase(player: Instance, bundleId: int64): () | Prompts a user to purchase a bundle with the given bundleId. |
PromptCancelSubscriptionMarketplaceService:PromptCancelSubscription(user: Player, subscriptionId: string): () | Prompts a user to cancel a subscription for the given subscriptionId. |
PromptGamePassPurchaseMarketplaceService:PromptGamePassPurchase(player: Instance, gamePassId: int64): () | Prompts a user to purchase a pass with the given gamePassId. |
PromptProductPurchaseMarketplaceService:PromptProductPurchase(player: Instance, productId: int64, equipIfPurchased: boolean, currencyType: CurrencyType): () | Prompts a user to purchase a developer product with the given productId. |
PromptPurchaseMarketplaceService:PromptPurchase(player: Instance, assetId: int64, equipIfPurchased: boolean, currencyType: CurrencyType): () | Prompts a user to purchase an item with the given assetId. Does not work for USD Creator Store purchases. |
PromptRobloxSubscriptionPurchaseMarketplaceService:PromptRobloxSubscriptionPurchase(user: Player): () | Prompts a user to purchase a Roblox Plus subscription. |
PromptRobuxTransferAsyncMarketplaceService:PromptRobuxTransferAsync(sender: Player, receiverUserId: int64, amount: int64): string | Initiates a Robux transfer from the sender to another user. |
PromptSubscriptionPurchaseMarketplaceService:PromptSubscriptionPurchase(user: Player, subscriptionId: string): () | Prompts a user to purchase a subscription for the given subscriptionId. |
RankProductsAsyncMarketplaceService:RankProductsAsync(productIdentifiers: Array): List<RankedItem> | Takes a list of product IDs and returns a personalized ordered list of those products. |
RecommendTopProductsAsyncMarketplaceService:RecommendTopProductsAsync(infoTypes: Array): List<RankedItem> | - Takes an array of InfoType and returns up to 50 items representing the products a user is most likely to engage with and purchase. |
UserOwnsGamePassAsyncMarketplaceService:UserOwnsGamePassAsync(userId: User, gamePassId: int64): boolean | Returns true if the player with the given Class.Player.UserId|UserId owns the pass with the given gamePassId. |
イベント(8)
| 名前と書き方 | 説明 |
|---|---|
PromptBulkPurchaseFinishedMarketplaceService.PromptBulkPurchaseFinished(player: Instance, status: MarketplaceBulkPurchasePromptStatus, results: Dictionary) | Fires when a purchase prompt for bulk avatar items is closed. |
PromptBundlePurchaseFinishedMarketplaceService.PromptBundlePurchaseFinished(player: Instance, bundleId: int64, wasPurchased: boolean) | Fires when a bundle purchase prompt closes. |
PromptGamePassPurchaseFinishedMarketplaceService.PromptGamePassPurchaseFinished(player: Instance, gamePassId: int64, wasPurchased: boolean) | Fires when a purchase prompt for a pass is closed. |
PromptPremiumPurchaseFinishedMarketplaceService.PromptPremiumPurchaseFinished() | Fires when a purchase prompt for Roblox Premium is closed. |
PromptProductPurchaseFinishedMarketplaceService.PromptProductPurchaseFinished(userId: int64, productId: int64, isPurchased: boolean) | Fires when a purchase prompt for a developer product is closed. Do not use this event to process purchases. |
PromptPurchaseFinishedMarketplaceService.PromptPurchaseFinished(player: Instance, assetId: int64, isPurchased: boolean) | Fires when a purchase prompt for an affiliate gear sale or other asset is closed. Does **not** fire for developer product or pass prompts. |
PromptRobloxSubscriptionPurchaseFinishedMarketplaceService.PromptRobloxSubscriptionPurchaseFinished(user: Player, didTryPurchasing: boolean) | Fires when a purchase prompt for Roblox Plus is closed. |
PromptSubscriptionPurchaseFinishedMarketplaceService.PromptSubscriptionPurchaseFinished(user: Player, subscriptionId: string, didTryPurchasing: boolean) | Fires when a purchase prompt for a subscription is closed. |
コールバック(1)
| 名前と書き方 | 説明 |
|---|---|
ProcessReceiptMarketplaceService:ProcessReceipt(receiptInfo: Dictionary): ProductPurchaseDecision | A callback to process receipts of developer product purchases. |
受け継いでいるメンバー
Instance から受け継いでいるもの(46)
Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged
Object から受け継いでいるもの(4)
英語の説明とメンバーの一覧は、Roblox Creator Documentation(MarketplaceService)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。