diff --git a/GoCardless/GoCardless.csproj b/GoCardless/GoCardless.csproj index fb8d185..a9d697e 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 5.10.0 + 5.11.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.10.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v5.11.0 netstandard1.6;netstandard2.0;net46 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index 526260b..b78018d 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.10.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}"; + var userAgentInformation = $" gocardless-dotnet/5.11.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.10.0"); + requestMessage.Headers.Add("GoCardless-Client-Version", "5.11.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/BillingRequest.cs b/GoCardless/Resources/BillingRequest.cs index d17a26c..b21b5b1 100644 --- a/GoCardless/Resources/BillingRequest.cs +++ b/GoCardless/Resources/BillingRequest.cs @@ -399,6 +399,22 @@ public class BillingRequestLinks /// public class BillingRequestMandateRequest { + /// + /// This field is ACH specific, sometimes referred to as [SEC + /// code](https://www.moderntreasury.com/learn/sec-codes). + /// + /// This is the way that the payer gives authorisation to the merchant. + /// web: Authorisation is Internet Initiated or via Mobile Entry (maps + /// to SEC code: WEB) + /// telephone: Authorisation is provided orally over telephone (maps + /// to SEC code: TEL) + /// paper: Authorisation is provided in writing and signed, or + /// similarly authenticated (maps to SEC code: PPD) + /// + /// + [JsonProperty("authorisation_source")] + public BillingRequestMandateRequestAuthorisationSource? AuthorisationSource { get; set; } + /// /// Constraints that will apply to the mandate_request. (Optional) /// Specifically for PayTo and VRP. @@ -477,6 +493,34 @@ public class BillingRequestMandateRequest public BillingRequestMandateRequestVerify? Verify { get; set; } } + /// + /// This field is ACH specific, sometimes referred to as [SEC + /// code](https://www.moderntreasury.com/learn/sec-codes). + /// + /// This is the way that the payer gives authorisation to the merchant. + /// web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB) + /// telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL) + /// paper: Authorisation is provided in writing and signed, or similarly authenticated (maps + /// to SEC code: PPD) + /// + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum BillingRequestMandateRequestAuthorisationSource { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `authorisation_source` with a value of "web" + [EnumMember(Value = "web")] + Web, + /// `authorisation_source` with a value of "telephone" + [EnumMember(Value = "telephone")] + Telephone, + /// `authorisation_source` with a value of "paper" + [EnumMember(Value = "paper")] + Paper, + } + /// /// Represents a billing request mandate request constraint resource. /// diff --git a/GoCardless/Resources/Mandate.cs b/GoCardless/Resources/Mandate.cs index 7b684b1..aa07b68 100644 --- a/GoCardless/Resources/Mandate.cs +++ b/GoCardless/Resources/Mandate.cs @@ -19,6 +19,22 @@ namespace GoCardless.Resources /// public class Mandate { + /// + /// This field is ACH specific, sometimes referred to as [SEC + /// code](https://www.moderntreasury.com/learn/sec-codes). + /// + /// This is the way that the payer gives authorisation to the merchant. + /// web: Authorisation is Internet Initiated or via Mobile Entry (maps + /// to SEC code: WEB) + /// telephone: Authorisation is provided orally over telephone (maps + /// to SEC code: TEL) + /// paper: Authorisation is provided in writing and signed, or + /// similarly authenticated (maps to SEC code: PPD) + /// + /// + [JsonProperty("authorisation_source")] + public MandateAuthorisationSource? AuthorisationSource { get; set; } + /// /// (Optional) Payto and VRP Scheme specific information /// @@ -111,6 +127,34 @@ public class Mandate public MandateStatus? Status { get; set; } } + /// + /// This field is ACH specific, sometimes referred to as [SEC + /// code](https://www.moderntreasury.com/learn/sec-codes). + /// + /// This is the way that the payer gives authorisation to the merchant. + /// web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB) + /// telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL) + /// paper: Authorisation is provided in writing and signed, or similarly authenticated (maps + /// to SEC code: PPD) + /// + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum MandateAuthorisationSource { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `authorisation_source` with a value of "web" + [EnumMember(Value = "web")] + Web, + /// `authorisation_source` with a value of "telephone" + [EnumMember(Value = "telephone")] + Telephone, + /// `authorisation_source` with a value of "paper" + [EnumMember(Value = "paper")] + Paper, + } + /// /// Represents a mandate consent parameter resource. /// diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index f66cc5c..d64730d 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -525,6 +525,50 @@ public class BillingRequestLinks public class BillingRequestMandateRequest { + /// + /// This field is ACH specific, sometimes referred to as [SEC + /// code](https://www.moderntreasury.com/learn/sec-codes). + /// + /// This is the way that the payer gives authorisation to the + /// merchant. + /// web: Authorisation is Internet Initiated or via Mobile Entry + /// (maps to SEC code: WEB) + /// telephone: Authorisation is provided orally over telephone + /// (maps to SEC code: TEL) + /// paper: Authorisation is provided in writing and signed, or + /// similarly authenticated (maps to SEC code: PPD) + /// + /// + [JsonProperty("authorisation_source")] + public BillingRequestAuthorisationSource? AuthorisationSource { get; set; } + /// + /// This field is ACH specific, sometimes referred to as [SEC + /// code](https://www.moderntreasury.com/learn/sec-codes). + /// + /// This is the way that the payer gives authorisation to the merchant. + /// web: Authorisation is Internet Initiated or via Mobile Entry (maps + /// to SEC code: WEB) + /// telephone: Authorisation is provided orally over telephone (maps + /// to SEC code: TEL) + /// paper: Authorisation is provided in writing and signed, or + /// similarly authenticated (maps to SEC code: PPD) + /// + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BillingRequestAuthorisationSource + { + + /// `authorisation_source` with a value of "web" + [EnumMember(Value = "web")] + Web, + /// `authorisation_source` with a value of "telephone" + [EnumMember(Value = "telephone")] + Telephone, + /// `authorisation_source` with a value of "paper" + [EnumMember(Value = "paper")] + Paper, + } + /// /// Constraints that will apply to the mandate_request. (Optional) /// Specifically for PayTo and VRP. diff --git a/GoCardless/Services/MandateService.cs b/GoCardless/Services/MandateService.cs index fda90e1..f9a3c30 100644 --- a/GoCardless/Services/MandateService.cs +++ b/GoCardless/Services/MandateService.cs @@ -215,6 +215,50 @@ public Task ReinstateAsync(string identity, MandateReinstateReq public class MandateCreateRequest : IHasIdempotencyKey { + /// + /// This field is ACH specific, sometimes referred to as [SEC + /// code](https://www.moderntreasury.com/learn/sec-codes). + /// + /// This is the way that the payer gives authorisation to the merchant. + /// web: Authorisation is Internet Initiated or via Mobile Entry (maps + /// to SEC code: WEB) + /// telephone: Authorisation is provided orally over telephone (maps + /// to SEC code: TEL) + /// paper: Authorisation is provided in writing and signed, or + /// similarly authenticated (maps to SEC code: PPD) + /// + /// + [JsonProperty("authorisation_source")] + public MandateAuthorisationSource? AuthorisationSource { get; set; } + + /// + /// This field is ACH specific, sometimes referred to as [SEC + /// code](https://www.moderntreasury.com/learn/sec-codes). + /// + /// This is the way that the payer gives authorisation to the merchant. + /// web: Authorisation is Internet Initiated or via Mobile Entry (maps + /// to SEC code: WEB) + /// telephone: Authorisation is provided orally over telephone (maps + /// to SEC code: TEL) + /// paper: Authorisation is provided in writing and signed, or + /// similarly authenticated (maps to SEC code: PPD) + /// + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum MandateAuthorisationSource + { + + /// `authorisation_source` with a value of "web" + [EnumMember(Value = "web")] + Web, + /// `authorisation_source` with a value of "telephone" + [EnumMember(Value = "telephone")] + Telephone, + /// `authorisation_source` with a value of "paper" + [EnumMember(Value = "paper")] + Paper, + } + /// /// Linked resources. /// diff --git a/README.md b/README.md index 896a64d..d74b83a 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.10.0` +`Install-Package GoCardless -Version 5.11.0` ## Usage