Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for not_retried_reason #54

Merged
merged 2 commits into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions GoCardless/GoCardless.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageId>GoCardless</PackageId>
<PackageVersion>4.0.0</PackageVersion>
<PackageVersion>4.1.0</PackageVersion>
<Authors>GoCardless Ltd</Authors>
<Description>Client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand All @@ -11,7 +11,7 @@
<Copyright>GoCardless Ltd</Copyright>
<PackageTags>gocardless payments rest api direct debit</PackageTags>
<PackageLicenseUrl>https://github.com/gocardless/gocardless-dotnet/blob/master/LICENSE.txt</PackageLicenseUrl>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v4.0.0</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v4.1.0</PackageReleaseNotes>
<TargetFrameworks>netstandard1.6;netstandard2.0;net46</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
4 changes: 2 additions & 2 deletions GoCardless/GoCardlessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ private HttpRequestMessage BuildHttpRequestMessage<T>(string method, string path
var httpMethod = new HttpMethod(method);

var requestMessage = new HttpRequestMessage(httpMethod, new Uri(_baseUrl, path));
requestMessage.Headers.Add("User-Agent", "gocardless-dotnet/4.0.0");
requestMessage.Headers.Add("User-Agent", "gocardless-dotnet/4.1.0");
requestMessage.Headers.Add("GoCardless-Version", "2015-07-06");
requestMessage.Headers.Add("GoCardless-Client-Version", "4.0.0");
requestMessage.Headers.Add("GoCardless-Client-Version", "4.1.0");
requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet");
requestMessage.Headers.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken);
Expand Down
15 changes: 15 additions & 0 deletions GoCardless/Resources/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,21 @@ public class EventDetails
[JsonProperty("description")]
public string Description { get; set; }

/// <summary>
/// When will_attempt_retry is set to false, this field will contain
/// the reason the payment was not retried. This can be one of:
/// <ul>
/// <li>`failure_filter_applied`: The payment won't be intelligently
/// retried as
/// there is a high likelihood of failure on retry.</li>
/// <li>`other`: The payment won't be intelligently retried due to any
/// other
/// reason.</li>
/// </ul>
/// </summary>
[JsonProperty("not_retried_reason")]
public string NotRetriedReason { get; set; }

/// <summary>
/// Who initiated the event. One of:
/// <ul>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For full details of the GoCardless API, see the [API docs](https://developer.goc

To install `GoCardless`, run the following command in the [Package Manager Console](https://docs.microsoft.com/en-us/nuget/tools/package-manager-console)

`Install-Package GoCardless -Version 4.0.0`
`Install-Package GoCardless -Version 4.1.0`


## Usage
Expand Down