From ac2e2af62ae1178d5b7b6c09e90e19e82b37310d Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 17:58:29 +0000 Subject: [PATCH 1/5] Changes generated by 5011afd9d764ce5480069553f9dd165b6e460c8a This commit was automatically created from gocardless/gocardless-dotnet-template@5011afd9d764ce5480069553f9dd165b6e460c8a by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/11038487742 --- GoCardless/Resources/BillingRequest.cs | 191 ------------------- GoCardless/Services/BillingRequestService.cs | 177 ----------------- 2 files changed, 368 deletions(-) diff --git a/GoCardless/Resources/BillingRequest.cs b/GoCardless/Resources/BillingRequest.cs index 5c9ad7e..c466efc 100644 --- a/GoCardless/Resources/BillingRequest.cs +++ b/GoCardless/Resources/BillingRequest.cs @@ -114,12 +114,6 @@ public class BillingRequest /// [JsonProperty("status")] public string Status { get; set; } - - /// - /// Request for a subscription - /// - [JsonProperty("subscription_request")] - public BillingRequestSubscriptionRequest SubscriptionRequest { get; set; } } /// @@ -472,12 +466,6 @@ public class BillingRequestLinks /// [JsonProperty("payment_request_payment")] public string PaymentRequestPayment { get; set; } - - /// - /// (Optional) ID of the associated subscription request - /// - [JsonProperty("subscription_request")] - public string SubscriptionRequest { get; set; } } /// @@ -1361,183 +1349,4 @@ public enum BillingRequestStatus { Cancelled, } - /// - /// Represents a billing request subscription request resource. - /// - /// Request for a subscription - /// - public class BillingRequestSubscriptionRequest - { - /// - /// Amount in the lowest denomination for the currency (e.g. pence in - /// GBP, cents in EUR). - /// - [JsonProperty("amount")] - public int? Amount { get; set; } - - /// - /// The amount to be deducted from each payment as an app fee, to be - /// paid to the partner integration which created the subscription, in - /// the lowest denomination for the currency (e.g. pence in GBP, cents - /// in EUR). - /// - [JsonProperty("app_fee")] - public int? AppFee { get; set; } - - /// - /// The total number of payments that should be taken by this - /// subscription. - /// - [JsonProperty("count")] - public int? Count { get; set; } - - /// - /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) - /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", - /// "SEK" and "USD" are supported. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// As per RFC 2445. The day of the month to charge customers on. - /// `1`-`28` or `-1` to indicate the last day of the month. - /// - [JsonProperty("day_of_month")] - public int? DayOfMonth { get; set; } - - /// - /// Number of `interval_units` between customer charge dates. Must be - /// greater than or equal to `1`. Must result in at least one charge - /// date per year. Defaults to `1`. - /// - [JsonProperty("interval")] - public int? Interval { get; set; } - - /// - /// The unit of time between customer charge dates. One of `weekly`, - /// `monthly` or `yearly`. - /// - [JsonProperty("interval_unit")] - public BillingRequestSubscriptionRequestIntervalUnit? IntervalUnit { get; set; } - - /// - /// 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; } - - /// - /// Name of the month on which to charge a customer. Must be lowercase. - /// Only applies - /// when the interval_unit is `yearly`. - /// - /// - [JsonProperty("month")] - public BillingRequestSubscriptionRequestMonth? Month { get; set; } - - /// - /// Optional name for the subscription. This will be set as the - /// description on each payment created. Must not exceed 255 characters. - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// An optional payment reference. This will be set as the reference on - /// each payment - /// created and will appear on your customer's bank statement. See the - /// documentation for - /// the [create payment endpoint](#payments-create-a-payment) for more - /// details. - ///
- ///

Restricted: You need - /// your own Service User Number to specify a payment reference for Bacs - /// payments.

- ///
- [JsonProperty("payment_reference")] - public string PaymentReference { get; set; } - - /// - /// The date on which the first payment should be charged. Must be on or - /// after the [mandate](#core-endpoints-mandates)'s - /// `next_possible_charge_date`. When left blank and `month` or - /// `day_of_month` are provided, this will be set to the date of the - /// first payment. If created without `month` or `day_of_month` this - /// will be set as the mandate's `next_possible_charge_date` - /// - [JsonProperty("start_date")] - public string StartDate { get; set; } - } - - /// - /// The unit of time between customer charge dates. One of `weekly`, `monthly` or `yearly`. - /// - [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] - public enum BillingRequestSubscriptionRequestIntervalUnit { - /// Unknown status - [EnumMember(Value = "unknown")] - Unknown = 0, - - /// `interval_unit` with a value of "weekly" - [EnumMember(Value = "weekly")] - Weekly, - /// `interval_unit` with a value of "monthly" - [EnumMember(Value = "monthly")] - Monthly, - /// `interval_unit` with a value of "yearly" - [EnumMember(Value = "yearly")] - Yearly, - } - - /// - /// Name of the month on which to charge a customer. Must be lowercase. Only applies - /// when the interval_unit is `yearly`. - /// - /// - [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] - public enum BillingRequestSubscriptionRequestMonth { - /// Unknown status - [EnumMember(Value = "unknown")] - Unknown = 0, - - /// `month` with a value of "january" - [EnumMember(Value = "january")] - January, - /// `month` with a value of "february" - [EnumMember(Value = "february")] - February, - /// `month` with a value of "march" - [EnumMember(Value = "march")] - March, - /// `month` with a value of "april" - [EnumMember(Value = "april")] - April, - /// `month` with a value of "may" - [EnumMember(Value = "may")] - May, - /// `month` with a value of "june" - [EnumMember(Value = "june")] - June, - /// `month` with a value of "july" - [EnumMember(Value = "july")] - July, - /// `month` with a value of "august" - [EnumMember(Value = "august")] - August, - /// `month` with a value of "september" - [EnumMember(Value = "september")] - September, - /// `month` with a value of "october" - [EnumMember(Value = "october")] - October, - /// `month` with a value of "november" - [EnumMember(Value = "november")] - November, - /// `month` with a value of "december" - [EnumMember(Value = "december")] - December, - } - } diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index 43b4b5c..fec7025 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -916,183 +916,6 @@ public enum BillingRequestPurposeCode Other, } - [JsonProperty("subscription_request")] - public BillingRequestSubscriptionRequest SubscriptionRequest { get; set; } - /// - /// - /// - public class BillingRequestSubscriptionRequest - { - - /// - /// Amount in the lowest denomination for the currency (e.g. pence - /// in GBP, cents in EUR). - /// - [JsonProperty("amount")] - public int? Amount { get; set; } - - /// - /// The amount to be deducted from each payment as an app fee, to be - /// paid to the partner integration which created the subscription, - /// in the lowest denomination for the currency (e.g. pence in GBP, - /// cents in EUR). - /// - [JsonProperty("app_fee")] - public int? AppFee { get; set; } - - /// - /// The total number of payments that should be taken by this - /// subscription. - /// - [JsonProperty("count")] - public int? Count { get; set; } - - /// - /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) - /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", - /// "NZD", "SEK" and "USD" are supported. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// As per RFC 2445. The day of the month to charge customers on. - /// `1`-`28` or `-1` to indicate the last day of the month. - /// - [JsonProperty("day_of_month")] - public int? DayOfMonth { get; set; } - - /// - /// Number of `interval_units` between customer charge dates. Must - /// be greater than or equal to `1`. Must result in at least one - /// charge date per year. Defaults to `1`. - /// - [JsonProperty("interval")] - public int? Interval { get; set; } - - /// - /// The unit of time between customer charge dates. One of `weekly`, - /// `monthly` or `yearly`. - /// - [JsonProperty("interval_unit")] - public BillingRequestIntervalUnit? IntervalUnit { get; set; } - /// - /// The unit of time between customer charge dates. One of `weekly`, - /// `monthly` or `yearly`. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum BillingRequestIntervalUnit - { - - /// `interval_unit` with a value of "weekly" - [EnumMember(Value = "weekly")] - Weekly, - /// `interval_unit` with a value of "monthly" - [EnumMember(Value = "monthly")] - Monthly, - /// `interval_unit` with a value of "yearly" - [EnumMember(Value = "yearly")] - Yearly, - } - - /// - /// 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; } - - /// - /// Name of the month on which to charge a customer. Must be - /// lowercase. Only applies - /// when the interval_unit is `yearly`. - /// - /// - [JsonProperty("month")] - public BillingRequestMonth? Month { get; set; } - /// - /// Name of the month on which to charge a customer. Must be lowercase. - /// Only applies - /// when the interval_unit is `yearly`. - /// - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum BillingRequestMonth - { - - /// `month` with a value of "january" - [EnumMember(Value = "january")] - January, - /// `month` with a value of "february" - [EnumMember(Value = "february")] - February, - /// `month` with a value of "march" - [EnumMember(Value = "march")] - March, - /// `month` with a value of "april" - [EnumMember(Value = "april")] - April, - /// `month` with a value of "may" - [EnumMember(Value = "may")] - May, - /// `month` with a value of "june" - [EnumMember(Value = "june")] - June, - /// `month` with a value of "july" - [EnumMember(Value = "july")] - July, - /// `month` with a value of "august" - [EnumMember(Value = "august")] - August, - /// `month` with a value of "september" - [EnumMember(Value = "september")] - September, - /// `month` with a value of "october" - [EnumMember(Value = "october")] - October, - /// `month` with a value of "november" - [EnumMember(Value = "november")] - November, - /// `month` with a value of "december" - [EnumMember(Value = "december")] - December, - } - - /// - /// Optional name for the subscription. This will be set as the - /// description on each payment created. Must not exceed 255 - /// characters. - /// - [JsonProperty("name")] - public string Name { get; set; } - - /// - /// An optional payment reference. This will be set as the reference - /// on each payment - /// created and will appear on your customer's bank statement. See - /// the documentation for - /// the [create payment endpoint](#payments-create-a-payment) for - /// more details. - ///
- ///

Restricted: You - /// need your own Service User Number to specify a payment reference - /// for Bacs payments.

- ///
- [JsonProperty("payment_reference")] - public string PaymentReference { get; set; } - - /// - /// The date on which the first payment should be charged. Must be - /// on or after the [mandate](#core-endpoints-mandates)'s - /// `next_possible_charge_date`. When left blank and `month` or - /// `day_of_month` are provided, this will be set to the date of the - /// first payment. If created without `month` or `day_of_month` this - /// will be set as the mandate's `next_possible_charge_date` - /// - [JsonProperty("start_date")] - public string StartDate { get; set; } - } - /// /// A unique key to ensure that this request only succeeds once, allowing you to safely retry request errors such as network failures. /// Any requests, where supported, to create a resource with a key that has previously been used will not succeed. From c1d4d251b0e55532a7fc24750068ab6468899cef Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:12:29 +0000 Subject: [PATCH 2/5] Changes generated by 4878d2e5698e41668516419d27814db71b8b34a9 This commit was automatically created from gocardless/gocardless-dotnet-template@4878d2e5698e41668516419d27814db71b8b34a9 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/11292981533 --- GoCardless/Services/BillingRequestService.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index fec7025..59b6bf1 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -844,6 +844,18 @@ public enum BillingRequestFundsSettlement [JsonProperty("reference")] public string Reference { get; set; } + /// + /// On failure, automatically retry payments using [intelligent + /// retries](#success-intelligent-retries). Default is `false`.

Important: To be able to use + /// intelligent retries, Success+ needs to be enabled in [GoCardless + /// dashboard](https://manage.gocardless.com/success-plus).

Important: This is not + /// applicable to IBP and VRP payments.

+ ///
+ [JsonProperty("retry_if_possible")] + public bool? RetryIfPossible { get; set; } + /// /// (Optional) A scheme used for Open Banking payments. Currently /// `faster_payments` is supported in the UK (GBP) and From 24c774a9bb264154de33c8d477844d7345c9fcdf Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 14:17:40 +0000 Subject: [PATCH 3/5] Changes generated by f3a07466c6e9519d8cea161884d63899d894dd1a This commit was automatically created from gocardless/gocardless-dotnet-template@f3a07466c6e9519d8cea161884d63899d894dd1a by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/11347988169 --- GoCardless/Resources/BillingRequestFlow.cs | 8 ++++++++ GoCardless/Services/BillingRequestFlowService.cs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/GoCardless/Resources/BillingRequestFlow.cs b/GoCardless/Resources/BillingRequestFlow.cs index c898d8e..1130c26 100644 --- a/GoCardless/Resources/BillingRequestFlow.cs +++ b/GoCardless/Resources/BillingRequestFlow.cs @@ -163,6 +163,14 @@ public class BillingRequestFlow /// [JsonProperty("show_success_redirect_button")] public bool? ShowSuccessRedirectButton { get; set; } + + /// + /// If true, the payer will not be redirected to the success screen + /// after completing the flow. A redirect_uri needs to be provided for + /// this parameter to be taken into account. + /// + [JsonProperty("skip_success_screen")] + public bool? SkipSuccessScreen { get; set; } } /// diff --git a/GoCardless/Services/BillingRequestFlowService.cs b/GoCardless/Services/BillingRequestFlowService.cs index 7585fa8..adbee71 100644 --- a/GoCardless/Services/BillingRequestFlowService.cs +++ b/GoCardless/Services/BillingRequestFlowService.cs @@ -333,6 +333,14 @@ public class BillingRequestFlowPrefilledCustomer /// [JsonProperty("show_success_redirect_button")] public bool? ShowSuccessRedirectButton { get; set; } + + /// + /// If true, the payer will not be redirected to the success screen + /// after completing the flow. A redirect_uri needs to be provided for + /// this parameter to be taken into account. + /// + [JsonProperty("skip_success_screen")] + public bool? SkipSuccessScreen { get; set; } } From 36acc02a32f9db4fd13317a18969889294414a89 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:04:56 +0000 Subject: [PATCH 4/5] Changes generated by e4f26bba4f25285ed1bba5716f2e3090128b22e4 This commit was automatically created from gocardless/gocardless-dotnet-template@e4f26bba4f25285ed1bba5716f2e3090128b22e4 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/11681827519 --- GoCardless/Resources/BillingRequest.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GoCardless/Resources/BillingRequest.cs b/GoCardless/Resources/BillingRequest.cs index c466efc..62d5e30 100644 --- a/GoCardless/Resources/BillingRequest.cs +++ b/GoCardless/Resources/BillingRequest.cs @@ -52,6 +52,12 @@ public class BillingRequest [JsonProperty("fallback_enabled")] public bool? FallbackEnabled { get; set; } + /// + /// True if the billing request was completed with direct debit. + /// + [JsonProperty("fallback_occurred")] + public bool? FallbackOccurred { get; set; } + /// /// Unique identifier, beginning with "BRQ". /// From 73ffb2ea7091a2b63689ca5640100ad2e70eea45 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:27:45 +0000 Subject: [PATCH 5/5] Changes generated by d8acd316a77f26925af9df3b96d2bb852a089773 This commit was automatically created from gocardless/gocardless-dotnet-template@d8acd316a77f26925af9df3b96d2bb852a089773 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/11701683629 --- 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 63829c4..1e7a3b9 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 7.0.0 + 7.1.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.0.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v7.1.0 netstandard1.6;netstandard2.0;netstandard2.1;net46;net8.0 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index 3d5c4d7..ba8f5c0 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.0.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}"; + var userAgentInformation = $" gocardless-dotnet/7.1.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.0.0"); + requestMessage.Headers.Add("GoCardless-Client-Version", "7.1.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 4bd34df..92e70eb 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.0.0` +`Install-Package GoCardless -Version 7.1.0` ## Usage