diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42d81fc962..863a85dc8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,9 +33,10 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: + # see: https://docs.stripe.com/sdks/versioning?server=dotnet#stripe-sdk-language-version-support-policy + # even numbers are LTS + # TODO: add 9.0.x; https://go/j/RUN_DEVSDK-1957 dotnet-version: | - 2.1.x - 3.1.x 5.0.x 6.0.x 7.0.404 diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0f90d4e52d..7365ccab62 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -61dc2fe030518f02a4eb2cdc3a7a70d3ce01c82f \ No newline at end of file +61dc2fe030518f02a4eb2cdc3a7a70d3ce01c82f diff --git a/README.md b/README.md index ba80daa5cd..ca8a2ef687 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Build Status](https://github.com/stripe/stripe-dotnet/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-dotnet/actions?query=branch%3Amaster) [![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-dotnet/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-dotnet?branch=master) -The official [Stripe][stripe] .NET library, supporting .NET Standard 2.0+, .NET Core 3.1+, and .NET Framework 4.6.1+. +The official [Stripe][stripe] .NET library, supporting .NET Standard 2.0+, .NET Core 5+, and .NET Framework 4.6.2+. ## Installation @@ -35,6 +35,12 @@ From within Visual Studio: 5. Click on the Stripe.net package, select the appropriate version in the right-tab and click _Install_. +### Requirements + +Per our [Language Version Support Policy](https://docs.stripe.com/sdks/versioning?server=dotnet#stripe-sdk-language-version-support-policy), we currently support **.NET Standard 2.0+, .NET Core 5+, and .NET Framework 4.6.2+.**. + +Support for .NET Core versions 5 & 7 are deprecated and will be removed in the next major version. Support for version 6 will be removed in a future version. Read more and see the full schedule in the docs: https://docs.stripe.com/sdks/versioning?server=dotnet#stripe-sdk-language-version-support-policy + ## Documentation For a comprehensive list of examples, check out the [API diff --git a/src/Stripe.net/Infrastructure/Public/SystemNetHttpClient.cs b/src/Stripe.net/Infrastructure/Public/SystemNetHttpClient.cs index 0f09dfe936..e20758de46 100644 --- a/src/Stripe.net/Infrastructure/Public/SystemNetHttpClient.cs +++ b/src/Stripe.net/Infrastructure/Public/SystemNetHttpClient.cs @@ -37,10 +37,10 @@ public class SystemNetHttpClient : IHttpClient "netcoreapp3.1" #elif NETSTANDARD2_0 "netstandard2.0" -#elif NET461 - "net461" +#elif NET462 + "net462" #else -#error "Unknown target framework" +#warning "Unknown target framework" #endif ; diff --git a/src/Stripe.net/Services/_base/Service.cs b/src/Stripe.net/Services/_base/Service.cs index 70f8f02052..62e72aef4a 100644 --- a/src/Stripe.net/Services/_base/Service.cs +++ b/src/Stripe.net/Services/_base/Service.cs @@ -132,7 +132,7 @@ internal IEnumerable ListRequestAutoPaging( where T : IStripeEntity { var apiMode = ApiModeUtils.GetApiMode(url); -#if NET461 +#if NETFRAMEWORK if (apiMode == ApiMode.V2) { return @@ -153,7 +153,7 @@ internal IEnumerable ListRequestAutoPaging( #endif } -#if NET461 +#if NETFRAMEWORK internal IEnumerable V1ListRequestAutoPagingSync( string url, ListOptions options, @@ -427,7 +427,7 @@ internal IEnumerable SearchRequestAutoPaging( RequestOptions requestOptions) where T : IStripeEntity { -#if NET461 +#if NETFRAMEWORK return this.SearchRequestAutoPagingSync(url, options, requestOptions); #else @@ -436,7 +436,7 @@ internal IEnumerable SearchRequestAutoPaging( #endif } -#if NET461 +#if NETFRAMEWORK private IEnumerable SearchRequestAutoPagingSync( string url, SearchOptions options, diff --git a/src/Stripe.net/Stripe.net.csproj b/src/Stripe.net/Stripe.net.csproj index 047f6fbd32..27f0f6410c 100644 --- a/src/Stripe.net/Stripe.net.csproj +++ b/src/Stripe.net/Stripe.net.csproj @@ -5,7 +5,7 @@ 48.6.0-alpha.2 8 Stripe, Jayme Davis - net5.0;net6.0;net7.0;net8.0;netcoreapp3.1;netstandard2.0;net461 + net5.0;net6.0;net7.0;net8.0;netstandard2.0;net462 stripe;payment;credit;cards;money;gateway;paypal;braintree icon.png https://github.com/stripe/stripe-dotnet @@ -56,16 +56,12 @@ - - - - - + diff --git a/src/StripeTests/StripeTests.csproj b/src/StripeTests/StripeTests.csproj index c24c46d98b..1553453170 100644 --- a/src/StripeTests/StripeTests.csproj +++ b/src/StripeTests/StripeTests.csproj @@ -1,7 +1,7 @@ - net5.0;net6.0;net7.0;net8.0;netcoreapp3.1;netcoreapp2.1;net461 + net5.0;net6.0;net7.0;net8.0;net462 8 true false @@ -28,7 +28,7 @@ - +