playfab_ex v0.2.2 PlayfabEx.Client.Default.PlayerItemManagement
Link to this section Summary
Functions
Increments the user’s balance of the specified virtual currency by the stated amount
Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual currency balances as appropriate
Consume uses of a consumable item. When all uses are consumed, it will be removed from the player’s inventory
Retrieves the specified character’s current inventory of virtual goods
For payments flows where the provider requires playfab (the fulfiller) to initiate the transaction, but the client completes the rest of the flow. In the Xsolla case, the token returned here will be passed to Xsolla by the client to create a cart. Poll GetPurchase using the returned OrderId once you’ve completed the payment
Retrieves a purchase along with its current PlayFab status. Returns inventory items from the purchase that are still active
Retrieves the user’s current inventory of virtual goods
Selects a payment option for purchase order created via StartPurchase
Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what the client believes the price to be. This lets the server fail the purchase if the price has changed
Adds the virtual goods associated with the coupon to the user’s inventory. Coupons can be generated via the Economy->Catalogs tab in the PlayFab Game Manager
Creates an order for a list of items from the title catalog
Decrements the user’s balance of the specified virtual currency by the stated amount. It is possible to make a VC balance negative with this API
Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem
Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem
Link to this section Functions
add_user_virtual_currency(map()) :: {:ok, map()} | {:error, String.t()}
Increments the user’s balance of the specified virtual currency by the stated amount
@link https://api.playfab.com/documentation/client/method/AddUserVirtualCurrency
confirm_purchase(map()) :: {:ok, map()} | {:error, String.t()}
Confirms with the payment provider that the purchase was approved (if applicable) and adjusts inventory and virtual currency balances as appropriate
@link https://api.playfab.com/documentation/client/method/ConfirmPurchase
consume_item(map()) :: {:ok, map()} | {:error, String.t()}
Consume uses of a consumable item. When all uses are consumed, it will be removed from the player’s inventory.
@link https://api.playfab.com/documentation/client/method/ConsumeItem
get_character_inventory(map()) :: {:ok, map()} | {:error, String.t()}
Retrieves the specified character’s current inventory of virtual goods
@link https://api.playfab.com/documentation/client/method/GetCharacterInventory
get_payment_token(map()) :: {:ok, map()} | {:error, String.t()}
For payments flows where the provider requires playfab (the fulfiller) to initiate the transaction, but the client completes the rest of the flow. In the Xsolla case, the token returned here will be passed to Xsolla by the client to create a cart. Poll GetPurchase using the returned OrderId once you’ve completed the payment.
@link https://api.playfab.com/documentation/client/method/GetPaymentToken
get_purchase(map()) :: {:ok, map()} | {:error, String.t()}
Retrieves a purchase along with its current PlayFab status. Returns inventory items from the purchase that are still active.
@link https://api.playfab.com/documentation/client/method/GetPurchase
get_user_inventory(map()) :: {:ok, map()} | {:error, String.t()}
Retrieves the user’s current inventory of virtual goods
@link https://api.playfab.com/documentation/client/method/GetUserInventory
pay_for_purchase(map()) :: {:ok, map()} | {:error, String.t()}
Selects a payment option for purchase order created via StartPurchase
@link https://api.playfab.com/documentation/client/method/PayForPurchase
purchase_item(map()) :: {:ok, map()} | {:error, String.t()}
Buys a single item with virtual currency. You must specify both the virtual currency to use to purchase, as well as what the client believes the price to be. This lets the server fail the purchase if the price has changed.
@link https://api.playfab.com/documentation/client/method/PurchaseItem
redeem_coupon(map()) :: {:ok, map()} | {:error, String.t()}
Adds the virtual goods associated with the coupon to the user’s inventory. Coupons can be generated via the Economy->Catalogs tab in the PlayFab Game Manager.
@link https://api.playfab.com/documentation/client/method/RedeemCoupon
start_purchase(map()) :: {:ok, map()} | {:error, String.t()}
Creates an order for a list of items from the title catalog
@link https://api.playfab.com/documentation/client/method/StartPurchase
subtract_user_virtual_currency(map()) :: {:ok, map()} | {:error, String.t()}
Decrements the user’s balance of the specified virtual currency by the stated amount. It is possible to make a VC balance negative with this API.
@link https://api.playfab.com/documentation/client/method/SubtractUserVirtualCurrency
unlock_container_instance(map()) :: {:ok, map()} | {:error, String.t()}
Opens the specified container, with the specified key (when required), and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem.
@link https://api.playfab.com/documentation/client/method/UnlockContainerInstance
unlock_container_item(map()) :: {:ok, map()} | {:error, String.t()}
Searches target inventory for an ItemInstance matching the given CatalogItemId, if necessary unlocks it using an appropriate key, and returns the contents of the opened container. If the container (and key when relevant) are consumable (RemainingUses > 0), their RemainingUses will be decremented, consistent with the operation of ConsumeItem.
@link https://api.playfab.com/documentation/client/method/UnlockContainerItem