Skip to content

Commit 28ac21d

Browse files
authored
Merge pull request #1293 from stripe/integration-next-major-version
stripe-dotnet v20.0
2 parents cd30f4c + e9fd90d commit 28ac21d

File tree

947 files changed

+22041
-20721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

947 files changed

+22041
-20721
lines changed

.github/ISSUE_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Please only file issues here that you believe represent actual bugs or feature r
22

33
If you're having general trouble with your Stripe integration, please reach out to Stripe support using the form at https://support.stripe.com/ (preferred) or via email to support@stripe.com.
44

5-
If you are reporting a bug, please include your OS version, .NET version and the version of the Stripe.net library you're using, as well as any other details that may be helpful in reproducing the problem.
5+
If you are reporting a bug, please include your OS version, .NET version and the version of the Stripe.net library you're using, as well as any other details that may be helpful in reproducing the problem.

.gitignore

100755100644
+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
project.lock.json
1212

1313
.DS_Store
14-
.idea/
14+
.idea/

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@
199199
distributed under the License is distributed on an "AS IS" BASIS,
200200
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201201
See the License for the specific language governing permissions and
202-
limitations under the License.
202+
limitations under the License.

appveyor.yml

100755100644
+11-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ version: 19.10.0.{build}
22
image: Visual Studio 2017
33

44
environment:
5-
STRIPE_TEST_SK: sk_test_eBgAzVoEpJKfYjD9nf2YoyMM
5+
COVERALLS_REPO_TOKEN:
6+
secure: T0PmP8uyzCseacBCDRBlti2y9Tz5DL6fknea0MKWvbPYrzADmLY2/5kOTfYIsPUk
67
# If you bump this, don't forget to bump `MinimumMockVersion` in `BaseStripeTest.cs` as well.
7-
STRIPE_MOCK_VERSION: 0.30.0
8+
STRIPE_MOCK_VERSION: 0.33.0
89

910
deploy:
1011
- provider: NuGet
@@ -27,6 +28,7 @@ install:
2728
}
2829
$app = Start-Process -FilePath "stripe-mock\stripe-mock.exe" -NoNewWindow -PassThru
2930
Write-Host ("stripe-mock running, Id = $($app.Id)`n") -ForegroundColor Green
31+
- dotnet tool install coveralls.net --version 1.0.0 --tool-path tools
3032

3133
before_build:
3234
- ps: Write-Host $("`n HOST INFORMATION `n") -BackgroundColor DarkCyan
@@ -48,11 +50,16 @@ after_build:
4850
- dotnet pack -c Release src\Stripe.net
4951

5052
test_script:
51-
- ps: Write-Host $("`n RUNNING THE NEW XUNIT + STRIPE-MOCK TESTS `n") -BackgroundColor DarkCyan
53+
- ps: Write-Host $("`n RUNNING TESTS `n") -BackgroundColor DarkCyan
5254
- dotnet test src\StripeTests\StripeTests.csproj
5355

56+
after_test:
57+
- ps: Write-Host $("`n RUNNING COVERAGE `n") -BackgroundColor DarkCyan
58+
- dotnet test -c Debug -f netcoreapp2.1 src/StripeTests/StripeTests.csproj --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
59+
- .\tools\csmacnz.Coveralls --opencover -i src/StripeTests/coverage.opencover.xml --useRelativePaths
60+
5461
artifacts:
55-
- path: '**\*.nupkg'
62+
- path: 'src\Stripe.net\bin\Release\*.nupkg'
5663

5764
# these commands tell appveyor to open an RDP session for debugging
5865
#init:

global.json

100755100644
File mode changed.

readme.md

100755100644
+17-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Stripe.net [![Build status](https://ci.appveyor.com/api/projects/status/rg0pg5tlr1a6f8tf/branch/master?svg=true)](https://ci.appveyor.com/project/stripe/stripe-dotnet) [![NuGet](https://img.shields.io/nuget/v/stripe.net.svg)](https://www.nuget.org/packages/Stripe.net/)
1+
# Stripe.net
2+
[![Build status](https://ci.appveyor.com/api/projects/status/rg0pg5tlr1a6f8tf/branch/master?svg=true)](https://ci.appveyor.com/project/stripe/stripe-dotnet) [![NuGet](https://img.shields.io/nuget/v/stripe.net.svg)](https://www.nuget.org/packages/Stripe.net/)
3+
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-dotnet/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-dotnet?branch=master)
24

35
The official Stripe library, supporting .NET Standard 1.2+, .NET Core 1.0+, and .NET Framework 4.5+
46

@@ -36,11 +38,11 @@ a) In your application initialization, set your API key (only once once during s
3638
StripeConfiguration.SetApiKey("[your api key here]");
3739
```
3840

39-
b) Pass the API key to [StripeRequestOptions](#requestoptions):
41+
b) Pass the API key to [RequestOptions](#requestoptions):
4042

4143
```csharp
42-
var planService = new StripePlanService();
43-
planService.Get(*planId*, new StripeRequestOptions() { ApiKey = "[your api key here]" });
44+
var planService = new PlanService();
45+
planService.Get(*planId*, new RequestOptions() { ApiKey = "[your api key here]" });
4446
```
4547

4648
You can obtain your secret API key from the [API Settings](https://dashboard.stripe.com/account/apikeys) in the Dashboard.
@@ -63,10 +65,10 @@ If you are using Xamarin/Mono, you may want to provide your own `HttpMessageHand
6365

6466
### Request Options
6567

66-
All of the service methods accept an optional `StripeRequestOptions` object. This is used if you need an [Idempotency Key](https://stripe.com/docs/api?lang=curl#idempotent_requests), if you are using [Stripe Connect](https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header), or if you want to pass the secret API key on each method.
68+
All of the service methods accept an optional `RequestOptions` object. This is used if you need an [Idempotency Key](https://stripe.com/docs/api?lang=curl#idempotent_requests), if you are using [Stripe Connect](https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header), or if you want to pass the secret API key on each method.
6769

6870
```csharp
69-
var requestOptions = new StripeRequestOptions();
71+
var requestOptions = new RequestOptions();
7072
requestOptions.ApiKey = "SECRET API KEY"; // (optional) set the api key on a per-request basis
7173
requestOptions.IdempotencyKey = "SOME STRING"; // (optional) create an idempotent request
7274
requestOptions.StripeConnectAccountId = "CONNECTED ACCOUNT ID"; // (optional) authenticate as a connected account
@@ -78,7 +80,7 @@ The [`StripeResponse`](./src/Stripe.net/Infrastructure/public/StripeResponse.cs)
7880

7981
**Example: Access the StripeResponse**
8082
```csharp
81-
var chargeService = new StripeChargeService();
83+
var chargeService = new ChargeService();
8284
StripeCharge charge = chargeService.Create(...);
8385
StripeResponse response = charge.StripeResponse;
8486
```
@@ -113,18 +115,18 @@ public class StripeResponse
113115

114116
### Date Filtering
115117

116-
Many of the `List()`-methods support parameters to filter by date. You can use the `StripeDateFilter` class to combine the filters to make more interesting and complex queries.
118+
Many of the `List()`-methods support parameters to filter by date. You can use the `DateFilter` class to combine the filters to make more interesting and complex queries.
117119

118-
**Example: Interesting Queries with StripeDateFilter**
120+
**Example: Interesting Queries with DateFilter**
119121
```csharp
120-
var chargeService = new StripeChargeService();
122+
var chargeService = new ChargeService();
121123

122-
var chargesToday = chargeService.List(new StripeChargeListOptions {
123-
Created = new StripeDateFilter { GreaterThanOrEqual = DateTime.UtcNow.Date }
124+
var chargesToday = chargeService.List(new ChargeListOptions {
125+
Created = new DateFilter { GreaterThanOrEqual = DateTime.UtcNow.Date }
124126
});
125127

126-
var chargesYesterday = chargeService.List(new StripeChargeListOptions {
127-
Created = new StripeDateFilter {
128+
var chargesYesterday = chargeService.List(new ChargeListOptions {
129+
Created = new DateFilter {
128130
GreaterThanOrEqual = DateTime.Now.AddDays(-1).Date,
129131
LessThan = DateTime.Now.Date
130132
}
@@ -135,4 +137,4 @@ var chargesYesterday = chargeService.List(new StripeChargeListOptions {
135137

136138
We welcome contributions from anyone interested in Stripe or Stripe.net development. If you'd like to submit a pull request, it's best to start with an issue to describe what you'd like to build.
137139

138-
Once you've written your pull request, **please make sure you test your changes**.
140+
Once you've written your pull request, **please make sure you test your changes**.

src/Stripe.net.sln

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Microsoft Visual Studio Solution File, Format Version 12.00
32
# Visual Studio 15
43
VisualStudioVersion = 15.0.26430.4
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace Stripe
2+
{
3+
public static class AccountType
4+
{
5+
public const string Custom = "custom";
6+
public const string Standard = "standard";
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
namespace Stripe
1+
namespace Stripe
22
{
33
public static class BankAccountHolderType
44
{
55
public const string Individual = "individual";
66
public const string Company = "company";
77
}
8-
}
8+
}

0 commit comments

Comments
 (0)