diff --git a/GoCardless.Tests/GoCardless.Tests.csproj b/GoCardless.Tests/GoCardless.Tests.csproj index e7c22f8..3c19c67 100644 --- a/GoCardless.Tests/GoCardless.Tests.csproj +++ b/GoCardless.Tests/GoCardless.Tests.csproj @@ -5,10 +5,10 @@ - - - - + + + + diff --git a/GoCardless/GoCardless.csproj b/GoCardless/GoCardless.csproj index c2b40f6..33fcec1 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 7.3.0 + 7.4.0 GoCardless Ltd Client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments false @@ -11,7 +11,7 @@ GoCardless Ltd gocardless payments rest api direct debit https://github.com/gocardless/gocardless-dotnet/blob/master/LICENSE.txt - https://github.com/gocardless/gocardless-dotnet/releases/tag/v7.3.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v7.4.0 netstandard1.6;netstandard2.0;netstandard2.1;net46;net8.0 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index 43193d9..f8b244a 100644 --- a/GoCardless/GoCardlessClient.cs +++ b/GoCardless/GoCardlessClient.cs @@ -277,11 +277,11 @@ private HttpRequestMessage BuildHttpRequestMessage(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); diff --git a/GoCardless/Resources/BankAuthorisation.cs b/GoCardless/Resources/BankAuthorisation.cs index b9a70b3..f862e3b 100644 --- a/GoCardless/Resources/BankAuthorisation.cs +++ b/GoCardless/Resources/BankAuthorisation.cs @@ -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`. diff --git a/GoCardless/Resources/BillingRequest.cs b/GoCardless/Resources/BillingRequest.cs index 1c2fbf5..2043267 100644 --- a/GoCardless/Resources/BillingRequest.cs +++ b/GoCardless/Resources/BillingRequest.cs @@ -707,6 +707,15 @@ public class BillingRequestMandateRequest [JsonProperty("scheme")] public string Scheme { get; set; } + /// + /// 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 + /// + [JsonProperty("sweeping")] + public bool? Sweeping { get; set; } + /// /// Verification preference for the mandate. One of: ///
    diff --git a/GoCardless/Resources/ScenarioSimulator.cs b/GoCardless/Resources/ScenarioSimulator.cs index 8473559..036c533 100644 --- a/GoCardless/Resources/ScenarioSimulator.cs +++ b/GoCardless/Resources/ScenarioSimulator.cs @@ -62,11 +62,12 @@ public class ScenarioSimulator /// thereby settling the charged back payment. ///
  • `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.
  • + /// 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. ///
  • `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 diff --git a/GoCardless/Services/BankAuthorisationService.cs b/GoCardless/Services/BankAuthorisationService.cs index 595bf53..300b4c4 100644 --- a/GoCardless/Services/BankAuthorisationService.cs +++ b/GoCardless/Services/BankAuthorisationService.cs @@ -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`. diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index 7862c26..b373e09 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -714,6 +714,15 @@ public enum BillingRequestPeriod [JsonProperty("scheme")] public string Scheme { get; set; } + /// + /// 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 + /// + [JsonProperty("sweeping")] + public bool? Sweeping { get; set; } + /// /// Verification preference for the mandate. One of: ///
      @@ -1437,6 +1446,15 @@ public enum BillingRequestAuthorisationSource [JsonProperty("scheme")] public string Scheme { get; set; } + /// + /// 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 + /// + [JsonProperty("sweeping")] + public bool? Sweeping { get; set; } + /// /// Verification preference for the mandate. One of: ///
        @@ -1942,6 +1960,15 @@ public enum BillingRequestAuthorisationSource [JsonProperty("scheme")] public string Scheme { get; set; } + /// + /// 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 + /// + [JsonProperty("sweeping")] + public bool? Sweeping { get; set; } + /// /// Verification preference for the mandate. One of: ///
          diff --git a/GoCardless/Services/ScenarioSimulatorService.cs b/GoCardless/Services/ScenarioSimulatorService.cs index 07175d4..ce40b0b 100644 --- a/GoCardless/Services/ScenarioSimulatorService.cs +++ b/GoCardless/Services/ScenarioSimulatorService.cs @@ -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. ///
        • `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.
        • + /// 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. ///
        • `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.
        • diff --git a/README.md b/README.md index 4686cb3..68c7579 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/nuget_package_icon.png b/nuget_package_icon.png index 8cdfe8c..274b08d 100644 Binary files a/nuget_package_icon.png and b/nuget_package_icon.png differ