From 481e35dd39e036d471a0e2fdae7fdddacd623c44 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 31 Oct 2023 15:35:10 +0000 Subject: [PATCH 1/6] Changes generated by dfb3699606b5b0fa8cf8d47e737c50976e54cc19 --- GoCardless/Resources/BillingRequestTemplate.cs | 16 +++++++++++++++- .../Services/BillingRequestTemplateService.cs | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/GoCardless/Resources/BillingRequestTemplate.cs b/GoCardless/Resources/BillingRequestTemplate.cs index 3c20484..390ba91 100644 --- a/GoCardless/Resources/BillingRequestTemplate.cs +++ b/GoCardless/Resources/BillingRequestTemplate.cs @@ -11,7 +11,21 @@ namespace GoCardless.Resources /// /// Represents a billing request template resource. /// - /// Billing Request Templates + /// Billing Request Templates are reusable templates that result in + /// numerous Billing Requests with similar attributes. They provide + /// a no-code solution for generating various types of multi-user payment + /// links. + /// + /// Each template includes a reusable URL that can be embedded in a website + /// or shared with customers via email. Every time the URL is opened, + /// it generates a new Billing Request. + /// + /// Billing Request Templates overcome the key limitation of the Billing + /// Request: + /// a Billing Request cannot be shared among multiple users because it is + /// intended + /// for single-use and is designed to cater to the unique needs of + /// individual customers. /// public class BillingRequestTemplate { diff --git a/GoCardless/Services/BillingRequestTemplateService.cs b/GoCardless/Services/BillingRequestTemplateService.cs index 0dcacdd..26d21f7 100644 --- a/GoCardless/Services/BillingRequestTemplateService.cs +++ b/GoCardless/Services/BillingRequestTemplateService.cs @@ -16,7 +16,21 @@ namespace GoCardless.Services /// /// Service class for working with billing request template resources. /// - /// Billing Request Templates + /// Billing Request Templates are reusable templates that result in + /// numerous Billing Requests with similar attributes. They provide + /// a no-code solution for generating various types of multi-user payment + /// links. + /// + /// Each template includes a reusable URL that can be embedded in a website + /// or shared with customers via email. Every time the URL is opened, + /// it generates a new Billing Request. + /// + /// Billing Request Templates overcome the key limitation of the Billing + /// Request: + /// a Billing Request cannot be shared among multiple users because it is + /// intended + /// for single-use and is designed to cater to the unique needs of + /// individual customers. /// public class BillingRequestTemplateService From a0d715e416487221b02f9fdd3fc7f496a56ea45c Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 8 Nov 2023 16:42:54 +0000 Subject: [PATCH 2/6] Changes generated by 676dfb837b960d3819f075a8f508fa2f35052574 --- GoCardless/Resources/BillingRequestFlow.cs | 6 ++++++ GoCardless/Services/BillingRequestFlowService.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/GoCardless/Resources/BillingRequestFlow.cs b/GoCardless/Resources/BillingRequestFlow.cs index ebf3d2f..c898d8e 100644 --- a/GoCardless/Resources/BillingRequestFlow.cs +++ b/GoCardless/Resources/BillingRequestFlow.cs @@ -38,6 +38,12 @@ public class BillingRequestFlow [JsonProperty("created_at")] public DateTimeOffset? CreatedAt { get; set; } + /// + /// Identifies whether a Billing Request belongs to a specific customer + /// + [JsonProperty("customer_details_captured")] + public bool? CustomerDetailsCaptured { get; set; } + /// /// URL that the payer can be taken to if there isn't a way to progress /// ahead in flow. diff --git a/GoCardless/Services/BillingRequestFlowService.cs b/GoCardless/Services/BillingRequestFlowService.cs index 75a16fd..7585fa8 100644 --- a/GoCardless/Services/BillingRequestFlowService.cs +++ b/GoCardless/Services/BillingRequestFlowService.cs @@ -88,6 +88,12 @@ public class BillingRequestFlowCreateRequest [JsonProperty("auto_fulfil")] public bool? AutoFulfil { get; set; } + /// + /// Identifies whether a Billing Request belongs to a specific customer + /// + [JsonProperty("customer_details_captured")] + public bool? CustomerDetailsCaptured { get; set; } + /// /// URL that the payer can be taken to if there isn't a way to progress /// ahead in flow. From 69a266848f6112faf61062d43f314e53a68e64bb Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 13 Nov 2023 13:42:30 +0000 Subject: [PATCH 3/6] Changes generated by a3e9e027047b6041a612dcf37a2b64f711c90cc7 --- GoCardless/Services/BillingRequestService.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index 6deb311..58cf87f 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -102,6 +102,10 @@ public Task CollectCustomerDetailsAsync(string identity, /// creating /// and attaching it. /// + /// If the scheme is PayTo and the pay_id is available, this can be + /// included in the payload along with the + /// country_code. + /// /// _ACH scheme_ For compliance reasons, an extra validation step is /// done using /// a third-party provider to make sure the customer's bank account can @@ -1054,6 +1058,10 @@ public class BillingRequestCustomerBillingDetail /// the bank account is valid for the billing request scheme before creating /// and attaching it. /// + /// If the scheme is PayTo and the pay_id is available, this can be included + /// in the payload along with the + /// country_code. + /// /// _ACH scheme_ For compliance reasons, an extra validation step is done /// using /// a third-party provider to make sure the customer's bank account can @@ -1164,6 +1172,13 @@ public enum BillingRequestAccountType /// [JsonProperty("metadata")] public IDictionary Metadata { get; set; } + + /// + /// A unique record such as an email address, mobile number or company + /// number, that can be used to make and accept payments. + /// + [JsonProperty("pay_id")] + public string PayId { get; set; } } From 27661f77705c1e2573afa8b3874fe4d875737c68 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 21 Nov 2023 15:33:38 +0000 Subject: [PATCH 4/6] Changes generated by 1af4c4642ba1a7f221e5b7d81b6c1fa64e8cc605 --- GoCardless/GoCardlessClient.Generated.cs | 5 ++ GoCardless/Resources/TransferredMandate.cs | 62 ++++++++++++++ .../Services/TransferredMandateService.cs | 83 +++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 GoCardless/Resources/TransferredMandate.cs create mode 100644 GoCardless/Services/TransferredMandateService.cs diff --git a/GoCardless/GoCardlessClient.Generated.cs b/GoCardless/GoCardlessClient.Generated.cs index 152fee4..26a5073 100644 --- a/GoCardless/GoCardlessClient.Generated.cs +++ b/GoCardless/GoCardlessClient.Generated.cs @@ -158,6 +158,11 @@ public partial class GoCardlessClient /// public TaxRateService TaxRates => new TaxRateService(this); + /// + ///A service for working with transferred mandate resources. + /// + public TransferredMandateService TransferredMandates => new TransferredMandateService(this); + /// ///A service for working with verification detail resources. /// diff --git a/GoCardless/Resources/TransferredMandate.cs b/GoCardless/Resources/TransferredMandate.cs new file mode 100644 index 0000000..02f4901 --- /dev/null +++ b/GoCardless/Resources/TransferredMandate.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using GoCardless.Internals; + +namespace GoCardless.Resources +{ + + /// + /// Represents a transferred mandate resource. + /// + /// Mandates that have been transferred using Current Account Switch Service + /// + public class TransferredMandate + { + /// + /// Encrypted bank account details + /// + [JsonProperty("encrypted_data")] + public string EncryptedData { get; set; } + + /// + /// Encrypted AES key + /// + [JsonProperty("key")] + public string Key { get; set; } + + /// + /// Public key id used to encrypt AES key + /// + [JsonProperty("kid")] + public string Kid { get; set; } + + /// + /// Resources linked to this TransferredMandate. + /// + [JsonProperty("links")] + public TransferredMandateLinks Links { get; set; } + } + + /// + /// Resources linked to this TransferredMandate + /// + public class TransferredMandateLinks + { + /// + /// The ID of the updated + /// [customer_bank_account](#core-endpoints-customer-bank-accounts) + /// + [JsonProperty("customer_bank_account")] + public string CustomerBankAccount { get; set; } + + /// + /// The ID of the transferred mandate + /// + [JsonProperty("mandate")] + public string Mandate { get; set; } + } + +} diff --git a/GoCardless/Services/TransferredMandateService.cs b/GoCardless/Services/TransferredMandateService.cs new file mode 100644 index 0000000..ca7e84d --- /dev/null +++ b/GoCardless/Services/TransferredMandateService.cs @@ -0,0 +1,83 @@ + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Threading; +using System.Threading.Tasks; +using GoCardless.Internals; +using GoCardless.Resources; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace GoCardless.Services +{ + /// + /// Service class for working with transferred mandate resources. + /// + /// Mandates that have been transferred using Current Account Switch Service + /// + + public class TransferredMandateService + { + private readonly GoCardlessClient _goCardlessClient; + + /// + /// Constructor. Users of this library should not call this. An instance of this + /// class can be accessed through an initialised GoCardlessClient. + /// + public TransferredMandateService(GoCardlessClient goCardlessClient) + { + _goCardlessClient = goCardlessClient; + } + + /// + /// Returns encrypted bank details for the transferred mandate + /// + /// Unique identifier, beginning with "MD". Note that this prefix may + /// not apply to mandates created before 2016. + /// An optional `TransferredMandateTransferredMandatesRequest` representing the query parameters for this transferred_mandates request. + /// An optional `RequestSettings` allowing you to configure the request + /// A single transferred mandate resource + public Task TransferredMandatesAsync(string identity, TransferredMandateTransferredMandatesRequest request = null, RequestSettings customiseRequestMessage = null) + { + request = request ?? new TransferredMandateTransferredMandatesRequest(); + if (identity == null) throw new ArgumentException(nameof(identity)); + + var urlParams = new List> + { + new KeyValuePair("identity", identity), + }; + + return _goCardlessClient.ExecuteAsync("GET", "/transferred_mandate/:identity", urlParams, request, null, null, customiseRequestMessage); + } + } + + + /// + /// Returns encrypted bank details for the transferred mandate + /// + public class TransferredMandateTransferredMandatesRequest + { + + /// + /// 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. + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + } + + /// + /// An API response for a request returning a single transferred mandate. + /// + public class TransferredMandateResponse : ApiResponse + { + /// + /// The transferred mandate from the response. + /// + [JsonProperty("transferred_mandates")] + public TransferredMandate TransferredMandate { get; private set; } + } +} From b36852b75c3acba0a2a58833d80cf53debf1f840 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 24 Nov 2023 08:53:56 +0000 Subject: [PATCH 5/6] Changes generated by 2f23200f3cf18848a0986f6b65b443800fd9dfba --- GoCardless/Resources/TransferredMandate.cs | 28 +++++++++++-------- .../Services/TransferredMandateService.cs | 15 ++++------ 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/GoCardless/Resources/TransferredMandate.cs b/GoCardless/Resources/TransferredMandate.cs index 02f4901..565d9f5 100644 --- a/GoCardless/Resources/TransferredMandate.cs +++ b/GoCardless/Resources/TransferredMandate.cs @@ -16,28 +16,32 @@ namespace GoCardless.Resources public class TransferredMandate { /// - /// Encrypted bank account details + /// Encrypted customer bank account details, containing: + /// `iban`, `account_holder_name`, `swift_bank_code`, + /// `swift_branch_code`, `swift_account_number` /// - [JsonProperty("encrypted_data")] - public string EncryptedData { get; set; } + [JsonProperty("encrypted_customer_bank_details")] + public string EncryptedCustomerBankDetails { get; set; } /// - /// Encrypted AES key + /// Random AES-256 key used to encrypt bank account details, itself + /// encrypted with your public key. /// - [JsonProperty("key")] - public string Key { get; set; } - - /// - /// Public key id used to encrypt AES key - /// - [JsonProperty("kid")] - public string Kid { get; set; } + [JsonProperty("encrypted_decryption_key")] + public string EncryptedDecryptionKey { get; set; } /// /// Resources linked to this TransferredMandate. /// [JsonProperty("links")] public TransferredMandateLinks Links { get; set; } + + /// + /// The ID of an RSA-2048 public key, from your JWKS, used to encrypt + /// the AES key. + /// + [JsonProperty("public_key_id")] + public string PublicKeyId { get; set; } } /// diff --git a/GoCardless/Services/TransferredMandateService.cs b/GoCardless/Services/TransferredMandateService.cs index ca7e84d..949be63 100644 --- a/GoCardless/Services/TransferredMandateService.cs +++ b/GoCardless/Services/TransferredMandateService.cs @@ -33,7 +33,8 @@ public TransferredMandateService(GoCardlessClient goCardlessClient) } /// - /// Returns encrypted bank details for the transferred mandate + /// Returns new customer bank details for a mandate that's been recently + /// transferred /// /// Unique identifier, beginning with "MD". Note that this prefix may /// not apply to mandates created before 2016. @@ -50,23 +51,17 @@ public Task TransferredMandatesAsync(string identity new KeyValuePair("identity", identity), }; - return _goCardlessClient.ExecuteAsync("GET", "/transferred_mandate/:identity", urlParams, request, null, null, customiseRequestMessage); + return _goCardlessClient.ExecuteAsync("GET", "/transferred_mandates/:identity", urlParams, request, null, null, customiseRequestMessage); } } /// - /// Returns encrypted bank details for the transferred mandate + /// Returns new customer bank details for a mandate that's been recently + /// transferred /// public class TransferredMandateTransferredMandatesRequest { - - /// - /// 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. - /// - [JsonProperty("metadata")] - public IDictionary Metadata { get; set; } } /// From 6b652d19f1e3220ff4b6229c8533f9adf241d119 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 11 Dec 2023 14:50:15 +0000 Subject: [PATCH 6/6] Changes generated by ac1d9e57947b1e0b7069a2e4118621ffdfdbacff --- GoCardless/GoCardless.csproj | 4 ++-- GoCardless/GoCardlessClient.cs | 4 ++-- README.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GoCardless/GoCardless.csproj b/GoCardless/GoCardless.csproj index 9f5d796..9fb221d 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 5.18.0 + 5.19.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/v5.18.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v5.19.0 netstandard1.6;netstandard2.0;net46 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index 1021b42..80fd58a 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.18.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}"; + var userAgentInformation = $" gocardless-dotnet/5.19.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", "5.18.0"); + requestMessage.Headers.Add("GoCardless-Client-Version", "5.19.0"); requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet"); requestMessage.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken); diff --git a/README.md b/README.md index 80340a2..4fc7461 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.18.0` +`Install-Package GoCardless -Version 5.19.0` ## Usage