2.0.0: Rudder.Core 2.0.0 DLL, samples and skill docs on slugs and environments
CI / check (push) Successful in 2s
CI / publish (push) Has been skipped

Claude-Session: https://claude.ai/code/session_01SMCvdwDmuxoaqGgvGBLk1V
This commit is contained in:
edmand46
2026-09-06 22:25:33 +03:00
parent 01e27bde2c
commit b18c59450c
11 changed files with 73 additions and 29 deletions
@@ -81,8 +81,8 @@ namespace RudderSdk.Unity.Samples
if (offer == null)
throw new InvalidOperationException("Store " + storeSlug + " has no offers.");
_page.Log("Stores.PurchaseAsync(" + storeSlug + ", " + offer.Id + ")");
var response = await client.Stores.PurchaseAsync(storeSlug, offer.Id);
_page.Log("Stores.PurchaseAsync(" + storeSlug + ", " + offer.Slug + ")");
var response = await client.Stores.PurchaseAsync(storeSlug, offer.Slug);
if (response != null && response.Success != true)
throw new InvalidOperationException(response.Error ?? "Purchase rejected");
@@ -55,11 +55,11 @@ namespace RudderSdk.Unity.Samples
foreach (var offer in store.Offers)
{
var slug = store.Slug;
var offerId = offer.Id;
var name = string.IsNullOrEmpty(offer.Name) ? offer.Id : offer.Name;
var offerSlug = offer.Slug;
var name = string.IsNullOrEmpty(offer.Name) ? offer.Slug : offer.Name;
var price = offer.Price == null ? "free" : offer.Price.Amount + " " + offer.Price.Currency;
if (_page.Button("Buy " + name + " — " + price))
_page.Run(this, () => Buy(slug, offerId, name));
_page.Run(this, () => Buy(slug, offerSlug, name));
}
}
});
@@ -74,11 +74,11 @@ namespace RudderSdk.Unity.Samples
_page.SetStatus(_stores.Count == 0 ? "No stores" : "Loaded " + _stores.Count + " store(s)");
}
async Task Buy(string storeSlug, string offerId, string name)
async Task Buy(string storeSlug, string offerSlug, string name)
{
var client = Rudder.Initialize();
_page.Log("Stores.PurchaseAsync(" + storeSlug + ", " + offerId + ")");
var response = await client.Stores.PurchaseAsync(storeSlug, offerId);
_page.Log("Stores.PurchaseAsync(" + storeSlug + ", " + offerSlug + ")");
var response = await client.Stores.PurchaseAsync(storeSlug, offerSlug);
if (response != null && response.Success != true)
throw new InvalidOperationException(response.Error ?? "Purchase rejected");