RechargeSharp.Entities.EntityFrameworkCore
11.0.0
.NET 5.0
This package targets .NET 5.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package RechargeSharp.Entities.EntityFrameworkCore --version 11.0.0
NuGet\Install-Package RechargeSharp.Entities.EntityFrameworkCore -Version 11.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RechargeSharp.Entities.EntityFrameworkCore" Version="11.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RechargeSharp.Entities.EntityFrameworkCore --version 11.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RechargeSharp.Entities.EntityFrameworkCore, 11.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RechargeSharp.Entities.EntityFrameworkCore as a Cake Addin #addin nuget:?package=RechargeSharp.Entities.EntityFrameworkCore&version=11.0.0 // Install RechargeSharp.Entities.EntityFrameworkCore as a Cake Tool #tool nuget:?package=RechargeSharp.Entities.EntityFrameworkCore&version=11.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RechargeSharp, a C# library for RechargePayments
Get it here https://www.nuget.org/packages/RechargeSharp/
Built to work with the api documented at https://developer.rechargepayments.com/
Please feel free to submit issues and pull requests on github
Quickstart
Dependency injection
If you set up your appsettings.json like this:
{
"RechargeConfiguration": {
"ApiKey": [
"1",
"2",
"3",
"4"
],
"Url": "https://api.rechargeapps.com/"
}
}
Add RechargeSharp to dependency injection. After that the services will be constructor injected.
// this example shows how you can get a list of api keys from configuration that the services will swap between automatically when encountering throttling.
services.AddRechargeSharp(opts =>
{
opts.ApiKeyArray = _configuration.GetSection("RechargeConfiguration:ApiKey").GetChildren().Select(x => x.Value).ToArray();
opts.WebhookApiKey = _configuration["RechargeConfiguration:ApiKey:0"];
})
// if you only have 1 api key you wish to work with you can do the following.
services.AddRechargeSharp(opts =>
{
opts.ApiKeyArray = new[] { "apikey" });
opts.WebhookApiKey = "apikey";
}
Subscriptions
public class SubscriptionTestClass {
private readonly SubscriptionService _subscriptionService;
// constructor inject the subscription service to start working with subscriptions.
public SubscriptionTestClass(SubscriptionService subscriptionService){
_subscriptionService = subscriptionService;
}
public async Task DoStuff(){
// get all subscriptions with status ACTIVE and created after two months ago.
var subscriptions = await subscriptionService.GetAllSubscriptionsWithParamsAsync(status: "ACTIVE", createdAtMin: DateTime.Today.AddMonths(-2));
// iterate results and print subscription Id.
foreach (var subscription in subscriptions)
{
Console.WriteLine(subscription.Id);
}
}
}
Customers
public class CustomerTestClass {
private readonly CustomerService _customerService;
// constructor inject the customer service to start working with customers.
public CustomerTestClass(CustomerService customerService){
_customerService = customerService;
}
public async Task DoStuff(){
// get all customers created in the last two days.
var customers = await _customerService.GetAllCustomersWithParamsAsync(createdAtMin: DateTime.Now.AddDays(-2));
// iterate results and print whether the customer has a valid payment method.
foreach (var customer in customers)
{
Console.WriteLine(customer.HasValidPaymentMethod);
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- RechargeSharp.Entities (>= 11.0.0)
-
.NETStandard 2.1
- RechargeSharp.Entities (>= 11.0.0)
-
net5.0
- RechargeSharp.Entities (>= 11.0.0)
-
net6.0
- RechargeSharp.Entities (>= 11.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
12.2.4 | 692 | 10/8/2024 |
12.2.3 | 748 | 10/30/2023 |
12.2.2 | 1,470 | 11/8/2022 |
12.2.1 | 567 | 9/13/2022 |
12.2.0 | 479 | 9/13/2022 |
12.1.1 | 686 | 9/5/2022 |
12.1.0-alpha.2 | 356 | 7/27/2022 |
12.1.0-alpha.1 | 124 | 7/27/2022 |
12.0.0-alpha.1 | 786 | 6/2/2022 |
11.2.0-alpha.2 | 351 | 5/24/2022 |
11.2.0-alpha.1 | 127 | 4/26/2022 |
11.1.0-beta.5 | 119 | 3/23/2022 |
11.1.0-beta.4 | 3,247 | 3/2/2022 |
11.1.0-beta.3 | 309 | 2/24/2022 |
11.1.0-beta.1 | 337 | 2/17/2022 |
11.0.0 | 708 | 2/7/2022 |
11.0.0-alpha.6 | 411 | 1/10/2022 |
11.0.0-alpha.4 | 1,936 | 12/14/2021 |
11.0.0-alpha.3 | 303 | 12/12/2021 |
11.0.0-alpha.2 | 159 | 12/10/2021 |
11.0.0-alpha.1 | 154 | 12/10/2021 |
10.0.0-alpha.4 | 170 | 12/9/2021 |
10.0.0-alpha.3 | 162 | 12/9/2021 |
10.0.0-alpha.2 | 157 | 12/9/2021 |
10.0.0-alpha.1 | 163 | 12/8/2021 |
Fixed typos