From 48b354fc384fb1e4f9caf76fcd3d74a2860ffd29 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 15:45:15 +0000 Subject: [PATCH] Changes generated by 11a3cb94b6c0b3a3cc848372f080e3defda562bf This commit was automatically created from gocardless/gocardless-dotnet-template@11a3cb94b6c0b3a3cc848372f080e3defda562bf by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/8835540985 --- .gitignore | 1 + GoCardless/GoCardless.csproj | 4 +- GoCardless/GoCardlessClient.cs | 4 +- GoCardless/Resources/BillingRequest.cs | 36 ++++++++++++++ .../Services/BankDetailsLookupService.cs | 20 ++++++++ GoCardless/Services/BillingRequestService.cs | 48 +++++++++++++++++++ README.md | 2 +- tmp-push-files-checkout | 1 + 8 files changed, 111 insertions(+), 5 deletions(-) create mode 160000 tmp-push-files-checkout diff --git a/.gitignore b/.gitignore index 7ade57d..3908299 100644 --- a/.gitignore +++ b/.gitignore @@ -75,6 +75,7 @@ artifacts/ *.pidb *.svclog *.scc +*.DS_Store # Chutzpah Test files _Chutzpah* diff --git a/GoCardless/GoCardless.csproj b/GoCardless/GoCardless.csproj index f43d367..ef2237d 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 5.21.1 + 5.21.2 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/v5.21.1 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v5.21.2 netstandard1.6;netstandard2.0;net46 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index ff9bcaf..2403125 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/5.21.1 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}"; + var userAgentInformation = $" gocardless-dotnet/5.21.2 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}"; requestMessage.Headers.Add("User-Agent", userAgentInformation); requestMessage.Headers.Add("GoCardless-Version", "2015-07-06"); - requestMessage.Headers.Add("GoCardless-Client-Version", "5.21.1"); + requestMessage.Headers.Add("GoCardless-Client-Version", "5.21.2"); requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet"); requestMessage.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken); diff --git a/GoCardless/Resources/BillingRequest.cs b/GoCardless/Resources/BillingRequest.cs index 38a2b08..b4916f6 100644 --- a/GoCardless/Resources/BillingRequest.cs +++ b/GoCardless/Resources/BillingRequest.cs @@ -844,6 +844,20 @@ public class BillingRequestPaymentRequest [JsonProperty("description")] public string Description { get; set; } + /// + /// This field will decide how GoCardless handles settlement of funds + /// from the customer. + /// + /// - `managed` will be moved through GoCardless' account, batched, and + /// payed out. + /// - `direct` will be a direct transfer from the payer's account to the + /// merchant where + /// invoicing will be handled separately. + /// + /// + [JsonProperty("funds_settlement")] + public BillingRequestPaymentRequestFundsSettlement? FundsSettlement { get; set; } + /// /// Resources linked to this BillingRequestPaymentRequest. /// @@ -870,6 +884,28 @@ public class BillingRequestPaymentRequest public string Scheme { get; set; } } + /// + /// This field will decide how GoCardless handles settlement of funds from the customer. + /// + /// - `managed` will be moved through GoCardless' account, batched, and payed out. + /// - `direct` will be a direct transfer from the payer's account to the merchant where + /// invoicing will be handled separately. + /// + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum BillingRequestPaymentRequestFundsSettlement { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `funds_settlement` with a value of "managed" + [EnumMember(Value = "managed")] + Managed, + /// `funds_settlement` with a value of "direct" + [EnumMember(Value = "direct")] + Direct, + } + /// /// Resources linked to this BillingRequestPaymentRequest /// diff --git a/GoCardless/Services/BankDetailsLookupService.cs b/GoCardless/Services/BankDetailsLookupService.cs index 6905475..3bfa9b2 100644 --- a/GoCardless/Services/BankDetailsLookupService.cs +++ b/GoCardless/Services/BankDetailsLookupService.cs @@ -37,6 +37,12 @@ public BankDetailsLookupService(GoCardlessClient goCardlessClient) /// check and /// reachability check are performed. /// + /// For UK-based bank accounts, where an account holder name is provided + /// (and an account number, a sort code or an iban + /// are already present), we verify that the account holder name and + /// bank account number match the details held by + /// the relevant bank. + /// /// If your request returns an [error](#api-usage-errors) or the /// `available_debit_schemes` /// attribute is an empty array, you will not be able to collect @@ -83,6 +89,12 @@ public Task CreateAsync(BankDetailsLookupCreateReques /// and /// reachability check are performed. /// + /// For UK-based bank accounts, where an account holder name is provided + /// (and an account number, a sort code or an iban + /// are already present), we verify that the account holder name and bank + /// account number match the details held by + /// the relevant bank. + /// /// If your request returns an [error](#api-usage-errors) or the /// `available_debit_schemes` /// attribute is an empty array, you will not be able to collect payments @@ -111,6 +123,14 @@ public Task CreateAsync(BankDetailsLookupCreateReques public class BankDetailsLookupCreateRequest { + /// + /// The account holder name associated with the account number (if + /// available). If provided and the country code is GB, a payer name + /// verification will be performed. + /// + [JsonProperty("account_holder_name")] + public string AccountHolderName { get; set; } + /// /// Bank account number - see [local /// details](#appendix-local-bank-details) for more information. diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index 87bc575..87e7958 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -115,6 +115,12 @@ public Task CollectCustomerDetailsAsync(string identity, /// customer is requested to adjust the account number/routing number /// and /// succeed in this check to continue with the flow. + /// + /// _BACS scheme_ [Payer Name + /// Verification](https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB) + /// is enabled by default for UK based bank accounts, meaning we verify + /// the account holder name and bank account + /// number match the details held by the relevant bank. /// /// Unique identifier, beginning with "BRQ". /// An optional `BillingRequestCollectBankAccountRequest` representing the body for this collect_bank_account request. @@ -786,6 +792,42 @@ public class BillingRequestPaymentRequest [JsonProperty("description")] public string Description { get; set; } + /// + /// This field will decide how GoCardless handles settlement of + /// funds from the customer. + /// + /// - `managed` will be moved through GoCardless' account, batched, + /// and payed out. + /// - `direct` will be a direct transfer from the payer's account to + /// the merchant where + /// invoicing will be handled separately. + /// + /// + [JsonProperty("funds_settlement")] + public BillingRequestFundsSettlement? FundsSettlement { get; set; } + /// + /// This field will decide how GoCardless handles settlement of funds + /// from the customer. + /// + /// - `managed` will be moved through GoCardless' account, batched, and + /// payed out. + /// - `direct` will be a direct transfer from the payer's account to the + /// merchant where + /// invoicing will be handled separately. + /// + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BillingRequestFundsSettlement + { + + /// `funds_settlement` with a value of "managed" + [EnumMember(Value = "managed")] + Managed, + /// `funds_settlement` with a value of "direct" + [EnumMember(Value = "direct")] + Direct, + } + /// /// Key-value store of custom data. Up to 3 keys are permitted, with /// key names up to 50 characters and values up to 500 characters. @@ -1070,6 +1112,12 @@ public class BillingRequestCustomerBillingDetail /// the /// customer is requested to adjust the account number/routing number and /// succeed in this check to continue with the flow. + /// + /// _BACS scheme_ [Payer Name + /// Verification](https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB) + /// is enabled by default for UK based bank accounts, meaning we verify the + /// account holder name and bank account + /// number match the details held by the relevant bank. /// public class BillingRequestCollectBankAccountRequest { diff --git a/README.md b/README.md index 337e7fb..e300866 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 5.21.1` +`Install-Package GoCardless -Version 5.21.2` ## Usage diff --git a/tmp-push-files-checkout b/tmp-push-files-checkout new file mode 160000 index 0000000..1224bf5 --- /dev/null +++ b/tmp-push-files-checkout @@ -0,0 +1 @@ +Subproject commit 1224bf50c733d549fbd897f1c71ce8ba159c66ef