From b3d0b8b14254b7a00f12eb43c0a82c3a843bd968 Mon Sep 17 00:00:00 2001 From: Robot Date: Wed, 4 Jan 2023 11:57:28 +0000 Subject: [PATCH 01/12] Changes generated by dcbc26a43f3f08f7da8fed02b6ed5a7df7529e2a --- GoCardless/Resources/BillingRequest.cs | 4 ++++ GoCardless/Resources/PayerAuthorisation.cs | 4 ++++ GoCardless/Services/BillingRequestService.cs | 4 ++++ GoCardless/Services/MandateService.cs | 4 ++++ GoCardless/Services/PayerAuthorisationService.cs | 8 ++++++++ 5 files changed, 24 insertions(+) diff --git a/GoCardless/Resources/BillingRequest.cs b/GoCardless/Resources/BillingRequest.cs index b21b5b1..23c9e65 100644 --- a/GoCardless/Resources/BillingRequest.cs +++ b/GoCardless/Resources/BillingRequest.cs @@ -1077,6 +1077,10 @@ public class BillingRequestResourcesCustomerBillingDetail /// containing the IP address of the payer to whom the mandate belongs /// (i.e. as a result of their completion of a mandate setup flow in /// their browser). + /// + /// Not required for creating offline mandates where + /// `authorisation_source` is set to telephone or paper. + /// /// [JsonProperty("ip_address")] public string IpAddress { get; set; } diff --git a/GoCardless/Resources/PayerAuthorisation.cs b/GoCardless/Resources/PayerAuthorisation.cs index 6980d95..258725f 100644 --- a/GoCardless/Resources/PayerAuthorisation.cs +++ b/GoCardless/Resources/PayerAuthorisation.cs @@ -444,6 +444,10 @@ public class PayerAuthorisationMandate /// containing the IP address of the payer to whom the mandate belongs /// (i.e. as a result of their completion of a mandate setup flow in /// their browser). + /// + /// Not required for creating offline mandates where + /// `authorisation_source` is set to telephone or paper. + /// /// [JsonProperty("payer_ip_address")] public string PayerIpAddress { get; set; } diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index d64730d..a502aaf 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -1052,6 +1052,10 @@ public class BillingRequestCustomerBillingDetail /// containing the IP address of the payer to whom the mandate /// belongs (i.e. as a result of their completion of a mandate setup /// flow in their browser). + /// + /// Not required for creating offline mandates where + /// `authorisation_source` is set to telephone or paper. + /// /// [JsonProperty("ip_address")] public string IpAddress { get; set; } diff --git a/GoCardless/Services/MandateService.cs b/GoCardless/Services/MandateService.cs index f9a3c30..455cc05 100644 --- a/GoCardless/Services/MandateService.cs +++ b/GoCardless/Services/MandateService.cs @@ -298,6 +298,10 @@ public class MandateLinks /// containing the IP address of the payer to whom the mandate belongs /// (i.e. as a result of their completion of a mandate setup flow in /// their browser). + /// + /// Not required for creating offline mandates where + /// `authorisation_source` is set to telephone or paper. + /// /// [JsonProperty("payer_ip_address")] public string PayerIpAddress { get; set; } diff --git a/GoCardless/Services/PayerAuthorisationService.cs b/GoCardless/Services/PayerAuthorisationService.cs index d3eaa52..7774c70 100644 --- a/GoCardless/Services/PayerAuthorisationService.cs +++ b/GoCardless/Services/PayerAuthorisationService.cs @@ -509,6 +509,10 @@ public class PayerAuthorisationMandate /// containing the IP address of the payer to whom the mandate /// belongs (i.e. as a result of their completion of a mandate setup /// flow in their browser). + /// + /// Not required for creating offline mandates where + /// `authorisation_source` is set to telephone or paper. + /// /// [JsonProperty("payer_ip_address")] public string PayerIpAddress { get; set; } @@ -866,6 +870,10 @@ public class PayerAuthorisationMandate /// containing the IP address of the payer to whom the mandate /// belongs (i.e. as a result of their completion of a mandate setup /// flow in their browser). + /// + /// Not required for creating offline mandates where + /// `authorisation_source` is set to telephone or paper. + /// /// [JsonProperty("payer_ip_address")] public string PayerIpAddress { get; set; } From ca6cd34c779f67859829c0c1a3e6479962497e01 Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 12 Jan 2023 16:14:13 +0000 Subject: [PATCH 02/12] Changes generated by 46dd03f0e253515430b8f06b9509d9721c637028 --- GoCardless/Services/CreditorService.cs | 36 -------------------------- 1 file changed, 36 deletions(-) diff --git a/GoCardless/Services/CreditorService.cs b/GoCardless/Services/CreditorService.cs index cb2b0ed..5f98288 100644 --- a/GoCardless/Services/CreditorService.cs +++ b/GoCardless/Services/CreditorService.cs @@ -158,30 +158,6 @@ public Task UpdateAsync(string identity, CreditorUpdateRequest public class CreditorCreateRequest : IHasIdempotencyKey { - /// - /// The first line of the creditor's address. - /// - [JsonProperty("address_line1")] - public string AddressLine1 { get; set; } - - /// - /// The second line of the creditor's address. - /// - [JsonProperty("address_line2")] - public string AddressLine2 { get; set; } - - /// - /// The third line of the creditor's address. - /// - [JsonProperty("address_line3")] - public string AddressLine3 { get; set; } - - /// - /// The city of the creditor's address. - /// - [JsonProperty("city")] - public string City { get; set; } - /// /// [ISO 3166-1 alpha-2 /// code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) @@ -233,18 +209,6 @@ public enum CreditorCreditorType [JsonProperty("name")] public string Name { get; set; } - /// - /// The creditor's postal code. - /// - [JsonProperty("postal_code")] - public string PostalCode { get; set; } - - /// - /// The creditor's address region, county or department. - /// - [JsonProperty("region")] - public string Region { 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 3bff21f8ff0c6b722bd59c5d789077501fa4f403 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 13 Jan 2023 11:18:16 +0000 Subject: [PATCH 03/12] Changes generated by 332396f351c61312d1aeed610e3026ea04026369 --- GoCardless/Resources/Mandate.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GoCardless/Resources/Mandate.cs b/GoCardless/Resources/Mandate.cs index aa07b68..9e33dbc 100644 --- a/GoCardless/Resources/Mandate.cs +++ b/GoCardless/Resources/Mandate.cs @@ -125,6 +125,13 @@ public class Mandate /// [JsonProperty("status")] public MandateStatus? Status { get; set; } + + /// + /// [Timestamp](#api-usage-time-zones--dates) recording when this + /// mandate was verified. + /// + [JsonProperty("verified_at")] + public string VerifiedAt { get; set; } } /// From 02625d53f1e8aef98b986cd7d9cbda96c4fb0a7d Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 20 Jan 2023 14:28:37 +0000 Subject: [PATCH 04/12] Changes generated by 46dd03f0e253515430b8f06b9509d9721c637028 --- GoCardless/Resources/Mandate.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/GoCardless/Resources/Mandate.cs b/GoCardless/Resources/Mandate.cs index 9e33dbc..aa07b68 100644 --- a/GoCardless/Resources/Mandate.cs +++ b/GoCardless/Resources/Mandate.cs @@ -125,13 +125,6 @@ public class Mandate /// [JsonProperty("status")] public MandateStatus? Status { get; set; } - - /// - /// [Timestamp](#api-usage-time-zones--dates) recording when this - /// mandate was verified. - /// - [JsonProperty("verified_at")] - public string VerifiedAt { get; set; } } /// From 0e5bf9cf082d554367320ffdee8d795f4d3bb6b2 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 20 Jan 2023 18:27:33 +0000 Subject: [PATCH 05/12] Changes generated by 8136fad7476975ffdfe47377b09fe5548e9ad43d --- GoCardless/GoCardlessClient.Generated.cs | 5 + GoCardless/Resources/Creditor.cs | 55 +++- GoCardless/Resources/Mandate.cs | 7 + GoCardless/Resources/SchemeIdentifier.cs | 238 ++++++++++++++++++ .../Services/SchemeIdentifierService.cs | 173 +++++++++++++ changes.patch | 0 6 files changed, 470 insertions(+), 8 deletions(-) create mode 100644 GoCardless/Resources/SchemeIdentifier.cs create mode 100644 GoCardless/Services/SchemeIdentifierService.cs create mode 100644 changes.patch diff --git a/GoCardless/GoCardlessClient.Generated.cs b/GoCardless/GoCardlessClient.Generated.cs index f9cd0c1..d0d37c8 100644 --- a/GoCardless/GoCardlessClient.Generated.cs +++ b/GoCardless/GoCardlessClient.Generated.cs @@ -138,6 +138,11 @@ public partial class GoCardlessClient /// public ScenarioSimulatorService ScenarioSimulators => new ScenarioSimulatorService(this); + /// + ///A service for working with schemeentifier resources. + /// + public SchemeIdentifierService SchemeIdentifiers => new SchemeIdentifierService(this); + /// ///A service for working with subscription resources. /// diff --git a/GoCardless/Resources/Creditor.cs b/GoCardless/Resources/Creditor.cs index d2ae814..9563d4e 100644 --- a/GoCardless/Resources/Creditor.cs +++ b/GoCardless/Resources/Creditor.cs @@ -329,19 +329,19 @@ public class CreditorLinks public class CreditorSchemeIdentifier { /// - /// The first line of the support address. + /// The first line of the scheme identifier's support address. /// [JsonProperty("address_line1")] public string AddressLine1 { get; set; } /// - /// The second line of the support address. + /// The second line of the scheme identifier's support address. /// [JsonProperty("address_line2")] public string AddressLine2 { get; set; } /// - /// The third line of the support address. + /// The third line of the scheme identifier's support address. /// [JsonProperty("address_line3")] public string AddressLine3 { get; set; } @@ -354,7 +354,7 @@ public class CreditorSchemeIdentifier public bool? CanSpecifyMandateReference { get; set; } /// - /// The city of the support address. + /// The city of the scheme identifier's support address. /// [JsonProperty("city")] public string City { get; set; } @@ -366,6 +366,13 @@ public class CreditorSchemeIdentifier [JsonProperty("country_code")] public string CountryCode { get; set; } + /// + /// Fixed [timestamp](#api-usage-time-zones--dates), recording when this + /// resource was created. + /// + [JsonProperty("created_at")] + public DateTimeOffset? CreatedAt { get; set; } + /// /// The currency of the scheme identifier. /// @@ -373,11 +380,17 @@ public class CreditorSchemeIdentifier public CreditorSchemeIdentifierCurrency? Currency { get; set; } /// - /// The support email address. + /// Scheme identifier's support email address. /// [JsonProperty("email")] public string Email { get; set; } + /// + /// Unique identifier, usually beginning with "SU". + /// + [JsonProperty("id")] + public string Id { get; set; } + /// /// The minimum interval, in working days, between the sending of a /// pre-notification to the customer, and the charge date of a payment @@ -397,13 +410,13 @@ public class CreditorSchemeIdentifier public string Name { get; set; } /// - /// The support phone number. + /// Scheme identifier's support phone number. /// [JsonProperty("phone_number")] public string PhoneNumber { get; set; } /// - /// The support postal code. + /// The scheme identifier's support postal code. /// [JsonProperty("postal_code")] public string PostalCode { get; set; } @@ -415,7 +428,8 @@ public class CreditorSchemeIdentifier public string Reference { get; set; } /// - /// The support address region, county or department. + /// The scheme identifier's support address region, county or + /// department. /// [JsonProperty("region")] public string Region { get; set; } @@ -425,6 +439,13 @@ public class CreditorSchemeIdentifier /// [JsonProperty("scheme")] public CreditorSchemeIdentifierScheme? Scheme { get; set; } + + /// + /// The status of the scheme identifier. Only `active` scheme + /// identifiers will be applied to a creditor and used against payments. + /// + [JsonProperty("status")] + public CreditorSchemeIdentifierStatus? Status { get; set; } } /// @@ -509,6 +530,24 @@ public enum CreditorSchemeIdentifierScheme { SepaInstantCreditTransfer, } + /// + /// The status of the scheme identifier. Only `active` scheme identifiers will be applied to a + /// creditor and used against payments. + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum CreditorSchemeIdentifierStatus { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `status` with a value of "pending" + [EnumMember(Value = "pending")] + Pending, + /// `status` with a value of "active" + [EnumMember(Value = "active")] + Active, + } + /// /// The creditor's verification status, indicating whether they can yet receive payouts. For /// more details on handling verification as a partner, see our ["Helping your users get diff --git a/GoCardless/Resources/Mandate.cs b/GoCardless/Resources/Mandate.cs index aa07b68..9e33dbc 100644 --- a/GoCardless/Resources/Mandate.cs +++ b/GoCardless/Resources/Mandate.cs @@ -125,6 +125,13 @@ public class Mandate /// [JsonProperty("status")] public MandateStatus? Status { get; set; } + + /// + /// [Timestamp](#api-usage-time-zones--dates) recording when this + /// mandate was verified. + /// + [JsonProperty("verified_at")] + public string VerifiedAt { get; set; } } /// diff --git a/GoCardless/Resources/SchemeIdentifier.cs b/GoCardless/Resources/SchemeIdentifier.cs new file mode 100644 index 0000000..2d471fe --- /dev/null +++ b/GoCardless/Resources/SchemeIdentifier.cs @@ -0,0 +1,238 @@ +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 schemeentifier resource. + /// + /// Scheme identifiers + /// + public class SchemeIdentifier + { + /// + /// The first line of the scheme identifier's support address. + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the scheme identifier's support address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the scheme identifier's support address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// Whether a custom reference can be submitted for mandates using this + /// scheme identifier. + /// + [JsonProperty("can_specify_mandate_reference")] + public bool? CanSpecifyMandateReference { get; set; } + + /// + /// The city of the scheme identifier's support address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// [ISO 3166-1 alpha-2 + /// code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// Fixed [timestamp](#api-usage-time-zones--dates), recording when this + /// resource was created. + /// + [JsonProperty("created_at")] + public DateTimeOffset? CreatedAt { get; set; } + + /// + /// The currency of the scheme identifier. + /// + [JsonProperty("currency")] + public SchemeIdentifierCurrency? Currency { get; set; } + + /// + /// Scheme identifier's support email address. + /// + [JsonProperty("email")] + public string Email { get; set; } + + /// + /// Unique identifier, usually beginning with "SU". + /// + [JsonProperty("id")] + public string Id { get; set; } + + /// + /// The minimum interval, in working days, between the sending of a + /// pre-notification to the customer, and the charge date of a payment + /// using this scheme identifier. + /// + /// By default, GoCardless sends these notifications automatically. + /// Please see our [compliance + /// requirements](#appendix-compliance-requirements) for more details. + /// + [JsonProperty("minimum_advance_notice")] + public int? MinimumAdvanceNotice { get; set; } + + /// + /// The name which appears on customers' bank statements. + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// Scheme identifier's support phone number. + /// + [JsonProperty("phone_number")] + public string PhoneNumber { get; set; } + + /// + /// The scheme identifier's support postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The scheme-unique identifier against which payments are submitted. + /// + [JsonProperty("reference")] + public string Reference { get; set; } + + /// + /// The scheme identifier's support address region, county or + /// department. + /// + [JsonProperty("region")] + public string Region { get; set; } + + /// + /// The scheme which this scheme identifier applies to. + /// + [JsonProperty("scheme")] + public SchemeIdentifierScheme? Scheme { get; set; } + + /// + /// The status of the scheme identifier. Only `active` scheme + /// identifiers will be applied to a creditor and used against payments. + /// + [JsonProperty("status")] + public SchemeIdentifierStatus? Status { get; set; } + } + + /// + /// The currency of the scheme identifier. + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum SchemeIdentifierCurrency { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `currency` with a value of "AUD" + [EnumMember(Value = "AUD")] + AUD, + /// `currency` with a value of "CAD" + [EnumMember(Value = "CAD")] + CAD, + /// `currency` with a value of "DKK" + [EnumMember(Value = "DKK")] + DKK, + /// `currency` with a value of "EUR" + [EnumMember(Value = "EUR")] + EUR, + /// `currency` with a value of "GBP" + [EnumMember(Value = "GBP")] + GBP, + /// `currency` with a value of "NZD" + [EnumMember(Value = "NZD")] + NZD, + /// `currency` with a value of "SEK" + [EnumMember(Value = "SEK")] + SEK, + /// `currency` with a value of "USD" + [EnumMember(Value = "USD")] + USD, + } + + /// + /// The scheme which this scheme identifier applies to. + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum SchemeIdentifierScheme { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `scheme` with a value of "ach" + [EnumMember(Value = "ach")] + Ach, + /// `scheme` with a value of "autogiro" + [EnumMember(Value = "autogiro")] + Autogiro, + /// `scheme` with a value of "bacs" + [EnumMember(Value = "bacs")] + Bacs, + /// `scheme` with a value of "becs" + [EnumMember(Value = "becs")] + Becs, + /// `scheme` with a value of "becs_nz" + [EnumMember(Value = "becs_nz")] + BecsNz, + /// `scheme` with a value of "betalingsservice" + [EnumMember(Value = "betalingsservice")] + Betalingsservice, + /// `scheme` with a value of "faster_payments" + [EnumMember(Value = "faster_payments")] + FasterPayments, + /// `scheme` with a value of "pad" + [EnumMember(Value = "pad")] + Pad, + /// `scheme` with a value of "pay_to" + [EnumMember(Value = "pay_to")] + PayTo, + /// `scheme` with a value of "sepa" + [EnumMember(Value = "sepa")] + Sepa, + /// `scheme` with a value of "sepa_credit_transfer" + [EnumMember(Value = "sepa_credit_transfer")] + SepaCreditTransfer, + /// `scheme` with a value of "sepa_instant_credit_transfer" + [EnumMember(Value = "sepa_instant_credit_transfer")] + SepaInstantCreditTransfer, + } + + /// + /// The status of the scheme identifier. Only `active` scheme identifiers will be applied to a + /// creditor and used against payments. + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum SchemeIdentifierStatus { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `status` with a value of "pending" + [EnumMember(Value = "pending")] + Pending, + /// `status` with a value of "active" + [EnumMember(Value = "active")] + Active, + } + +} diff --git a/GoCardless/Services/SchemeIdentifierService.cs b/GoCardless/Services/SchemeIdentifierService.cs new file mode 100644 index 0000000..e9b0067 --- /dev/null +++ b/GoCardless/Services/SchemeIdentifierService.cs @@ -0,0 +1,173 @@ + + +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 scheme identifier resources. + /// + /// Scheme identifiers + /// + + public class SchemeIdentifierService + { + 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 SchemeIdentifierService(GoCardlessClient goCardlessClient) + { + _goCardlessClient = goCardlessClient; + } + + /// + /// Returns a [cursor-paginated](#api-usage-cursor-pagination) list of + /// your scheme identifiers. + /// + /// An optional `SchemeIdentifierListRequest` representing the query parameters for this list request. + /// An optional `RequestSettings` allowing you to configure the request + /// A set of scheme identifier resources + public Task ListAsync(SchemeIdentifierListRequest request = null, RequestSettings customiseRequestMessage = null) + { + request = request ?? new SchemeIdentifierListRequest(); + + var urlParams = new List> + {}; + + return _goCardlessClient.ExecuteAsync("GET", "/scheme_identifiers", urlParams, request, null, null, customiseRequestMessage); + } + + /// + /// Get a lazily enumerated list of scheme identifiers. + /// This acts like the #list method, but paginates for you automatically. + /// + public IEnumerable All(SchemeIdentifierListRequest request = null, RequestSettings customiseRequestMessage = null) + { + request = request ?? new SchemeIdentifierListRequest(); + + string cursor = null; + do + { + request.After = cursor; + + var result = Task.Run(() => ListAsync(request, customiseRequestMessage)).Result; + foreach (var item in result.SchemeIdentifiers) + { + yield return item; + } + cursor = result.Meta?.Cursors?.After; + } while (cursor != null); + } + + /// + /// Get a lazily enumerated list of scheme identifiers. + /// This acts like the #list method, but paginates for you automatically. + /// + public IEnumerable>> AllAsync(SchemeIdentifierListRequest request = null, RequestSettings customiseRequestMessage = null) + { + request = request ?? new SchemeIdentifierListRequest(); + + return new TaskEnumerable, string>(async after => + { + request.After = after; + var list = await this.ListAsync(request, customiseRequestMessage); + return Tuple.Create(list.SchemeIdentifiers, list.Meta?.Cursors?.After); + }); + } + + /// + /// Retrieves the details of an existing scheme identifier. + /// + /// Unique identifier, usually beginning with "SU". + /// An optional `SchemeIdentifierGetRequest` representing the query parameters for this get request. + /// An optional `RequestSettings` allowing you to configure the request + /// A single scheme identifier resource + public Task GetAsync(string identity, SchemeIdentifierGetRequest request = null, RequestSettings customiseRequestMessage = null) + { + request = request ?? new SchemeIdentifierGetRequest(); + if (identity == null) throw new ArgumentException(nameof(identity)); + + var urlParams = new List> + { + new KeyValuePair("identity", identity), + }; + + return _goCardlessClient.ExecuteAsync("GET", "/scheme_identifiers/:identity", urlParams, request, null, null, customiseRequestMessage); + } + } + + + /// + /// Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your + /// scheme identifiers. + /// + public class SchemeIdentifierListRequest + { + + /// + /// Cursor pointing to the start of the desired set. + /// + [JsonProperty("after")] + public string After { get; set; } + + /// + /// Cursor pointing to the end of the desired set. + /// + [JsonProperty("before")] + public string Before { get; set; } + + /// + /// Number of records to return. + /// + [JsonProperty("limit")] + public int? Limit { get; set; } + } + + + /// + /// Retrieves the details of an existing scheme identifier. + /// + public class SchemeIdentifierGetRequest + { + } + + /// + /// An API response for a request returning a single scheme identifier. + /// + public class SchemeIdentifierResponse : ApiResponse + { + /// + /// The scheme identifier from the response. + /// + [JsonProperty("scheme_identifiers")] + public SchemeIdentifier SchemeIdentifier { get; private set; } + } + + /// + /// An API response for a request returning a list of scheme identifiers. + /// + public class SchemeIdentifierListResponse : ApiResponse + { + /// + /// The list of scheme identifiers from the response. + /// + [JsonProperty("scheme_identifiers")] + public IReadOnlyList SchemeIdentifiers { get; private set; } + /// + /// Response metadata (e.g. pagination cursors) + /// + public Meta Meta { get; private set; } + } +} diff --git a/changes.patch b/changes.patch new file mode 100644 index 0000000..e69de29 From 738074004ecf0a8806c86c05675eee97b3f52378 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 23 Jan 2023 09:50:54 +0000 Subject: [PATCH 06/12] Changes generated by 4fce1836f061bf93081e659195e08d7f1cc47248 --- GoCardless/Resources/Creditor.cs | 2 +- GoCardless/Services/CreditorService.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GoCardless/Resources/Creditor.cs b/GoCardless/Resources/Creditor.cs index 9563d4e..e9b46cc 100644 --- a/GoCardless/Resources/Creditor.cs +++ b/GoCardless/Resources/Creditor.cs @@ -136,7 +136,7 @@ public class Creditor public bool? MerchantResponsibleForNotifications { get; set; } /// - /// The creditor's name. + /// The creditor's trading name. /// [JsonProperty("name")] public string Name { get; set; } diff --git a/GoCardless/Services/CreditorService.cs b/GoCardless/Services/CreditorService.cs index 5f98288..bae78cf 100644 --- a/GoCardless/Services/CreditorService.cs +++ b/GoCardless/Services/CreditorService.cs @@ -204,7 +204,7 @@ public enum CreditorCreditorType public IDictionary Links { get; set; } /// - /// The creditor's name. + /// The creditor's trading name. /// [JsonProperty("name")] public string Name { get; set; } @@ -397,7 +397,7 @@ public class CreditorLinks } /// - /// The creditor's name. + /// The creditor's trading name. /// [JsonProperty("name")] public string Name { get; set; } From 21f0e38d12dc566d2ba41727569892403c3a971d Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 23 Jan 2023 16:05:59 +0000 Subject: [PATCH 07/12] Changes generated by 94fa8a4896635c6f37ec35fe7000878d43946ee8 --- GoCardless/Resources/Creditor.cs | 3 +- GoCardless/Resources/SchemeIdentifier.cs | 8 +- GoCardless/Services/CreditorService.cs | 60 ++++++++++ .../Services/SchemeIdentifierService.cs | 107 +++++++++++++++++- 4 files changed, 174 insertions(+), 4 deletions(-) diff --git a/GoCardless/Resources/Creditor.cs b/GoCardless/Resources/Creditor.cs index e9b46cc..b4b164d 100644 --- a/GoCardless/Resources/Creditor.cs +++ b/GoCardless/Resources/Creditor.cs @@ -404,7 +404,8 @@ public class CreditorSchemeIdentifier public int? MinimumAdvanceNotice { get; set; } /// - /// The name which appears on customers' bank statements. + /// The name which appears on customers' bank statements. This should + /// usually be the merchant's trading name. /// [JsonProperty("name")] public string Name { get; set; } diff --git a/GoCardless/Resources/SchemeIdentifier.cs b/GoCardless/Resources/SchemeIdentifier.cs index 2d471fe..decd5cc 100644 --- a/GoCardless/Resources/SchemeIdentifier.cs +++ b/GoCardless/Resources/SchemeIdentifier.cs @@ -11,7 +11,10 @@ namespace GoCardless.Resources /// /// Represents a schemeentifier resource. /// - /// Scheme identifiers + /// This represents a scheme identifier (e.g. a SUN in Bacs or a CID in + /// SEPA). Scheme identifiers are used to specify the beneficiary name that + /// appears on customers' bank statements. + /// /// public class SchemeIdentifier { @@ -91,7 +94,8 @@ public class SchemeIdentifier public int? MinimumAdvanceNotice { get; set; } /// - /// The name which appears on customers' bank statements. + /// The name which appears on customers' bank statements. This should + /// usually be the merchant's trading name. /// [JsonProperty("name")] public string Name { get; set; } diff --git a/GoCardless/Services/CreditorService.cs b/GoCardless/Services/CreditorService.cs index bae78cf..36f7a10 100644 --- a/GoCardless/Services/CreditorService.cs +++ b/GoCardless/Services/CreditorService.cs @@ -149,6 +149,33 @@ public Task UpdateAsync(string identity, CreditorUpdateRequest return _goCardlessClient.ExecuteAsync("PUT", "/creditors/:identity", urlParams, request, null, "creditors", customiseRequestMessage); } + + /// + /// Applies a [scheme identifier](#core-endpoints-scheme-identifiers) to + /// a creditor. + /// If the creditor already has a scheme identifier for the scheme, it + /// will be replaced, + /// and any mandates attached to it transferred asynchronously. + /// For some schemes, the application of the scheme identifier will be + /// performed asynchronously. + /// + /// + /// Unique identifier, beginning with "CR". + /// An optional `CreditorApplySchemeIdentifierRequest` representing the body for this apply_scheme_identifier request. + /// An optional `RequestSettings` allowing you to configure the request + /// A single creditor resource + public Task ApplySchemeIdentifierAsync(string identity, CreditorApplySchemeIdentifierRequest request = null, RequestSettings customiseRequestMessage = null) + { + request = request ?? new CreditorApplySchemeIdentifierRequest(); + if (identity == null) throw new ArgumentException(nameof(identity)); + + var urlParams = new List> + { + new KeyValuePair("identity", identity), + }; + + return _goCardlessClient.ExecuteAsync("POST", "/creditors/:identity/actions/apply_scheme_identifier", urlParams, request, null, "data", customiseRequestMessage); + } } @@ -415,6 +442,39 @@ public class CreditorLinks public string Region { get; set; } } + + /// + /// Applies a [scheme identifier](#core-endpoints-scheme-identifiers) to a + /// creditor. + /// If the creditor already has a scheme identifier for the scheme, it will + /// be replaced, + /// and any mandates attached to it transferred asynchronously. + /// For some schemes, the application of the scheme identifier will be + /// performed asynchronously. + /// + /// + public class CreditorApplySchemeIdentifierRequest + { + + /// + /// The ID of the scheme identifier to apply + /// + [JsonProperty("links")] + public CreditorLinks Links { get; set; } + /// + /// Linked resources for a Creditor. + /// + public class CreditorLinks + { + + /// + /// Unique identifier, usually beginning with "SU". + /// + [JsonProperty("scheme_identifier")] + public string SchemeIdentifier { get; set; } + } + } + /// /// An API response for a request returning a single creditor. /// diff --git a/GoCardless/Services/SchemeIdentifierService.cs b/GoCardless/Services/SchemeIdentifierService.cs index e9b0067..c0b07ef 100644 --- a/GoCardless/Services/SchemeIdentifierService.cs +++ b/GoCardless/Services/SchemeIdentifierService.cs @@ -16,7 +16,10 @@ namespace GoCardless.Services /// /// Service class for working with scheme identifier resources. /// - /// Scheme identifiers + /// This represents a scheme identifier (e.g. a SUN in Bacs or a CID in + /// SEPA). Scheme identifiers are used to specify the beneficiary name that + /// appears on customers' bank statements. + /// /// public class SchemeIdentifierService @@ -32,6 +35,28 @@ public SchemeIdentifierService(GoCardlessClient goCardlessClient) _goCardlessClient = goCardlessClient; } + /// + /// Creates a new scheme identifier. The scheme identifier must be + /// [applied to a creditor](#creditors-apply-a-scheme-identifier) before + /// payments are taken using it. The scheme identifier must also have + /// the `status` of active before it can be used. For some schemes e.g. + /// faster_payments this will happen instantly. For other schemes e.g. + /// bacs this can take several days. + /// + /// + /// An optional `SchemeIdentifierCreateRequest` representing the body for this create request. + /// An optional `RequestSettings` allowing you to configure the request + /// A single scheme identifier resource + public Task CreateAsync(SchemeIdentifierCreateRequest request = null, RequestSettings customiseRequestMessage = null) + { + request = request ?? new SchemeIdentifierCreateRequest(); + + var urlParams = new List> + {}; + + return _goCardlessClient.ExecuteAsync("POST", "/scheme_identifiers", urlParams, request, id => GetAsync(id, null, customiseRequestMessage), "scheme_identifiers", customiseRequestMessage); + } + /// /// Returns a [cursor-paginated](#api-usage-cursor-pagination) list of /// your scheme identifiers. @@ -109,6 +134,86 @@ public Task GetAsync(string identity, SchemeIdentifier } + /// + /// Creates a new scheme identifier. The scheme identifier must be [applied + /// to a creditor](#creditors-apply-a-scheme-identifier) before payments are + /// taken using it. The scheme identifier must also have the `status` of + /// active before it can be used. For some schemes e.g. faster_payments this + /// will happen instantly. For other schemes e.g. bacs this can take several + /// days. + /// + /// + public class SchemeIdentifierCreateRequest : IHasIdempotencyKey + { + + /// + /// The name which appears on customers' bank statements. This should + /// usually be the merchant's trading name. + /// + [JsonProperty("name")] + public string Name { get; set; } + + /// + /// The scheme which this scheme identifier applies to. + /// + [JsonProperty("scheme")] + public SchemeIdentifierScheme? Scheme { get; set; } + + /// + /// The scheme which this scheme identifier applies to. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SchemeIdentifierScheme + { + + /// `scheme` with a value of "ach" + [EnumMember(Value = "ach")] + Ach, + /// `scheme` with a value of "autogiro" + [EnumMember(Value = "autogiro")] + Autogiro, + /// `scheme` with a value of "bacs" + [EnumMember(Value = "bacs")] + Bacs, + /// `scheme` with a value of "becs" + [EnumMember(Value = "becs")] + Becs, + /// `scheme` with a value of "becs_nz" + [EnumMember(Value = "becs_nz")] + BecsNz, + /// `scheme` with a value of "betalingsservice" + [EnumMember(Value = "betalingsservice")] + Betalingsservice, + /// `scheme` with a value of "faster_payments" + [EnumMember(Value = "faster_payments")] + FasterPayments, + /// `scheme` with a value of "pad" + [EnumMember(Value = "pad")] + Pad, + /// `scheme` with a value of "pay_to" + [EnumMember(Value = "pay_to")] + PayTo, + /// `scheme` with a value of "sepa" + [EnumMember(Value = "sepa")] + Sepa, + /// `scheme` with a value of "sepa_credit_transfer" + [EnumMember(Value = "sepa_credit_transfer")] + SepaCreditTransfer, + /// `scheme` with a value of "sepa_instant_credit_transfer" + [EnumMember(Value = "sepa_instant_credit_transfer")] + SepaInstantCreditTransfer, + } + + /// + /// 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. + /// See: https://developer.gocardless.com/api-reference/#making-requests-idempotency-keys + /// + [JsonIgnore] + public string IdempotencyKey { get; set; } + } + + /// /// Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your /// scheme identifiers. From e3346c97440b8445f5359f36298c438b48d6d335 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 27 Jan 2023 10:53:50 +0000 Subject: [PATCH 08/12] Changes generated by 2ab71499fc1c27abf8303a2ff1220f63e62431b8 --- GoCardless/GoCardlessClient.Generated.cs | 5 + GoCardless/Resources/VerificationDetail.cs | 136 ++++++++++++ .../Services/VerificationDetailService.cs | 200 ++++++++++++++++++ 3 files changed, 341 insertions(+) create mode 100644 GoCardless/Resources/VerificationDetail.cs create mode 100644 GoCardless/Services/VerificationDetailService.cs diff --git a/GoCardless/GoCardlessClient.Generated.cs b/GoCardless/GoCardlessClient.Generated.cs index d0d37c8..694a6a9 100644 --- a/GoCardless/GoCardlessClient.Generated.cs +++ b/GoCardless/GoCardlessClient.Generated.cs @@ -153,6 +153,11 @@ public partial class GoCardlessClient /// public TaxRateService TaxRates => new TaxRateService(this); + /// + ///A service for working with verification detail resources. + /// + public VerificationDetailService VerificationDetails => new VerificationDetailService(this); + /// ///A service for working with webhook resources. /// diff --git a/GoCardless/Resources/VerificationDetail.cs b/GoCardless/Resources/VerificationDetail.cs new file mode 100644 index 0000000..58e61dd --- /dev/null +++ b/GoCardless/Resources/VerificationDetail.cs @@ -0,0 +1,136 @@ +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 verification detail resource. + /// + /// Details of a creditor that are required for verification + /// + public class VerificationDetail + { + /// + /// The first line of the company's address. + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the company's address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the company's address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The city of the company's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// The company's registration number. + /// + [JsonProperty("company_number")] + public string CompanyNumber { get; set; } + + /// + /// A summary describing what the company does. + /// + [JsonProperty("description")] + public string Description { get; set; } + + /// + /// The company's directors. + /// + [JsonProperty("directors")] + public List Directors { get; set; } + + /// + /// Resources linked to this VerificationDetail. + /// + [JsonProperty("links")] + public VerificationDetailLinks Links { get; set; } + + /// + /// The company's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + } + + /// + /// Represents a verification detail director resource. + /// + /// A primary director of the company represented by the creditor. + /// + public class VerificationDetailDirector + { + /// + /// The city of the person's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// [ISO 3166-1 alpha-2 + /// code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// The person's date of birth. + /// + [JsonProperty("date_of_birth")] + public string DateOfBirth { get; set; } + + /// + /// The person's family name. + /// + [JsonProperty("family_name")] + public string FamilyName { get; set; } + + /// + /// The person's given name. + /// + [JsonProperty("given_name")] + public string GivenName { get; set; } + + /// + /// The person's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The street of the person's address. + /// + [JsonProperty("street")] + public string Street { get; set; } + } + + /// + /// Resources linked to this VerificationDetail + /// + public class VerificationDetailLinks + { + /// + /// ID of the [creditor](#core-endpoints-creditors) + /// + [JsonProperty("creditor")] + public string Creditor { get; set; } + } + +} diff --git a/GoCardless/Services/VerificationDetailService.cs b/GoCardless/Services/VerificationDetailService.cs new file mode 100644 index 0000000..d339151 --- /dev/null +++ b/GoCardless/Services/VerificationDetailService.cs @@ -0,0 +1,200 @@ + + +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 verification detail resources. + /// + /// Details of a creditor that are required for verification + /// + + public class VerificationDetailService + { + 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 VerificationDetailService(GoCardlessClient goCardlessClient) + { + _goCardlessClient = goCardlessClient; + } + + /// + /// Verification details represent any information needed by GoCardless + /// to verify a creditor. + /// Currently, only UK-based companies are supported. + /// In other words, to submit verification details for a creditor, their + /// creditor_type must be company and their country_code must be GB. + /// + /// Unique identifier of the creditor these details are being stored + /// against, + /// beginning with "CR". + /// An optional `VerificationDetailCreateRequest` representing the body for this create request. + /// An optional `RequestSettings` allowing you to configure the request + /// A single verification detail resource + public Task CreateAsync(string identity, VerificationDetailCreateRequest request = null, RequestSettings customiseRequestMessage = null) + { + request = request ?? new VerificationDetailCreateRequest(); + if (identity == null) throw new ArgumentException(nameof(identity)); + + var urlParams = new List> + { + new KeyValuePair("identity", identity), + }; + + return _goCardlessClient.ExecuteAsync("POST", "/verification_details/:identity", urlParams, request, null, "verification_details", customiseRequestMessage); + } + } + + + /// + /// Verification details represent any information needed by GoCardless to + /// verify a creditor. + /// Currently, only UK-based companies are supported. + /// In other words, to submit verification details for a creditor, their + /// creditor_type must be company and their country_code must be GB. + /// + public class VerificationDetailCreateRequest + { + + /// + /// The first line of the company's address. + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the company's address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the company's address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The city of the company's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// The company's registration number. + /// + [JsonProperty("company_number")] + public string CompanyNumber { get; set; } + + /// + /// A summary describing what the company does. + /// + [JsonProperty("description")] + public string Description { get; set; } + + /// + /// The company's directors. + /// + [JsonProperty("directors")] + public VerificationDetailDirectors[] Directors { get; set; } + /// + /// A primary director of the company represented by the creditor. + /// + public class VerificationDetailDirectors + { + + /// + /// The city of the person's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// [ISO 3166-1 alpha-2 + /// code.](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// The person's date of birth. + /// + [JsonProperty("date_of_birth")] + public string DateOfBirth { get; set; } + + /// + /// The person's family name. + /// + [JsonProperty("family_name")] + public string FamilyName { get; set; } + + /// + /// The person's given name. + /// + [JsonProperty("given_name")] + public string GivenName { get; set; } + + /// + /// The person's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The street of the person's address. + /// + [JsonProperty("street")] + public string Street { get; set; } + } + + /// + /// Linked resources. + /// + [JsonProperty("links")] + public VerificationDetailLinks Links { get; set; } + /// + /// Linked resources for a VerificationDetail. + /// + public class VerificationDetailLinks + { + + /// + /// ID of the associated [creditor](#core-endpoints-creditors). + /// + [JsonProperty("creditor")] + public string Creditor { get; set; } + } + + /// + /// The company's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + } + + /// + /// An API response for a request returning a single verification detail. + /// + public class VerificationDetailResponse : ApiResponse + { + /// + /// The verification detail from the response. + /// + [JsonProperty("verification_details")] + public VerificationDetail VerificationDetail { get; private set; } + } +} From fe0d754e2e45af02c12ff8e388efe6f5c1f90737 Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 27 Jan 2023 16:06:05 +0000 Subject: [PATCH 09/12] Changes generated by 76b24dbc411b0fb754d5c6ffb3d1c9269d58ae6a --- GoCardless/Services/VerificationDetailService.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/GoCardless/Services/VerificationDetailService.cs b/GoCardless/Services/VerificationDetailService.cs index d339151..039e5ea 100644 --- a/GoCardless/Services/VerificationDetailService.cs +++ b/GoCardless/Services/VerificationDetailService.cs @@ -38,24 +38,18 @@ public VerificationDetailService(GoCardlessClient goCardlessClient) /// Currently, only UK-based companies are supported. /// In other words, to submit verification details for a creditor, their /// creditor_type must be company and their country_code must be GB. - /// - /// Unique identifier of the creditor these details are being stored - /// against, - /// beginning with "CR". + /// /// An optional `VerificationDetailCreateRequest` representing the body for this create request. /// An optional `RequestSettings` allowing you to configure the request /// A single verification detail resource - public Task CreateAsync(string identity, VerificationDetailCreateRequest request = null, RequestSettings customiseRequestMessage = null) + public Task CreateAsync(VerificationDetailCreateRequest request = null, RequestSettings customiseRequestMessage = null) { request = request ?? new VerificationDetailCreateRequest(); - if (identity == null) throw new ArgumentException(nameof(identity)); var urlParams = new List> - { - new KeyValuePair("identity", identity), - }; + {}; - return _goCardlessClient.ExecuteAsync("POST", "/verification_details/:identity", urlParams, request, null, "verification_details", customiseRequestMessage); + return _goCardlessClient.ExecuteAsync("POST", "/verification_details", urlParams, request, null, "verification_details", customiseRequestMessage); } } From 8b78ef43fe4285c102efaeb2861d790beae599d3 Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 30 Jan 2023 12:47:45 +0000 Subject: [PATCH 10/12] Changes generated by 0e4a8347da6b24e937b6b8a72bd39d4383c32ddf --- GoCardless/Services/VerificationDetailService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GoCardless/Services/VerificationDetailService.cs b/GoCardless/Services/VerificationDetailService.cs index 039e5ea..3a5faeb 100644 --- a/GoCardless/Services/VerificationDetailService.cs +++ b/GoCardless/Services/VerificationDetailService.cs @@ -35,7 +35,7 @@ public VerificationDetailService(GoCardlessClient goCardlessClient) /// /// Verification details represent any information needed by GoCardless /// to verify a creditor. - /// Currently, only UK-based companies are supported. + /// Currently, only UK-based companies are supported. /// In other words, to submit verification details for a creditor, their /// creditor_type must be company and their country_code must be GB. /// @@ -57,7 +57,7 @@ public Task CreateAsync(VerificationDetailCreateRequ /// /// Verification details represent any information needed by GoCardless to /// verify a creditor. - /// Currently, only UK-based companies are supported. + /// Currently, only UK-based companies are supported. /// In other words, to submit verification details for a creditor, their /// creditor_type must be company and their country_code must be GB. /// From 6513ec57974c25daa6321d7084728374a44d3e7d Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 7 Feb 2023 11:53:07 +0000 Subject: [PATCH 11/12] Changes generated by 35ad50afe05ebee3d418c65a919190ccc202ac1a --- GoCardless/Resources/BankAuthorisation.cs | 14 ++++++++++++++ GoCardless/Services/BankAuthorisationService.cs | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/GoCardless/Resources/BankAuthorisation.cs b/GoCardless/Resources/BankAuthorisation.cs index 89d964c..6f6a3c1 100644 --- a/GoCardless/Resources/BankAuthorisation.cs +++ b/GoCardless/Resources/BankAuthorisation.cs @@ -73,6 +73,20 @@ public class BankAuthorisation /// /// URL that the payer can be redirected to after authorising the /// payment. + /// + /// On completion of bank authorisation, the query parameter of either + /// `outcome=success` or `outcome=failure` will be + /// appended to the `redirect_uri` to indicate the result of the bank + /// authorisation. If the bank authorisation is + /// expired, the query parameter `outcome=timeout` will be appended to + /// 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. + /// + /// Defaults to `https://pay.gocardless.com/billing/static/thankyou`. /// [JsonProperty("redirect_uri")] public string RedirectUri { get; set; } diff --git a/GoCardless/Services/BankAuthorisationService.cs b/GoCardless/Services/BankAuthorisationService.cs index 4dcdd4b..06286d5 100644 --- a/GoCardless/Services/BankAuthorisationService.cs +++ b/GoCardless/Services/BankAuthorisationService.cs @@ -144,6 +144,20 @@ public class BankAuthorisationLinks /// /// URL that the payer can be redirected to after authorising the /// payment. + /// + /// On completion of bank authorisation, the query parameter of either + /// `outcome=success` or `outcome=failure` will be + /// appended to the `redirect_uri` to indicate the result of the bank + /// authorisation. If the bank authorisation is + /// expired, the query parameter `outcome=timeout` will be appended to + /// 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. + /// + /// Defaults to `https://pay.gocardless.com/billing/static/thankyou`. /// [JsonProperty("redirect_uri")] public string RedirectUri { get; set; } From 2df2013aad2369294015eccec776feb92b95db5b Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 7 Feb 2023 14:57:16 +0000 Subject: [PATCH 12/12] Changes generated by af4480a1fd41d30bd9cae1c322f7fb5ee7b8aec0 --- 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 a9d697e..3943dd5 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 5.11.0 + 5.12.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.11.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v5.12.0 netstandard1.6;netstandard2.0;net46 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index b78018d..33e344f 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.11.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}"; + var userAgentInformation = $" gocardless-dotnet/5.12.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.11.0"); + requestMessage.Headers.Add("GoCardless-Client-Version", "5.12.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 d74b83a..b79a11c 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.11.0` +`Install-Package GoCardless -Version 5.12.0` ## Usage