Skip to content

Commit

Permalink
Overwrite method for purchasing a single catalog item
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikkel Sørensen authored and kirre-bylund committed Feb 9, 2024
1 parent a314676 commit 5c35529
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Runtime/Game/LootLockerSDKManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4414,6 +4414,25 @@ public static void ActivateRentalAsset(int assetInstanceID, Action<LootLockerAct
LootLockerAPIManager.ActivateRentalAsset(data, onComplete);
}

/// <summary>
/// Purchase one catalog item using a specified wallet
/// </summary>
/// <param name="walletID">The id of the wallet to use for the purchase</param>
/// <param name="itemID">The id of the item that you want to purchase</param>
/// <param name="quantity">The amount that you want to purchase the item </param>
/// <param name="onComplete">onComplete Action for handling the response</param>
public static void LootLockerPurchaseSingleCatalogItem(string walletID, string itemID, int quantity, Action<LootLockerPurchaseCatalogItemResponse> onComplete)
{
LootLockerCatalogItemAndQuantityPair item = new LootLockerCatalogItemAndQuantityPair();

item.catalog_listing_id = itemID;
item.quantity = quantity;

LootLockerCatalogItemAndQuantityPair[] items = { item };

LootLockerPurchaseCatalogItems(walletID, items, onComplete);
}

/// <summary>
/// Purchase one or more catalog items using a specified wallet
/// </summary>
Expand Down

0 comments on commit 5c35529

Please sign in to comment.