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

Changes from gocardless/gocardless-dotnet-template #140

Merged
merged 9 commits into from
Feb 17, 2025
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
8 changes: 4 additions & 4 deletions GoCardless.Tests/GoCardless.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="FluentAssertions" Version="8.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
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>7.3.0</PackageVersion>
<PackageVersion>7.4.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/v7.3.0</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v7.4.0</PackageReleaseNotes>
<TargetFrameworks>netstandard1.6;netstandard2.0;netstandard2.1;net46;net8.0</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 @@ -277,11 +277,11 @@ private HttpRequestMessage BuildHttpRequestMessage<T>(string method, string path
runtimeFrameworkInformation = System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion();
#endif

var userAgentInformation = $" gocardless-dotnet/7.3.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}";
var userAgentInformation = $" gocardless-dotnet/7.4.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}";

requestMessage.Headers.Add("User-Agent", userAgentInformation);
requestMessage.Headers.Add("GoCardless-Version", "2015-07-06");
requestMessage.Headers.Add("GoCardless-Client-Version", "7.3.0");
requestMessage.Headers.Add("GoCardless-Client-Version", "7.4.0");
requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet");
requestMessage.Headers.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken);
Expand Down
11 changes: 8 additions & 3 deletions GoCardless/Resources/BankAuthorisation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,14 @@ public class BankAuthorisation
/// the `redirect_uri`, in which case you should
/// prompt the user to try the bank authorisation step again.
///
/// The `redirect_uri` you provide should handle the `outcome` query
/// parameter for displaying the result of the
/// bank authorisation as outlined above.
/// Please note: bank authorisations can still fail despite an
/// `outcome=success` on the `redirect_uri`. It is therefore recommended
/// to wait for the relevant bank authorisation event, such as
/// [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised),
/// [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied),
/// or
/// [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed)
/// in order to show the correct outcome to the user.
///
/// The BillingRequestFlow ID will also be appended to the
/// `redirect_uri` as query parameter `id=BRF123`.
Expand Down
9 changes: 9 additions & 0 deletions GoCardless/Resources/BillingRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,15 @@ public class BillingRequestMandateRequest
[JsonProperty("scheme")]
public string Scheme { get; set; }

/// <summary>
/// If true, this billing request would be used to set up a mandate
/// solely for moving (or sweeping) money from one account owned by the
/// payer to another account that the payer also owns. This is required
/// for Faster Payments
/// </summary>
[JsonProperty("sweeping")]
public bool? Sweeping { get; set; }

/// <summary>
/// Verification preference for the mandate. One of:
/// <ul>
Expand Down
11 changes: 6 additions & 5 deletions GoCardless/Resources/ScenarioSimulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ public class ScenarioSimulator
/// thereby settling the charged back payment.</li>
/// <li>`payment_late_failure`: Transitions a payment through to
/// `late_failure`, having been apparently collected successfully
/// beforehand. It must start in the `pending_submission` state, and its
/// mandate must be in the `activated` state (unless it is a payment for
/// ACH, BECS, BECS_NZ or SEPA, in which cases the mandate may be
/// `pending_submission`, since their mandates are submitted with their
/// first payment). Not compatible with Autogiro mandates.</li>
/// beforehand. It must start in either the `pending_submission` or
/// `paid_out` state, and its mandate must be in the `activated` state
/// (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which
/// cases the mandate may be `pending_submission`, since their mandates
/// are submitted with their first payment). Not compatible with
/// Autogiro mandates.</li>
/// <li>`payment_late_failure_settled`: Behaves the same as the
/// `payment_late_failure` simulator, except that the late failure is
/// additionally included as a debit item in a payout, thereby settling
Expand Down
11 changes: 8 additions & 3 deletions GoCardless/Services/BankAuthorisationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,14 @@ public class BankAuthorisationLinks
/// the `redirect_uri`, in which case you should
/// prompt the user to try the bank authorisation step again.
///
/// The `redirect_uri` you provide should handle the `outcome` query
/// parameter for displaying the result of the
/// bank authorisation as outlined above.
/// Please note: bank authorisations can still fail despite an
/// `outcome=success` on the `redirect_uri`. It is therefore recommended
/// to wait for the relevant bank authorisation event, such as
/// [`BANK_AUTHORISATION_AUTHORISED`](#billing-request-bankauthorisationauthorised),
/// [`BANK_AUTHORISATION_DENIED`](#billing-request-bankauthorisationdenied),
/// or
/// [`BANK_AUTHORISATION_FAILED`](#billing-request-bankauthorisationfailed)
/// in order to show the correct outcome to the user.
///
/// The BillingRequestFlow ID will also be appended to the
/// `redirect_uri` as query parameter `id=BRF123`.
Expand Down
27 changes: 27 additions & 0 deletions GoCardless/Services/BillingRequestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,15 @@ public enum BillingRequestPeriod
[JsonProperty("scheme")]
public string Scheme { get; set; }

/// <summary>
/// If true, this billing request would be used to set up a mandate
/// solely for moving (or sweeping) money from one account owned by
/// the payer to another account that the payer also owns. This is
/// required for Faster Payments
/// </summary>
[JsonProperty("sweeping")]
public bool? Sweeping { get; set; }

/// <summary>
/// Verification preference for the mandate. One of:
/// <ul>
Expand Down Expand Up @@ -1437,6 +1446,15 @@ public enum BillingRequestAuthorisationSource
[JsonProperty("scheme")]
public string Scheme { get; set; }

/// <summary>
/// If true, this billing request would be used to set up a mandate
/// solely for moving (or sweeping) money from one account owned by
/// the payer to another account that the payer also owns. This is
/// required for Faster Payments
/// </summary>
[JsonProperty("sweeping")]
public bool? Sweeping { get; set; }

/// <summary>
/// Verification preference for the mandate. One of:
/// <ul>
Expand Down Expand Up @@ -1942,6 +1960,15 @@ public enum BillingRequestAuthorisationSource
[JsonProperty("scheme")]
public string Scheme { get; set; }

/// <summary>
/// If true, this billing request would be used to set up a mandate
/// solely for moving (or sweeping) money from one account owned by
/// the payer to another account that the payer also owns. This is
/// required for Faster Payments
/// </summary>
[JsonProperty("sweeping")]
public bool? Sweeping { get; set; }

/// <summary>
/// Verification preference for the mandate. One of:
/// <ul>
Expand Down
10 changes: 5 additions & 5 deletions GoCardless/Services/ScenarioSimulatorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ public ScenarioSimulatorService(GoCardlessClient goCardlessClient)
/// simulator, except that the charged back payment is additionally included as a debit item
/// in a payout, thereby settling the charged back payment.</li>
/// <li>`payment_late_failure`: Transitions a payment through to `late_failure`, having been
/// apparently collected successfully beforehand. It must start in the `pending_submission`
/// state, and its mandate must be in the `activated` state (unless it is a payment for ACH,
/// BECS, BECS_NZ or SEPA, in which cases the mandate may be `pending_submission`, since
/// their mandates are submitted with their first payment). Not compatible with Autogiro
/// mandates.</li>
/// apparently collected successfully beforehand. It must start in either the
/// `pending_submission` or `paid_out` state, and its mandate must be in the `activated`
/// state (unless it is a payment for ACH, BECS, BECS_NZ or SEPA, in which cases the mandate
/// may be `pending_submission`, since their mandates are submitted with their first
/// payment). Not compatible with Autogiro mandates.</li>
/// <li>`payment_late_failure_settled`: Behaves the same as the `payment_late_failure`
/// simulator, except that the late failure is additionally included as a debit item in a
/// payout, thereby settling the late failure.</li>
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 7.3.0`
`Install-Package GoCardless -Version 7.4.0`


## Usage
Expand Down
Binary file modified nuget_package_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading