Skip to content

Commit

Permalink
Merge pull request #26 from thisisthekap/br_25_fix_extension_method_n…
Browse files Browse the repository at this point in the history
…aming

renamed RestoreTransactionsAsync to RestorePurchasesAsync
  • Loading branch information
thisisthekap authored Oct 17, 2022
2 parents 9e79ef8 + 35d7275 commit 54a20c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions Xamarin.RevenueCat.iOS.Extensions/RCPurchasesExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Threading;
using System;
using System.Threading;
using System.Threading.Tasks;
using Foundation;
using RevenueCat;
Expand Down Expand Up @@ -89,7 +90,7 @@ public static Task<PurchaseSuccessInfo> PurchasePackageAsync(this RCPurchases pu
return tcs.Task;
}

public static Task<RCCustomerInfo> RestoreTransactionsAsync(this RCPurchases purchases,
public static Task<RCCustomerInfo> RestorePurchasesAsync(this RCPurchases purchases,
CancellationToken cancellationToken = default)
{
var tcs = new TaskCompletionSource<RCCustomerInfo>();
Expand All @@ -108,6 +109,13 @@ public static Task<RCCustomerInfo> RestoreTransactionsAsync(this RCPurchases pur
return tcs.Task;
}

[Obsolete("Obsolete due to confusing naming. Use RestorePurchasesAsync instead.")]
public static Task<RCCustomerInfo> RestoreTransactionsAsync(this RCPurchases purchases,
CancellationToken cancellationToken = default)
{
return RestorePurchasesAsync(purchases, cancellationToken);
}

public static Task<RCCustomerInfo> GetCustomerInfoAsync(this RCPurchases purchases,
CancellationToken cancellationToken = default)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<IsPackable>true</IsPackable>
<PackageId>Xamarin.RevenueCat.iOS.Extensions</PackageId>
<Description>Contains convenience methods and async extensions for Xamarin.RevenueCat.iOS</Description>
<Version>4.9.0.2</Version>
<Version>4.9.0.3</Version>
<Authors>Christian Kapplmüller</Authors>
<Company>fun.music IT GmbH</Company>
<PackageOutputPath>nugetoutput</PackageOutputPath>
Expand Down

0 comments on commit 54a20c5

Please sign in to comment.