diff --git a/GoCardless/GoCardless.csproj b/GoCardless/GoCardless.csproj index 8a6f8d3..9399569 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 5.7.0 + 5.8.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.7.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v5.8.0 netstandard1.6;netstandard2.0;net46 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index 0561e49..f7934ae 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.7.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}"; + var userAgentInformation = $" gocardless-dotnet/5.8.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.7.0"); + requestMessage.Headers.Add("GoCardless-Client-Version", "5.8.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/BankDetailsLookup.cs b/GoCardless/Resources/BankDetailsLookup.cs index 3dbcf75..56a5366 100644 --- a/GoCardless/Resources/BankDetailsLookup.cs +++ b/GoCardless/Resources/BankDetailsLookup.cs @@ -42,7 +42,7 @@ public class BankDetailsLookup } /// - /// A Direct Debit scheme for this bank account. + /// A bank payment scheme for this bank account. /// [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] public enum BankDetailsLookupAvailableDebitScheme { @@ -68,14 +68,17 @@ public enum BankDetailsLookupAvailableDebitScheme { /// `available_debit_scheme` with a value of "betalingsservice" [EnumMember(Value = "betalingsservice")] Betalingsservice, + /// `available_debit_scheme` with a value of "faster_payments" + [EnumMember(Value = "faster_payments")] + FasterPayments, /// `available_debit_scheme` with a value of "pad" [EnumMember(Value = "pad")] Pad, - /// `available_debit_scheme` with a value of "sepa_core" - [EnumMember(Value = "sepa_core")] - SepaCore, /// `available_debit_scheme` with a value of "pay_to" [EnumMember(Value = "pay_to")] PayTo, + /// `available_debit_scheme` with a value of "sepa_core" + [EnumMember(Value = "sepa_core")] + SepaCore, } } diff --git a/GoCardless/Resources/BillingRequest.cs b/GoCardless/Resources/BillingRequest.cs index 45c6754..d17a26c 100644 --- a/GoCardless/Resources/BillingRequest.cs +++ b/GoCardless/Resources/BillingRequest.cs @@ -299,6 +299,9 @@ public enum BillingRequestActionType { /// `type` with a value of "choose_currency" [EnumMember(Value = "choose_currency")] ChooseCurrency, + /// `type` with a value of "collect_amount" + [EnumMember(Value = "collect_amount")] + CollectAmount, /// `type` with a value of "collect_customer_details" [EnumMember(Value = "collect_customer_details")] CollectCustomerDetails, @@ -396,6 +399,13 @@ public class BillingRequestLinks /// public class BillingRequestMandateRequest { + /// + /// Constraints that will apply to the mandate_request. (Optional) + /// Specifically for PayTo and VRP. + /// + [JsonProperty("constraints")] + public BillingRequestMandateRequestConstraints Constraints { get; set; } + /// /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) /// currency code. @@ -403,6 +413,14 @@ public class BillingRequestMandateRequest [JsonProperty("currency")] public string Currency { get; set; } + /// + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing request. + /// + /// + [JsonProperty("description")] + public string Description { get; set; } + /// /// Resources linked to this BillingRequestMandateRequest. /// @@ -417,8 +435,11 @@ public class BillingRequestMandateRequest public IDictionary Metadata { get; set; } /// - /// A Direct Debit scheme. Currently "ach", "bacs", "becs", "becs_nz", - /// "betalingsservice", "pad", "pay_to" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. Optional for mandate only requests - + /// if left blank, the payer will be able to select the currency/scheme + /// to pay with from a list of your available schemes. /// [JsonProperty("scheme")] public string Scheme { get; set; } @@ -456,6 +477,144 @@ public class BillingRequestMandateRequest public BillingRequestMandateRequestVerify? Verify { get; set; } } + /// + /// Represents a billing request mandate request constraint resource. + /// + /// Constraints that will apply to the mandate_request. (Optional) + /// Specifically for PayTo and VRP. + /// + public class BillingRequestMandateRequestConstraints + { + /// + /// The latest date at which payments can be taken, must occur after + /// start_date if present + /// + /// This is an optional field and if it is not supplied the agreement + /// will be considered open and + /// will not have an end date. Keep in mind the end date must take into + /// account how long it will + /// take the user to set up this agreement via the BillingRequest. + /// + /// + [JsonProperty("end_date")] + public string EndDate { get; set; } + + /// + /// The maximum amount that can be charged for a single payment + /// + [JsonProperty("max_amount_per_payment")] + public int? MaxAmountPerPayment { get; set; } + + /// + /// List of periodic limits and constraints which apply to them + /// + [JsonProperty("periodic_limits")] + public List PeriodicLimits { get; set; } + + /// + /// The date from which payments can be taken. + /// + /// This is an optional field and if it is not supplied the start date + /// will be set to the day + /// authorisation happens. + /// + /// + [JsonProperty("start_date")] + public string StartDate { get; set; } + } + + /// + /// List of periodic limits and constraints which apply to them + /// + public class BillingRequestMandateRequestConstraintPeriodicLimit + { + /// + /// The alignment of the period. + /// + /// `calendar` - this will finish on the end of the current period. For + /// example this will expire on the Monday for the current week or the + /// January for the next year. + /// + /// `creation_date` - this will finish on the next instance of the + /// current period. For example Monthly it will expire on the same day + /// of the next month, or yearly the same day of the next year. + /// + /// + [JsonProperty("alignment")] + public BillingRequestMandateRequestConstraintPeriodicLimitAlignment? Alignment { get; set; } + + /// + /// The maximum number of payments that can be collected in this + /// periodic limit + /// + [JsonProperty("max_payments")] + public int? MaxPayments { get; set; } + + /// + /// The maximum total amount that can be charged for all payments in + /// this periodic limit + /// + [JsonProperty("max_total_amount")] + public int? MaxTotalAmount { get; set; } + + /// + /// The repeating period for this mandate + /// + [JsonProperty("period")] + public BillingRequestMandateRequestConstraintPeriodicLimitPeriod? Period { get; set; } + } + + /// + /// The alignment of the period. + /// + /// `calendar` - this will finish on the end of the current period. For example this will expire + /// on the Monday for the current week or the January for the next year. + /// + /// `creation_date` - this will finish on the next instance of the current period. For example + /// Monthly it will expire on the same day of the next month, or yearly the same day of the next + /// year. + /// + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum BillingRequestMandateRequestConstraintPeriodicLimitAlignment { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `alignment` with a value of "calendar" + [EnumMember(Value = "calendar")] + Calendar, + /// `alignment` with a value of "creation_date" + [EnumMember(Value = "creation_date")] + CreationDate, + } + + /// + /// The repeating period for this mandate + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum BillingRequestMandateRequestConstraintPeriodicLimitPeriod { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `period` with a value of "day" + [EnumMember(Value = "day")] + Day, + /// `period` with a value of "week" + [EnumMember(Value = "week")] + Week, + /// `period` with a value of "month" + [EnumMember(Value = "month")] + Month, + /// `period` with a value of "year" + [EnumMember(Value = "year")] + Year, + /// `period` with a value of "flexible" + [EnumMember(Value = "flexible")] + Flexible, + } + /// /// Resources linked to this BillingRequestMandateRequest /// @@ -544,8 +703,8 @@ public class BillingRequestPaymentRequest public string Currency { get; set; } /// - /// A human-readable description of the payment. This will be displayed - /// to the payer when authorising the billing request. + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing request. /// /// [JsonProperty("description")] diff --git a/GoCardless/Resources/BillingRequestFlow.cs b/GoCardless/Resources/BillingRequestFlow.cs index 747adce..d53a423 100644 --- a/GoCardless/Resources/BillingRequestFlow.cs +++ b/GoCardless/Resources/BillingRequestFlow.cs @@ -58,6 +58,14 @@ public class BillingRequestFlow [JsonProperty("id")] public string Id { get; set; } + /// + /// Sets the default language of the Billing Request Flow and the + /// customer. [ISO + /// 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + /// + [JsonProperty("language")] + public string Language { get; set; } + /// /// Resources linked to this BillingRequestFlow. /// @@ -67,7 +75,11 @@ public class BillingRequestFlow /// /// If true, the payer will not be able to change their bank account /// within the flow. If the bank_account details are collected as part - /// of bank_authorisation then GC will set this value to true mid flow + /// of bank_authorisation then GC will set this value to true mid flow. + /// + /// You can only lock bank account if these have already been completed + /// as a part of the billing request. + /// /// [JsonProperty("lock_bank_account")] public bool? LockBankAccount { get; set; } @@ -84,7 +96,11 @@ public class BillingRequestFlow /// /// If true, the payer will not be able to edit their customer details /// within the flow. If the customer details are collected as part of - /// bank_authorisation then GC will set this value to true mid flow + /// bank_authorisation then GC will set this value to true mid flow. + /// + /// You can only lock customer details if these have already been + /// completed as a part of the billing request. + /// /// [JsonProperty("lock_customer_details")] public bool? LockCustomerDetails { get; set; } @@ -257,13 +273,6 @@ public class BillingRequestFlowPrefilledCustomer [JsonProperty("given_name")] public string GivenName { get; set; } - /// - /// [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) - /// code. - /// - [JsonProperty("language")] - public string Language { get; set; } - /// /// The customer's postal code. /// diff --git a/GoCardless/Resources/BillingRequestTemplate.cs b/GoCardless/Resources/BillingRequestTemplate.cs index 31a37d5..3c20484 100644 --- a/GoCardless/Resources/BillingRequestTemplate.cs +++ b/GoCardless/Resources/BillingRequestTemplate.cs @@ -43,6 +43,14 @@ public class BillingRequestTemplate [JsonProperty("mandate_request_currency")] public string MandateRequestCurrency { get; set; } + /// + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing request. + /// + /// + [JsonProperty("mandate_request_description")] + public string MandateRequestDescription { get; set; } + /// /// Key-value store of custom data that will be applied to the mandate /// created when this request is fulfilled. Up to 3 keys are permitted, @@ -52,8 +60,11 @@ public class BillingRequestTemplate public IDictionary MandateRequestMetadata { get; set; } /// - /// A Direct Debit scheme. Currently "ach", "bacs", "becs", "becs_nz", - /// "betalingsservice", "pad", "pay_to" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. Optional for mandate only requests - + /// if left blank, the payer will be able to select the currency/scheme + /// to pay with from a list of your available schemes. /// [JsonProperty("mandate_request_scheme")] public string MandateRequestScheme { get; set; } @@ -120,8 +131,8 @@ public class BillingRequestTemplate public string PaymentRequestCurrency { get; set; } /// - /// A human-readable description of the payment. This will be displayed - /// to the payer when authorising the billing request. + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing request. /// /// [JsonProperty("payment_request_description")] diff --git a/GoCardless/Resources/Block.cs b/GoCardless/Resources/Block.cs index 9f04ea8..aad4679 100644 --- a/GoCardless/Resources/Block.cs +++ b/GoCardless/Resources/Block.cs @@ -17,24 +17,38 @@ namespace GoCardless.Resources /// /// The details used to create blocks can be exact matches, like a bank /// account or an email, - /// or a more generic match such as an email domain. New block types may be - /// added over time. + /// or a more generic match such as an email domain or bank name. Please be + /// careful when creating + /// blocks for more generic matches as this may block legitimate payers from + /// using your service. /// - /// A block object is in essence a simple rule that is used to match against - /// details in a - /// newly created mandate. If there is a successful match then the mandate - /// is transitioned - /// to a "blocked" state. + /// New block types may be added over time. /// - /// Payments and subscriptions cannot be created against a mandate in + /// A block is in essence a simple rule that is used to match against + /// details in a newly + /// created mandate. If there is a successful match then the mandate is + /// transitioned to a + /// "blocked" state. + /// + /// Please note: + /// + /// - Payments and subscriptions cannot be created against a mandate in /// blocked state. + /// - A mandate can never be transitioned out of the blocked state. /// - /// A mandate can never be transitioned out of the blocked state. + /// The one exception to this is when blocking a 'bank_name'. This block + /// will prevent bank + /// accounts from being created for banks that match the given name. To + /// ensure we match + /// bank names correctly an existing bank account must be used when creating + /// this block. Please + /// be aware that we cannot always match a bank account to a given bank + /// name. /// ///

- /// This API is currently only available for approved integrators - please - /// get in touch if you would like - /// to use this API. + /// This API is currently only available for GoCardless Protect+ + /// integrators - please get in + /// touch if you would like to use this API. ///

///
public class Block @@ -50,7 +64,8 @@ public class Block /// /// Type of entity we will seek to match against when blocking the /// mandate. This - /// can currently be one of 'email', 'email_domain', or 'bank_account'. + /// can currently be one of 'email', 'email_domain', 'bank_account', or + /// 'bank_name'. /// [JsonProperty("block_type")] public string BlockType { get; set; } @@ -96,9 +111,11 @@ public class Block /// be the raw value /// (in the case of emails or email domains) or the ID of the resource /// (in the case of - /// bank accounts). This means in order to block a specific bank account - /// it must already - /// have been created as a resource. + /// bank accounts and bank names). This means in order to block a + /// specific bank account + /// (even if you wish to block generically by name) it must already have + /// been created as + /// a resource. ///
[JsonProperty("resource_reference")] public string ResourceReference { get; set; } @@ -113,7 +130,7 @@ public class Block /// /// Type of entity we will seek to match against when blocking the mandate. This - /// can currently be one of 'email', 'email_domain', or 'bank_account'. + /// can currently be one of 'email', 'email_domain', 'bank_account', or 'bank_name'. /// [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] public enum BlockBlockType { @@ -130,6 +147,9 @@ public enum BlockBlockType { /// `block_type` with a value of "bank_account" [EnumMember(Value = "bank_account")] BankAccount, + /// `block_type` with a value of "bank_name" + [EnumMember(Value = "bank_name")] + BankName, } /// diff --git a/GoCardless/Resources/Creditor.cs b/GoCardless/Resources/Creditor.cs index 48b53f5..5e64683 100644 --- a/GoCardless/Resources/Creditor.cs +++ b/GoCardless/Resources/Creditor.cs @@ -21,6 +21,13 @@ namespace GoCardless.Resources /// public class Creditor { + /// + /// Boolean value indicating whether the creditor is activated in the + /// product. + /// + [JsonProperty("activated")] + public bool? Activated { get; set; } + /// /// The first line of the creditor's address. /// @@ -68,7 +75,7 @@ public class Creditor /// /// Boolean value indicating whether creditor has the [Custom Payment - /// Pages](https://support.gocardless.com/hc/en-gb/articles/115003734705-Custom-payment-pages) + /// Pages](https://hub.gocardless.com/s/article/Custom-payment-pages) /// functionality enabled. /// [JsonProperty("custom_payment_pages_enabled")] @@ -454,6 +461,9 @@ public enum CreditorSchemeIdentifierScheme { /// `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, @@ -463,9 +473,6 @@ public enum CreditorSchemeIdentifierScheme { /// `scheme` with a value of "sepa_instant_credit_transfer" [EnumMember(Value = "sepa_instant_credit_transfer")] SepaInstantCreditTransfer, - /// `scheme` with a value of "pay_to" - [EnumMember(Value = "pay_to")] - PayTo, } /// diff --git a/GoCardless/Resources/Event.cs b/GoCardless/Resources/Event.cs index d89cc6a..127a059 100644 --- a/GoCardless/Resources/Event.cs +++ b/GoCardless/Resources/Event.cs @@ -118,69 +118,13 @@ public class EventCustomerNotification public bool? Mandatory { get; set; } /// - /// The type of notification the customer shall receive. - /// One of: - ///
    - ///
  • `payment_created`
  • - ///
  • `payment_cancelled`
  • - ///
  • `mandate_created`
  • - ///
  • `mandate_blocked`
  • - ///
  • `subscription_created`
  • - ///
  • `subscription_cancelled`
  • - ///
  • `instalment_schedule_created`
  • - ///
  • `instalment_schedule_cancelled`
  • - ///
+ /// See [here](#core-endpoints-customer-notifications) for a complete + /// list of customer notification types. ///
[JsonProperty("type")] public string Type { get; set; } } - /// - /// The type of notification the customer shall receive. - /// One of: - ///
    - ///
  • `payment_created`
  • - ///
  • `payment_cancelled`
  • - ///
  • `mandate_created`
  • - ///
  • `mandate_blocked`
  • - ///
  • `subscription_created`
  • - ///
  • `subscription_cancelled`
  • - ///
  • `instalment_schedule_created`
  • - ///
  • `instalment_schedule_cancelled`
  • - ///
- ///
- [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] - public enum EventCustomerNotificationType { - /// Unknown status - [EnumMember(Value = "unknown")] - Unknown = 0, - - /// `type` with a value of "payment_created" - [EnumMember(Value = "payment_created")] - PaymentCreated, - /// `type` with a value of "payment_cancelled" - [EnumMember(Value = "payment_cancelled")] - PaymentCancelled, - /// `type` with a value of "mandate_created" - [EnumMember(Value = "mandate_created")] - MandateCreated, - /// `type` with a value of "mandate_blocked" - [EnumMember(Value = "mandate_blocked")] - MandateBlocked, - /// `type` with a value of "subscription_created" - [EnumMember(Value = "subscription_created")] - SubscriptionCreated, - /// `type` with a value of "subscription_cancelled" - [EnumMember(Value = "subscription_cancelled")] - SubscriptionCancelled, - /// `type` with a value of "instalment_schedule_created" - [EnumMember(Value = "instalment_schedule_created")] - InstalmentScheduleCreated, - /// `type` with a value of "instalment_schedule_cancelled" - [EnumMember(Value = "instalment_schedule_cancelled")] - InstalmentScheduleCancelled, - } - public class EventDetails { /// @@ -260,7 +204,7 @@ public class EventDetails public string ReasonCode { get; set; } /// - /// A Direct Debit scheme. Set when a bank is the origin of the event. + /// A bank payment scheme. Set when a bank is the origin of the event. /// [JsonProperty("scheme")] public EventDetailsScheme? Scheme { get; set; } @@ -307,7 +251,7 @@ public enum EventDetailsOrigin { } /// - /// A Direct Debit scheme. Set when a bank is the origin of the event. + /// A bank payment scheme. Set when a bank is the origin of the event. /// [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] public enum EventDetailsScheme { @@ -333,18 +277,21 @@ public enum EventDetailsScheme { /// `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_core" [EnumMember(Value = "sepa_core")] SepaCore, /// `scheme` with a value of "sepa_cor1" [EnumMember(Value = "sepa_cor1")] SepaCor1, - /// `scheme` with a value of "pay_to" - [EnumMember(Value = "pay_to")] - PayTo, } /// diff --git a/GoCardless/Resources/Mandate.cs b/GoCardless/Resources/Mandate.cs index 2638e29..7b684b1 100644 --- a/GoCardless/Resources/Mandate.cs +++ b/GoCardless/Resources/Mandate.cs @@ -19,6 +19,12 @@ namespace GoCardless.Resources /// public class Mandate { + /// + /// (Optional) Payto and VRP Scheme specific information + /// + [JsonProperty("consent_parameters")] + public MandateConsentParameters ConsentParameters { get; set; } + /// /// Fixed [timestamp](#api-usage-time-zones--dates), recording when this /// resource was created. @@ -71,7 +77,7 @@ public class Mandate public string Reference { get; set; } /// - /// Direct Debit scheme to which this + /// Bank payment scheme to which this /// mandate and associated payments are submitted. Can be supplied or /// automatically detected from the customer's bank account. /// @@ -105,6 +111,90 @@ public class Mandate public MandateStatus? Status { get; set; } } + /// + /// Represents a mandate consent parameter resource. + /// + /// (Optional) Payto and VRP Scheme specific information + /// + public class MandateConsentParameters + { + /// + /// The latest date at which payments can be taken, must occur after + /// start_date if present + /// + [JsonProperty("end_date")] + public string EndDate { get; set; } + + /// + /// The maximum amount that can be charged for a single payment + /// + [JsonProperty("max_amount_per_payment")] + public int? MaxAmountPerPayment { get; set; } + + /// + /// Frequency configuration + /// + [JsonProperty("periods")] + public List Periods { get; set; } + + /// + /// The date from which payments can be taken + /// + [JsonProperty("start_date")] + public string StartDate { get; set; } + } + + /// + /// Frequency configuration + /// + public class MandateConsentParameterPeriod + { + /// + /// The maximum total amount that can be charged for all payments in + /// this period + /// + [JsonProperty("max_amount_per_period")] + public int? MaxAmountPerPeriod { get; set; } + + /// + /// The maximum number of payments that can be collected in this period + /// + [JsonProperty("max_payments_per_period")] + public int? MaxPaymentsPerPeriod { get; set; } + + /// + /// The repeating period for this mandate + /// + [JsonProperty("period")] + public MandateConsentParameterPeriodPeriod? Period { get; set; } + } + + /// + /// The repeating period for this mandate + /// + [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] + public enum MandateConsentParameterPeriodPeriod { + /// Unknown status + [EnumMember(Value = "unknown")] + Unknown = 0, + + /// `period` with a value of "day" + [EnumMember(Value = "day")] + Day, + /// `period` with a value of "week" + [EnumMember(Value = "week")] + Week, + /// `period` with a value of "month" + [EnumMember(Value = "month")] + Month, + /// `period` with a value of "year" + [EnumMember(Value = "year")] + Year, + /// `period` with a value of "flexible" + [EnumMember(Value = "flexible")] + Flexible, + } + /// /// Resources linked to this Mandate /// diff --git a/GoCardless/Resources/MandateImport.cs b/GoCardless/Resources/MandateImport.cs index f857ea7..72c9c7d 100644 --- a/GoCardless/Resources/MandateImport.cs +++ b/GoCardless/Resources/MandateImport.cs @@ -126,15 +126,18 @@ public enum MandateImportScheme { /// `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 "sepa_core" - [EnumMember(Value = "sepa_core")] - SepaCore, /// `scheme` with a value of "pay_to" [EnumMember(Value = "pay_to")] PayTo, + /// `scheme` with a value of "sepa_core" + [EnumMember(Value = "sepa_core")] + SepaCore, } /// diff --git a/GoCardless/Resources/PayerAuthorisation.cs b/GoCardless/Resources/PayerAuthorisation.cs index 89030e1..6980d95 100644 --- a/GoCardless/Resources/PayerAuthorisation.cs +++ b/GoCardless/Resources/PayerAuthorisation.cs @@ -458,16 +458,17 @@ public class PayerAuthorisationMandate public string Reference { get; set; } /// - /// A Direct Debit scheme. Currently "ach", "autogiro", "bacs", "becs", - /// "becs_nz", "betalingsservice", "pad" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. /// [JsonProperty("scheme")] public PayerAuthorisationMandateScheme? Scheme { get; set; } } /// - /// A Direct Debit scheme. Currently "ach", "autogiro", "bacs", "becs", "becs_nz", - /// "betalingsservice", "pad" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", "becs_nz", + /// "betalingsservice", "faster_payments", "pad", "pay_to" and "sepa_core" are supported. /// [JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)] public enum PayerAuthorisationMandateScheme { @@ -493,15 +494,18 @@ public enum PayerAuthorisationMandateScheme { /// `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 "sepa_core" - [EnumMember(Value = "sepa_core")] - SepaCore, /// `scheme` with a value of "pay_to" [EnumMember(Value = "pay_to")] PayTo, + /// `scheme` with a value of "sepa_core" + [EnumMember(Value = "sepa_core")] + SepaCore, } /// diff --git a/GoCardless/Resources/Payment.cs b/GoCardless/Resources/Payment.cs index a68173c..32d0fae 100644 --- a/GoCardless/Resources/Payment.cs +++ b/GoCardless/Resources/Payment.cs @@ -102,6 +102,7 @@ public class Payment /// Bacs - 10 characters
BECS - /// 30 characters
BECS NZ - 12 characters
/// Betalingsservice - 30 characters
+ /// Faster Payments - 18 characters
/// PAD - scheme doesn't offer references
/// PayTo - 18 characters
SEPA - /// 140 characters
Note that this reference must be unique (for @@ -110,7 +111,9 @@ public class Payment /// specify a payment reference for Bacs payments (that is, when /// collecting from the UK) if you're on the GoCardless Plus, Pro or - /// Enterprise packages.

+ /// Enterprise packages.

Restricted: You can not + /// specify a payment reference for Faster Payments.

///
[JsonProperty("reference")] public string Reference { get; set; } diff --git a/GoCardless/Resources/Payout.cs b/GoCardless/Resources/Payout.cs index 8af95e1..f7feb2d 100644 --- a/GoCardless/Resources/Payout.cs +++ b/GoCardless/Resources/Payout.cs @@ -93,7 +93,8 @@ public class Payout /// /// 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. + /// names up to 50 characters and values up to 500 characters. _Note:_ + /// This should not be used for storing PII data. /// [JsonProperty("metadata")] public IDictionary Metadata { get; set; } diff --git a/GoCardless/Resources/PayoutItem.cs b/GoCardless/Resources/PayoutItem.cs index 930672a..47226c5 100644 --- a/GoCardless/Resources/PayoutItem.cs +++ b/GoCardless/Resources/PayoutItem.cs @@ -58,9 +58,7 @@ public class PayoutItem /// An array of tax items beta /// /// _Note_: VAT applies to transaction and surcharge fees for merchants - /// operating in the UK and France. + /// operating in the UK and France. ///
[JsonProperty("taxes")] public List Taxes { get; set; } @@ -110,7 +108,9 @@ public class PayoutItemLinks { /// /// Unique identifier, beginning with "MD". Note that this prefix may - /// not apply to mandates created before 2016. + /// not apply to mandates created before 2016. Present only for the + /// items of type `payment_refunded`, `refund` and + /// `refund_funds_returned`. /// [JsonProperty("mandate")] public string Mandate { get; set; } @@ -122,7 +122,8 @@ public class PayoutItemLinks public string Payment { get; set; } /// - /// Unique identifier, beginning with "RF". + /// Unique identifier, beginning with "RF". Present only for the items + /// of type `payment_refunded`, `refund` and `refund_funds_returned`. /// [JsonProperty("refund")] public string Refund { get; set; } @@ -132,8 +133,7 @@ public class PayoutItemLinks /// An array of tax items beta /// /// _Note_: VAT applies to transaction and surcharge fees for merchants - /// operating in the UK - /// and France. + /// operating in the UK and France. ///
public class PayoutItemTaxis { diff --git a/GoCardless/Resources/RedirectFlow.cs b/GoCardless/Resources/RedirectFlow.cs index e00bd25..e6f3887 100644 --- a/GoCardless/Resources/RedirectFlow.cs +++ b/GoCardless/Resources/RedirectFlow.cs @@ -96,7 +96,8 @@ public class RedirectFlow /// /// 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. + /// names up to 50 characters and values up to 500 characters. _Note:_ + /// This should not be used for storing PII data. /// [JsonProperty("metadata")] public IDictionary Metadata { get; set; } @@ -211,15 +212,18 @@ public enum RedirectFlowScheme { /// `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 "sepa_core" - [EnumMember(Value = "sepa_core")] - SepaCore, /// `scheme` with a value of "pay_to" [EnumMember(Value = "pay_to")] PayTo, + /// `scheme` with a value of "sepa_core" + [EnumMember(Value = "sepa_core")] + SepaCore, } } diff --git a/GoCardless/Resources/Refund.cs b/GoCardless/Resources/Refund.cs index 938ea58..25b80bb 100644 --- a/GoCardless/Resources/Refund.cs +++ b/GoCardless/Resources/Refund.cs @@ -75,6 +75,7 @@ public class Refund /// Bacs - 10 characters
BECS - /// 30 characters
BECS NZ - 12 characters
/// Betalingsservice - 30 characters
+ /// Faster Payments - 18 characters
/// PAD - scheme doesn't offer references
/// PayTo - 18 characters
SEPA - /// 140 characters
Note that this reference must be unique (for @@ -83,7 +84,9 @@ public class Refund /// specify a payment reference for Bacs payments (that is, when /// collecting from the UK) if you're on the GoCardless Plus, Pro or - /// Enterprise packages.

+ /// Enterprise packages.

Restricted: You can not + /// specify a payment reference for Faster Payments.

///
[JsonProperty("reference")] public string Reference { get; set; } diff --git a/GoCardless/Resources/ScenarioSimulator.cs b/GoCardless/Resources/ScenarioSimulator.cs index 54bb319..9db6872 100644 --- a/GoCardless/Resources/ScenarioSimulator.cs +++ b/GoCardless/Resources/ScenarioSimulator.cs @@ -118,6 +118,10 @@ public class ScenarioSimulator /// customer contacts GoCardless to change their bank details. It must /// start in the `pending_submission` state. Only compatible with Bacs, /// SEPA and Autogiro mandates. + ///
  • `mandate_suspended_by_payer`: Transitions a mandate to + /// `suspended_by_payer`, as if payer has suspended the mandate after it + /// has been setup successfully. It must start in the `activated` state. + /// Only compatible with PAY_TO mandates.
  • ///
  • `refund_paid`: Transitions a refund to `paid`. It must start in /// either the `pending_submission` or `submitted` state.
  • ///
  • `refund_settled`: Transitions a refund to `paid`, if it's not diff --git a/GoCardless/Services/BankAuthorisationService.cs b/GoCardless/Services/BankAuthorisationService.cs index 5e8bf26..4dcdd4b 100644 --- a/GoCardless/Services/BankAuthorisationService.cs +++ b/GoCardless/Services/BankAuthorisationService.cs @@ -125,20 +125,20 @@ public enum BankAuthorisationAuthorisationType ///
  • public class BankAuthorisationLinks { - - /// - /// ID of the [billing request](#billing-requests-billing-requests) + + /// + /// ID of the [billing request](#billing-requests-billing-requests) /// against which this authorisation was created. - /// - [JsonProperty("billing_request")] - public string BillingRequest { get; set; } - - /// - /// ID of the [institution](#billing-requests-institutions) against + /// + [JsonProperty("billing_request")] + public string BillingRequest { get; set; } + + /// + /// ID of the [institution](#billing-requests-institutions) against /// which this authorisation was created. - /// - [JsonProperty("institution")] - public string Institution { get; set; } + /// + [JsonProperty("institution")] + public string Institution { get; set; } } /// diff --git a/GoCardless/Services/BillingRequestFlowService.cs b/GoCardless/Services/BillingRequestFlowService.cs index 461224b..0701a43 100644 --- a/GoCardless/Services/BillingRequestFlowService.cs +++ b/GoCardless/Services/BillingRequestFlowService.cs @@ -95,6 +95,14 @@ public class BillingRequestFlowCreateRequest [JsonProperty("exit_uri")] public string ExitUri { get; set; } + /// + /// Sets the default language of the Billing Request Flow and the + /// customer. [ISO + /// 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code. + /// + [JsonProperty("language")] + public string Language { get; set; } + /// /// Linked resources. /// @@ -105,19 +113,23 @@ public class BillingRequestFlowCreateRequest /// public class BillingRequestFlowLinks { - - /// - /// ID of the [billing request](#billing-requests-billing-requests) + + /// + /// ID of the [billing request](#billing-requests-billing-requests) /// against which this flow was created. - /// - [JsonProperty("billing_request")] - public string BillingRequest { get; set; } + /// + [JsonProperty("billing_request")] + public string BillingRequest { get; set; } } /// /// If true, the payer will not be able to change their bank account /// within the flow. If the bank_account details are collected as part - /// of bank_authorisation then GC will set this value to true mid flow + /// of bank_authorisation then GC will set this value to true mid flow. + /// + /// You can only lock bank account if these have already been completed + /// as a part of the billing request. + /// /// [JsonProperty("lock_bank_account")] public bool? LockBankAccount { get; set; } @@ -134,7 +146,11 @@ public class BillingRequestFlowLinks /// /// If true, the payer will not be able to edit their customer details /// within the flow. If the customer details are collected as part of - /// bank_authorisation then GC will set this value to true mid flow + /// bank_authorisation then GC will set this value to true mid flow. + /// + /// You can only lock customer details if these have already been + /// completed as a part of the billing request. + /// /// [JsonProperty("lock_customer_details")] public bool? LockCustomerDetails { get; set; } @@ -155,15 +171,15 @@ public class BillingRequestFlowLinks /// public class BillingRequestFlowPrefilledBankAccount { - - /// - /// Bank account type for USD-denominated bank accounts. Must not be + + /// + /// Bank account type for USD-denominated bank accounts. Must not be /// provided for bank accounts in other currencies. See [local /// details](#local-bank-details-united-states) for more /// information. - /// - [JsonProperty("account_type")] - public BillingRequestFlowAccountType? AccountType { get; set; } + /// + [JsonProperty("account_type")] + public BillingRequestFlowAccountType? AccountType { get; set; } /// /// Bank account type for USD-denominated bank accounts. Must not be /// provided for bank accounts in other currencies. See [local @@ -198,97 +214,89 @@ public enum BillingRequestFlowAccountType /// public class BillingRequestFlowPrefilledCustomer { - - /// - /// The first line of the customer's address. - /// - [JsonProperty("address_line1")] - public string AddressLine1 { get; set; } - - /// - /// The second line of the customer's address. - /// - [JsonProperty("address_line2")] - public string AddressLine2 { get; set; } - - /// - /// The third line of the customer's address. - /// - [JsonProperty("address_line3")] - public string AddressLine3 { get; set; } - - /// - /// The city of the customer's address. - /// - [JsonProperty("city")] - public string City { get; set; } - - /// - /// Customer's company name. Company name should only be provided if + + /// + /// The first line of the customer's address. + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the customer's address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the customer's address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The city of the customer's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// Customer's company name. Company name should only be provided if /// `given_name` and `family_name` are null. - /// - [JsonProperty("company_name")] - public string CompanyName { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + /// + [JsonProperty("company_name")] + public string CompanyName { 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; } - - /// - /// For Danish customers only. The civic/company number (CPR or CVR) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// For Danish customers only. The civic/company number (CPR or CVR) /// of the customer. - /// - [JsonProperty("danish_identity_number")] - public string DanishIdentityNumber { get; set; } - - /// - /// Customer's email address. - /// - [JsonProperty("email")] - public string Email { get; set; } - - /// - /// Customer's surname. - /// - [JsonProperty("family_name")] - public string FamilyName { get; set; } - - /// - /// Customer's first name. - /// - [JsonProperty("given_name")] - public string GivenName { get; set; } - - /// - /// [ISO - /// 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) - /// code. - /// - [JsonProperty("language")] - public string Language { get; set; } - - /// - /// The customer's postal code. - /// - [JsonProperty("postal_code")] - public string PostalCode { get; set; } - - /// - /// The customer's address region, county or department. - /// - [JsonProperty("region")] - public string Region { get; set; } - - /// - /// For Swedish customers only. The civic/company number + /// + [JsonProperty("danish_identity_number")] + public string DanishIdentityNumber { get; set; } + + /// + /// Customer's email address. + /// + [JsonProperty("email")] + public string Email { get; set; } + + /// + /// Customer's surname. + /// + [JsonProperty("family_name")] + public string FamilyName { get; set; } + + /// + /// Customer's first name. + /// + [JsonProperty("given_name")] + public string GivenName { get; set; } + + /// + /// The customer's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The customer's address region, county or department. + /// + [JsonProperty("region")] + public string Region { get; set; } + + /// + /// For Swedish customers only. The civic/company number /// (personnummer, samordningsnummer, or organisationsnummer) of the /// customer. - /// - [JsonProperty("swedish_identity_number")] - public string SwedishIdentityNumber { get; set; } + /// + [JsonProperty("swedish_identity_number")] + public string SwedishIdentityNumber { get; set; } } /// diff --git a/GoCardless/Services/BillingRequestService.cs b/GoCardless/Services/BillingRequestService.cs index 58c313f..f66cc5c 100644 --- a/GoCardless/Services/BillingRequestService.cs +++ b/GoCardless/Services/BillingRequestService.cs @@ -228,9 +228,12 @@ public Task FulfilAsync(string identity, BillingRequestF /// /// This will allow for the updating of the currency and subsequently - /// the scheme if needed for a billing request - /// this will only be available for mandate only flows, it will not - /// support payments requests or plans + /// the scheme if + /// needed for a Billing Request. This will only be available for + /// mandate only flows + /// which do not have the lock_currency flag set to true on the Billing + /// Request Flow. It + /// will also not support any request which has a payments request. /// /// Unique identifier, beginning with "BRQ". /// An optional `BillingRequestChooseCurrencyRequest` representing the body for this choose_currency request. @@ -489,29 +492,29 @@ public class BillingRequestCreateRequest : IHasIdempotencyKey /// public class BillingRequestLinks { - - /// - /// ID of the associated [creditor](#core-endpoints-creditors). Only + + /// + /// ID of the associated [creditor](#core-endpoints-creditors). Only /// required if your account manages multiple creditors. - /// - [JsonProperty("creditor")] - public string Creditor { get; set; } - - /// - /// ID of the [customer](#core-endpoints-customers) against which + /// + [JsonProperty("creditor")] + public string Creditor { get; set; } + + /// + /// ID of the [customer](#core-endpoints-customers) against which /// this request should be made. - /// - [JsonProperty("customer")] - public string Customer { get; set; } - - /// - /// (Optional) ID of the + /// + [JsonProperty("customer")] + public string Customer { get; set; } + + /// + /// (Optional) ID of the /// [customer_bank_account](#core-endpoints-customer-bank-accounts) /// against which this request should be made. /// - /// - [JsonProperty("customer_bank_account")] - public string CustomerBankAccount { get; set; } + /// + [JsonProperty("customer_bank_account")] + public string CustomerBankAccount { get; set; } } [JsonProperty("mandate_request")] @@ -521,40 +524,190 @@ public class BillingRequestLinks /// public class BillingRequestMandateRequest { - - /// - /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + + /// + /// Constraints that will apply to the mandate_request. (Optional) + /// Specifically for PayTo and VRP. + /// + [JsonProperty("constraints")] + public BillingRequestConstraints Constraints { get; set; } + /// + /// Constraints that will apply to the mandate_request. (Optional) + /// Specifically for PayTo and VRP. + /// + public class BillingRequestConstraints + { + + /// + /// The latest date at which payments can be taken, must occur after + /// start_date if present + /// + /// This is an optional field and if it is not supplied the + /// agreement will be considered open and + /// will not have an end date. Keep in mind the end date must take + /// into account how long it will + /// take the user to set up this agreement via the BillingRequest. + /// + /// + [JsonProperty("end_date")] + public string EndDate { get; set; } + + /// + /// The maximum amount that can be charged for a single payment + /// + [JsonProperty("max_amount_per_payment")] + public int? MaxAmountPerPayment { get; set; } + + /// + /// List of periodic limits and constraints which apply to them + /// + [JsonProperty("periodic_limits")] + public BillingRequestPeriodicLimits[] PeriodicLimits { get; set; } + /// + /// + /// + public class BillingRequestPeriodicLimits + { + + /// + /// The alignment of the period. + /// + /// `calendar` - this will finish on the end of the current period. + /// For example this will expire on the Monday for the current week + /// or the January for the next year. + /// + /// `creation_date` - this will finish on the next instance of the + /// current period. For example Monthly it will expire on the same + /// day of the next month, or yearly the same day of the next year. + /// + /// + [JsonProperty("alignment")] + public BillingRequestAlignment? Alignment { get; set; } + /// + /// The alignment of the period. + /// + /// `calendar` - this will finish on the end of the current period. For + /// example this will expire on the Monday for the current week or the + /// January for the next year. + /// + /// `creation_date` - this will finish on the next instance of the + /// current period. For example Monthly it will expire on the same day + /// of the next month, or yearly the same day of the next year. + /// + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BillingRequestAlignment + { + + /// `alignment` with a value of "calendar" + [EnumMember(Value = "calendar")] + Calendar, + /// `alignment` with a value of "creation_date" + [EnumMember(Value = "creation_date")] + CreationDate, + } + + /// + /// The maximum number of payments that can be collected in this + /// periodic limit + /// + [JsonProperty("max_payments")] + public int? MaxPayments { get; set; } + + /// + /// The maximum total amount that can be charged for all payments in + /// this periodic limit + /// + [JsonProperty("max_total_amount")] + public int? MaxTotalAmount { get; set; } + + /// + /// The repeating period for this mandate + /// + [JsonProperty("period")] + public BillingRequestPeriod? Period { get; set; } + /// + /// The repeating period for this mandate + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum BillingRequestPeriod + { + + /// `period` with a value of "day" + [EnumMember(Value = "day")] + Day, + /// `period` with a value of "week" + [EnumMember(Value = "week")] + Week, + /// `period` with a value of "month" + [EnumMember(Value = "month")] + Month, + /// `period` with a value of "year" + [EnumMember(Value = "year")] + Year, + /// `period` with a value of "flexible" + [EnumMember(Value = "flexible")] + Flexible, + } + } + + /// + /// The date from which payments can be taken. + /// + /// This is an optional field and if it is not supplied the start + /// date will be set to the day + /// authorisation happens. + /// + /// + [JsonProperty("start_date")] + public string StartDate { get; set; } + } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) /// currency code. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + /// + [JsonProperty("currency")] + public string Currency { get; set; } + + /// + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing + /// request. + /// + /// + [JsonProperty("description")] + public string Description { 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; } - - /// - /// Unique reference. Different schemes have different length and + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// Unique reference. Different schemes have different length and /// [character set](#appendix-character-sets) requirements. /// GoCardless will generate a unique reference satisfying the /// different scheme requirements if this field is left blank. - /// - [JsonProperty("reference")] - public string Reference { get; set; } - - /// - /// A Direct Debit scheme. Currently "ach", "bacs", "becs", - /// "becs_nz", "betalingsservice", "pad", "pay_to" and "sepa_core" - /// are supported. - /// - [JsonProperty("scheme")] - public string Scheme { get; set; } - - /// - /// Verification preference for the mandate. One of: + /// + [JsonProperty("reference")] + public string Reference { get; set; } + + /// + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", + /// "becs", "becs_nz", "betalingsservice", "faster_payments", "pad", + /// "pay_to" and "sepa_core" are supported. Optional for mandate + /// only requests - if left blank, the payer will be able to select + /// the currency/scheme to pay with from a list of your available + /// schemes. + /// + [JsonProperty("scheme")] + public string Scheme { get; set; } + + /// + /// Verification preference for the mandate. One of: ///
      ///
    • `minimum`: only verify if absolutely required, such as /// when part of scheme rules
    • @@ -581,9 +734,9 @@ public class BillingRequestMandateRequest /// See [Billing Requests: Creating Verified /// Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/) /// for more information. - ///
    - [JsonProperty("verify")] - public BillingRequestVerify? Verify { get; set; } + ///
    + [JsonProperty("verify")] + public BillingRequestVerify? Verify { get; set; } /// /// Verification preference for the mandate. One of: ///
      @@ -646,57 +799,58 @@ public enum BillingRequestVerify ///
    public class BillingRequestPaymentRequest { - - /// - /// Amount in minor unit (e.g. pence in GBP, cents in EUR). - /// - [JsonProperty("amount")] - public int? Amount { get; set; } - - /// - /// The amount to be deducted from the payment as an app fee, to be + + /// + /// Amount in minor unit (e.g. pence in GBP, cents in EUR). + /// + [JsonProperty("amount")] + public int? Amount { get; set; } + + /// + /// The amount to be deducted from the payment as an app fee, to be /// paid to the partner integration which created the billing /// request, in the lowest denomination for the currency (e.g. pence /// in GBP, cents in EUR). - /// - [JsonProperty("app_fee")] - public int? AppFee { get; set; } - - /// - /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + /// + [JsonProperty("app_fee")] + public int? AppFee { get; set; } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) /// currency code. `GBP` and `EUR` supported; `GBP` with your /// customers in the UK and for `EUR` with your customers in Germany /// only. - /// - [JsonProperty("currency")] - public string Currency { get; set; } - - /// - /// A human-readable description of the payment. This will be - /// displayed to the payer when authorising the billing request. + /// + [JsonProperty("currency")] + public string Currency { get; set; } + + /// + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing + /// request. /// - /// - [JsonProperty("description")] - public string Description { get; set; } - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + /// + [JsonProperty("description")] + public string Description { 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; } - - /// - /// (Optional) A scheme used for Open Banking payments. Currently + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// (Optional) A scheme used for Open Banking payments. Currently /// `faster_payments` is supported in the UK (GBP) and /// `sepa_credit_transfer` and `sepa_instant_credit_transfer` are /// supported in Germany (EUR). In Germany, `sepa_credit_transfer` /// is used as the default. Please be aware that /// `sepa_instant_credit_transfer` may incur an additional fee for /// your customer. - /// - [JsonProperty("scheme")] - public string Scheme { get; set; } + /// + [JsonProperty("scheme")] + public string Scheme { get; set; } } /// @@ -740,41 +894,41 @@ public class BillingRequestCollectCustomerDetailsRequest /// public class BillingRequestCustomer { - - /// - /// Customer's company name. Required unless a `given_name` and + + /// + /// Customer's company name. Required unless a `given_name` and /// `family_name` are provided. For Canadian customers, the use of a /// `company_name` value will mean that any mandate created from /// this customer will be considered to be a "Business PAD" /// (otherwise, any mandate will be considered to be a "Personal /// PAD"). - /// - [JsonProperty("company_name")] - public string CompanyName { get; set; } - - /// - /// Customer's email address. Required in most cases, as this allows + /// + [JsonProperty("company_name")] + public string CompanyName { get; set; } + + /// + /// Customer's email address. Required in most cases, as this allows /// GoCardless to send notifications to this customer. - /// - [JsonProperty("email")] - public string Email { get; set; } - - /// - /// Customer's surname. Required unless a `company_name` is + /// + [JsonProperty("email")] + public string Email { get; set; } + + /// + /// Customer's surname. Required unless a `company_name` is /// provided. - /// - [JsonProperty("family_name")] - public string FamilyName { get; set; } - - /// - /// Customer's first name. Required unless a `company_name` is + /// + [JsonProperty("family_name")] + public string FamilyName { get; set; } + + /// + /// Customer's first name. Required unless a `company_name` is /// provided. - /// - [JsonProperty("given_name")] - public string GivenName { get; set; } - - /// - /// [ISO + /// + [JsonProperty("given_name")] + public string GivenName { get; set; } + + /// + /// [ISO /// 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) /// code. Used as the language for notification emails sent by /// GoCardless if your organisation does not send its own (see @@ -783,23 +937,23 @@ public class BillingRequestCustomer /// "nb", "sl", "sv" are supported. If this is not provided, the /// language will be chosen based on the `country_code` (if /// supplied) or default to "en". - /// - [JsonProperty("language")] - public string Language { get; set; } - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + /// + [JsonProperty("language")] + public string Language { 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; } - - /// - /// [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone /// number, including country code. - /// - [JsonProperty("phone_number")] - public string PhoneNumber { get; set; } + /// + [JsonProperty("phone_number")] + public string PhoneNumber { get; set; } } [JsonProperty("customer_billing_detail")] @@ -809,79 +963,79 @@ public class BillingRequestCustomer /// public class BillingRequestCustomerBillingDetail { - - /// - /// The first line of the customer's address. - /// - [JsonProperty("address_line1")] - public string AddressLine1 { get; set; } - - /// - /// The second line of the customer's address. - /// - [JsonProperty("address_line2")] - public string AddressLine2 { get; set; } - - /// - /// The third line of the customer's address. - /// - [JsonProperty("address_line3")] - public string AddressLine3 { get; set; } - - /// - /// The city of the customer's address. - /// - [JsonProperty("city")] - public string City { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + + /// + /// The first line of the customer's address. + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the customer's address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the customer's address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The city of the customer'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; } - - /// - /// For Danish customers only. The civic/company number (CPR or CVR) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// For Danish customers only. The civic/company number (CPR or CVR) /// of the customer. Must be supplied if the customer's bank account /// is denominated in Danish krone (DKK). - /// - [JsonProperty("danish_identity_number")] - public string DanishIdentityNumber { get; set; } - - /// - /// For ACH customers only. Required for ACH customers. A string + /// + [JsonProperty("danish_identity_number")] + public string DanishIdentityNumber { get; set; } + + /// + /// For ACH customers only. Required for ACH customers. A string /// 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). - /// - [JsonProperty("ip_address")] - public string IpAddress { get; set; } - - /// - /// The customer's postal code. - /// - [JsonProperty("postal_code")] - public string PostalCode { get; set; } - - /// - /// The customer's address region, county or department. For US + /// + [JsonProperty("ip_address")] + public string IpAddress { get; set; } + + /// + /// The customer's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The customer's address region, county or department. For US /// customers a 2 letter /// [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) /// state code is required (e.g. `CA` for California). - /// - [JsonProperty("region")] - public string Region { get; set; } - - /// - /// For Swedish customers only. The civic/company number + /// + [JsonProperty("region")] + public string Region { get; set; } + + /// + /// For Swedish customers only. The civic/company number /// (personnummer, samordningsnummer, or organisationsnummer) of the /// customer. Must be supplied if the customer's bank account is /// denominated in Swedish krona (SEK). This field cannot be changed /// once it has been set. - /// - [JsonProperty("swedish_identity_number")] - public string SwedishIdentityNumber { get; set; } + /// + [JsonProperty("swedish_identity_number")] + public string SwedishIdentityNumber { get; set; } } } @@ -1027,9 +1181,12 @@ public class BillingRequestFulfilRequest /// /// This will allow for the updating of the currency and subsequently the - /// scheme if needed for a billing request - /// this will only be available for mandate only flows, it will not support - /// payments requests or plans + /// scheme if + /// needed for a Billing Request. This will only be available for mandate + /// only flows + /// which do not have the lock_currency flag set to true on the Billing + /// Request Flow. It + /// will also not support any request which has a payments request. /// public class BillingRequestChooseCurrencyRequest { diff --git a/GoCardless/Services/BillingRequestTemplateService.cs b/GoCardless/Services/BillingRequestTemplateService.cs index af27146..0dcacdd 100644 --- a/GoCardless/Services/BillingRequestTemplateService.cs +++ b/GoCardless/Services/BillingRequestTemplateService.cs @@ -197,13 +197,13 @@ public class BillingRequestTemplateCreateRequest : IHasIdempotencyKey /// public class BillingRequestTemplateLinks { - - /// - /// ID of the associated [creditor](#core-endpoints-creditors). Only + + /// + /// ID of the associated [creditor](#core-endpoints-creditors). Only /// required if your account manages multiple creditors. - /// - [JsonProperty("creditor")] - public string Creditor { get; set; } + /// + [JsonProperty("creditor")] + public string Creditor { get; set; } } /// @@ -213,6 +213,14 @@ public class BillingRequestTemplateLinks [JsonProperty("mandate_request_currency")] public string MandateRequestCurrency { get; set; } + /// + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing request. + /// + /// + [JsonProperty("mandate_request_description")] + public string MandateRequestDescription { get; set; } + /// /// Key-value store of custom data that will be applied to the mandate /// created when this request is fulfilled. Up to 3 keys are permitted, @@ -222,8 +230,11 @@ public class BillingRequestTemplateLinks public IDictionary MandateRequestMetadata { get; set; } /// - /// A Direct Debit scheme. Currently "ach", "bacs", "becs", "becs_nz", - /// "betalingsservice", "pad", "pay_to" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. Optional for mandate only requests - + /// if left blank, the payer will be able to select the currency/scheme + /// to pay with from a list of your available schemes. /// [JsonProperty("mandate_request_scheme")] public string MandateRequestScheme { get; set; } @@ -337,8 +348,8 @@ public enum BillingRequestTemplateMandateRequestVerify public string PaymentRequestCurrency { get; set; } /// - /// A human-readable description of the payment. This will be displayed - /// to the payer when authorising the billing request. + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing request. /// /// [JsonProperty("payment_request_description")] @@ -395,6 +406,14 @@ public class BillingRequestTemplateUpdateRequest [JsonProperty("mandate_request_currency")] public string MandateRequestCurrency { get; set; } + /// + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing request. + /// + /// + [JsonProperty("mandate_request_description")] + public string MandateRequestDescription { get; set; } + /// /// Key-value store of custom data that will be applied to the mandate /// created when this request is fulfilled. Up to 3 keys are permitted, @@ -404,8 +423,11 @@ public class BillingRequestTemplateUpdateRequest public IDictionary MandateRequestMetadata { get; set; } /// - /// A Direct Debit scheme. Currently "ach", "bacs", "becs", "becs_nz", - /// "betalingsservice", "pad", "pay_to" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. Optional for mandate only requests - + /// if left blank, the payer will be able to select the currency/scheme + /// to pay with from a list of your available schemes. /// [JsonProperty("mandate_request_scheme")] public string MandateRequestScheme { get; set; } @@ -519,8 +541,8 @@ public enum BillingRequestTemplateMandateRequestVerify public string PaymentRequestCurrency { get; set; } /// - /// A human-readable description of the payment. This will be displayed - /// to the payer when authorising the billing request. + /// A human-readable description of the payment and/or mandate. This + /// will be displayed to the payer when authorising the billing request. /// /// [JsonProperty("payment_request_description")] diff --git a/GoCardless/Services/BlockService.cs b/GoCardless/Services/BlockService.cs index 6057031..e7e4baf 100644 --- a/GoCardless/Services/BlockService.cs +++ b/GoCardless/Services/BlockService.cs @@ -22,24 +22,38 @@ namespace GoCardless.Services /// /// The details used to create blocks can be exact matches, like a bank /// account or an email, - /// or a more generic match such as an email domain. New block types may be - /// added over time. + /// or a more generic match such as an email domain or bank name. Please be + /// careful when creating + /// blocks for more generic matches as this may block legitimate payers from + /// using your service. /// - /// A block object is in essence a simple rule that is used to match against - /// details in a - /// newly created mandate. If there is a successful match then the mandate - /// is transitioned - /// to a "blocked" state. + /// New block types may be added over time. /// - /// Payments and subscriptions cannot be created against a mandate in + /// A block is in essence a simple rule that is used to match against + /// details in a newly + /// created mandate. If there is a successful match then the mandate is + /// transitioned to a + /// "blocked" state. + /// + /// Please note: + /// + /// - Payments and subscriptions cannot be created against a mandate in /// blocked state. + /// - A mandate can never be transitioned out of the blocked state. /// - /// A mandate can never be transitioned out of the blocked state. + /// The one exception to this is when blocking a 'bank_name'. This block + /// will prevent bank + /// accounts from being created for banks that match the given name. To + /// ensure we match + /// bank names correctly an existing bank account must be used when creating + /// this block. Please + /// be aware that we cannot always match a bank account to a given bank + /// name. /// ///

    - /// This API is currently only available for approved integrators - please - /// get in touch if you would like - /// to use this API. + /// This API is currently only available for GoCardless Protect+ + /// integrators - please get in + /// touch if you would like to use this API. ///

    ///
    @@ -227,7 +241,8 @@ public class BlockCreateRequest : IHasIdempotencyKey /// /// Type of entity we will seek to match against when blocking the /// mandate. This - /// can currently be one of 'email', 'email_domain', or 'bank_account'. + /// can currently be one of 'email', 'email_domain', 'bank_account', or + /// 'bank_name'. /// [JsonProperty("block_type")] public string BlockType { get; set; } @@ -235,7 +250,8 @@ public class BlockCreateRequest : IHasIdempotencyKey /// /// Type of entity we will seek to match against when blocking the /// mandate. This - /// can currently be one of 'email', 'email_domain', or 'bank_account'. + /// can currently be one of 'email', 'email_domain', 'bank_account', or + /// 'bank_name'. /// [JsonConverter(typeof(StringEnumConverter))] public enum BlockBlockType @@ -250,6 +266,9 @@ public enum BlockBlockType /// `block_type` with a value of "bank_account" [EnumMember(Value = "bank_account")] BankAccount, + /// `block_type` with a value of "bank_name" + [EnumMember(Value = "bank_name")] + BankName, } /// @@ -306,9 +325,11 @@ public enum BlockReasonType /// be the raw value /// (in the case of emails or email domains) or the ID of the resource /// (in the case of - /// bank accounts). This means in order to block a specific bank account - /// it must already - /// have been created as a resource. + /// bank accounts and bank names). This means in order to block a + /// specific bank account + /// (even if you wish to block generically by name) it must already have + /// been created as + /// a resource. /// [JsonProperty("resource_reference")] public string ResourceReference { get; set; } @@ -359,7 +380,8 @@ public class BlockListRequest /// /// Type of entity we will seek to match against when blocking the /// mandate. This - /// can currently be one of 'email', 'email_domain', or 'bank_account'. + /// can currently be one of 'email', 'email_domain', 'bank_account', or + /// 'bank_name'. /// [JsonProperty("block_type")] public string BlockType { get; set; } @@ -367,7 +389,8 @@ public class BlockListRequest /// /// Type of entity we will seek to match against when blocking the /// mandate. This - /// can currently be one of 'email', 'email_domain', or 'bank_account'. + /// can currently be one of 'email', 'email_domain', 'bank_account', or + /// 'bank_name'. /// [JsonConverter(typeof(StringEnumConverter))] public enum BlockBlockType @@ -382,6 +405,9 @@ public enum BlockBlockType /// `block_type` with a value of "bank_account" [EnumMember(Value = "bank_account")] BankAccount, + /// `block_type` with a value of "bank_name" + [EnumMember(Value = "bank_name")] + BankName, } /// diff --git a/GoCardless/Services/CreditorBankAccountService.cs b/GoCardless/Services/CreditorBankAccountService.cs index d64b9ee..150b9d2 100644 --- a/GoCardless/Services/CreditorBankAccountService.cs +++ b/GoCardless/Services/CreditorBankAccountService.cs @@ -261,13 +261,13 @@ public enum CreditorBankAccountAccountType /// public class CreditorBankAccountLinks { - - /// - /// ID of the [creditor](#core-endpoints-creditors) that owns this + + /// + /// ID of the [creditor](#core-endpoints-creditors) that owns this /// bank account. - /// - [JsonProperty("creditor")] - public string Creditor { get; set; } + /// + [JsonProperty("creditor")] + public string Creditor { get; set; } } /// diff --git a/GoCardless/Services/CreditorService.cs b/GoCardless/Services/CreditorService.cs index eb30962..03cdc15 100644 --- a/GoCardless/Services/CreditorService.cs +++ b/GoCardless/Services/CreditorService.cs @@ -342,62 +342,62 @@ public class CreditorUpdateRequest /// public class CreditorLinks { - - /// - /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) + + /// + /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) /// which is set up to receive payouts in AUD. - /// - [JsonProperty("default_aud_payout_account")] - public string DefaultAudPayoutAccount { get; set; } - - /// - /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) + /// + [JsonProperty("default_aud_payout_account")] + public string DefaultAudPayoutAccount { get; set; } + + /// + /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) /// which is set up to receive payouts in CAD. - /// - [JsonProperty("default_cad_payout_account")] - public string DefaultCadPayoutAccount { get; set; } - - /// - /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) + /// + [JsonProperty("default_cad_payout_account")] + public string DefaultCadPayoutAccount { get; set; } + + /// + /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) /// which is set up to receive payouts in DKK. - /// - [JsonProperty("default_dkk_payout_account")] - public string DefaultDkkPayoutAccount { get; set; } - - /// - /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) + /// + [JsonProperty("default_dkk_payout_account")] + public string DefaultDkkPayoutAccount { get; set; } + + /// + /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) /// which is set up to receive payouts in EUR. - /// - [JsonProperty("default_eur_payout_account")] - public string DefaultEurPayoutAccount { get; set; } - - /// - /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) + /// + [JsonProperty("default_eur_payout_account")] + public string DefaultEurPayoutAccount { get; set; } + + /// + /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) /// which is set up to receive payouts in GBP. - /// - [JsonProperty("default_gbp_payout_account")] - public string DefaultGbpPayoutAccount { get; set; } - - /// - /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) + /// + [JsonProperty("default_gbp_payout_account")] + public string DefaultGbpPayoutAccount { get; set; } + + /// + /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) /// which is set up to receive payouts in NZD. - /// - [JsonProperty("default_nzd_payout_account")] - public string DefaultNzdPayoutAccount { get; set; } - - /// - /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) + /// + [JsonProperty("default_nzd_payout_account")] + public string DefaultNzdPayoutAccount { get; set; } + + /// + /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) /// which is set up to receive payouts in SEK. - /// - [JsonProperty("default_sek_payout_account")] - public string DefaultSekPayoutAccount { get; set; } - - /// - /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) + /// + [JsonProperty("default_sek_payout_account")] + public string DefaultSekPayoutAccount { get; set; } + + /// + /// ID of the [bank account](#core-endpoints-creditor-bank-accounts) /// which is set up to receive payouts in USD. - /// - [JsonProperty("default_usd_payout_account")] - public string DefaultUsdPayoutAccount { get; set; } + /// + [JsonProperty("default_usd_payout_account")] + public string DefaultUsdPayoutAccount { get; set; } } /// diff --git a/GoCardless/Services/CustomerBankAccountService.cs b/GoCardless/Services/CustomerBankAccountService.cs index d9a04af..910ff73 100644 --- a/GoCardless/Services/CustomerBankAccountService.cs +++ b/GoCardless/Services/CustomerBankAccountService.cs @@ -313,21 +313,21 @@ public enum CustomerBankAccountAccountType /// public class CustomerBankAccountLinks { - - /// - /// ID of the [customer](#core-endpoints-customers) that owns this + + /// + /// ID of the [customer](#core-endpoints-customers) that owns this /// bank account. - /// - [JsonProperty("customer")] - public string Customer { get; set; } - - /// - /// ID of a [customer bank account + /// + [JsonProperty("customer")] + public string Customer { get; set; } + + /// + /// ID of a [customer bank account /// token](#javascript-flow-customer-bank-account-tokens) to use in /// place of bank account parameters. - /// - [JsonProperty("customer_bank_account_token")] - public string CustomerBankAccountToken { get; set; } + /// + [JsonProperty("customer_bank_account_token")] + public string CustomerBankAccountToken { get; set; } } /// diff --git a/GoCardless/Services/InstalmentScheduleService.cs b/GoCardless/Services/InstalmentScheduleService.cs index 2a800e4..a449d0f 100644 --- a/GoCardless/Services/InstalmentScheduleService.cs +++ b/GoCardless/Services/InstalmentScheduleService.cs @@ -324,34 +324,34 @@ public enum InstalmentScheduleCurrency /// public class InstalmentScheduleInstalments { - - /// - /// Amount, in the lowest denomination for the currency (e.g. pence + + /// + /// Amount, in the lowest denomination for the currency (e.g. pence /// in GBP, cents in EUR). - /// - [JsonProperty("amount")] - public int? Amount { get; set; } - - /// - /// A future date on which the payment should be collected. If the + /// + [JsonProperty("amount")] + public int? Amount { get; set; } + + /// + /// A future date on which the payment should be collected. If the /// date /// is before the next_possible_charge_date on the /// [mandate](#core-endpoints-mandates), it will be automatically /// rolled /// forwards to that date. - /// - [JsonProperty("charge_date")] - public string ChargeDate { get; set; } - - /// - /// A human-readable description of the payment. This will be + /// + [JsonProperty("charge_date")] + public string ChargeDate { get; set; } + + /// + /// A human-readable description of the payment. This will be /// included in the notification email GoCardless sends to your /// customer if your organisation does not send its own /// notifications (see [compliance /// requirements](#appendix-compliance-requirements)). - /// - [JsonProperty("description")] - public string Description { get; set; } + /// + [JsonProperty("description")] + public string Description { get; set; } } /// @@ -364,13 +364,13 @@ public class InstalmentScheduleInstalments /// public class InstalmentScheduleLinks { - - /// - /// ID of the associated [mandate](#core-endpoints-mandates) which + + /// + /// ID of the associated [mandate](#core-endpoints-mandates) which /// the instalment schedule will create payments against. - /// - [JsonProperty("mandate")] - public string Mandate { get; set; } + /// + [JsonProperty("mandate")] + public string Mandate { get; set; } } /// @@ -397,6 +397,7 @@ public class InstalmentScheduleLinks /// Bacs - 10 characters
    BECS - /// 30 characters
    BECS NZ - 12 characters
    /// Betalingsservice - 30 characters
    + /// Faster Payments - 18 characters
    /// PAD - scheme doesn't offer references
    /// PayTo - 18 characters
    SEPA - /// 140 characters
    Note that this reference must be unique (for @@ -405,7 +406,9 @@ public class InstalmentScheduleLinks /// specify a payment reference for Bacs payments (that is, when /// collecting from the UK) if you're on the GoCardless Plus, Pro or - /// Enterprise packages.

    + /// Enterprise packages.

    Restricted: You can not + /// specify a payment reference for Faster Payments.

    ///
    [JsonProperty("payment_reference")] public string PaymentReference { get; set; } @@ -530,31 +533,31 @@ public enum InstalmentScheduleCurrency ///
    public class InstalmentScheduleInstalments { - - /// - /// List of amounts of each instalment, in the lowest denomination + + /// + /// List of amounts of each instalment, in the lowest denomination /// for the /// currency (e.g. pence in GBP, cents in EUR). /// - /// - [JsonProperty("amounts")] - public int?[] Amounts { get; set; } - - /// - /// Number of `interval_units` between charge dates. Must be greater + /// + [JsonProperty("amounts")] + public int?[] Amounts { get; set; } + + /// + /// Number of `interval_units` between charge dates. Must be greater /// than or /// equal to `1`. /// - /// - [JsonProperty("interval")] - public int? Interval { get; set; } - - /// - /// The unit of time between customer charge dates. One of `weekly`, + /// + [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 InstalmentScheduleIntervalUnit? IntervalUnit { get; set; } + /// + [JsonProperty("interval_unit")] + public InstalmentScheduleIntervalUnit? IntervalUnit { get; set; } /// /// The unit of time between customer charge dates. One of `weekly`, /// `monthly` or `yearly`. @@ -573,17 +576,17 @@ public enum InstalmentScheduleIntervalUnit [EnumMember(Value = "yearly")] Yearly, } - - /// - /// The date on which the first payment should be charged. Must be + + /// + /// 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; } + /// + [JsonProperty("start_date")] + public string StartDate { get; set; } } /// @@ -596,13 +599,13 @@ public enum InstalmentScheduleIntervalUnit /// public class InstalmentScheduleLinks { - - /// - /// ID of the associated [mandate](#core-endpoints-mandates) which + + /// + /// ID of the associated [mandate](#core-endpoints-mandates) which /// the instalment schedule will create payments against. - /// - [JsonProperty("mandate")] - public string Mandate { get; set; } + /// + [JsonProperty("mandate")] + public string Mandate { get; set; } } /// @@ -629,6 +632,7 @@ public class InstalmentScheduleLinks /// Bacs - 10 characters
    BECS - /// 30 characters
    BECS NZ - 12 characters
    /// Betalingsservice - 30 characters
    + /// Faster Payments - 18 characters
    /// PAD - scheme doesn't offer references
    /// PayTo - 18 characters
    SEPA - /// 140 characters
    Note that this reference must be unique (for @@ -637,7 +641,9 @@ public class InstalmentScheduleLinks /// specify a payment reference for Bacs payments (that is, when /// collecting from the UK) if you're on the GoCardless Plus, Pro or - /// Enterprise packages.

    + /// Enterprise packages.

    Restricted: You can not + /// specify a payment reference for Faster Payments.

    ///
    [JsonProperty("payment_reference")] public string PaymentReference { get; set; } diff --git a/GoCardless/Services/MandateImportEntryService.cs b/GoCardless/Services/MandateImportEntryService.cs index 52d42d4..39b433f 100644 --- a/GoCardless/Services/MandateImportEntryService.cs +++ b/GoCardless/Services/MandateImportEntryService.cs @@ -166,31 +166,31 @@ public class MandateImportEntryCreateRequest ///
    public class MandateImportEntryAmendment { - - /// - /// The creditor identifier of the direct debit originator. Required + + /// + /// The creditor identifier of the direct debit originator. Required /// if mandate /// import scheme is `sepa`. /// - /// - [JsonProperty("original_creditor_id")] - public string OriginalCreditorId { get; set; } - - /// - /// Data about the original mandate to be moved or modified. + /// + [JsonProperty("original_creditor_id")] + public string OriginalCreditorId { get; set; } + + /// + /// Data about the original mandate to be moved or modified. /// - /// - [JsonProperty("original_creditor_name")] - public string OriginalCreditorName { get; set; } - - /// - /// The unique SEPA reference for the mandate being amended. + /// + [JsonProperty("original_creditor_name")] + public string OriginalCreditorName { get; set; } + + /// + /// The unique SEPA reference for the mandate being amended. /// Required if mandate /// import scheme is `sepa`. /// - /// - [JsonProperty("original_mandate_reference")] - public string OriginalMandateReference { get; set; } + /// + [JsonProperty("original_mandate_reference")] + public string OriginalMandateReference { get; set; } } [JsonProperty("bank_account")] @@ -200,57 +200,57 @@ public class MandateImportEntryAmendment ///
    public class MandateImportEntryBankAccount { - - /// - /// Name of the account holder, as known by the bank. Usually this + + /// + /// Name of the account holder, as known by the bank. Usually this /// is the same as the name stored with the linked /// [creditor](#core-endpoints-creditors). This field will be /// transliterated, upcased and truncated to 18 characters. This /// field is required unless the request includes a [customer bank /// account token](#javascript-flow-customer-bank-account-tokens). - /// - [JsonProperty("account_holder_name")] - public string AccountHolderName { get; set; } - - /// - /// Bank account number - see [local + /// + [JsonProperty("account_holder_name")] + public string AccountHolderName { get; set; } + + /// + /// Bank account number - see [local /// details](#appendix-local-bank-details) for more information. /// Alternatively you can provide an `iban`. - /// - [JsonProperty("account_number")] - public string AccountNumber { get; set; } - - /// - /// Bank code - see [local details](#appendix-local-bank-details) + /// + [JsonProperty("account_number")] + public string AccountNumber { get; set; } + + /// + /// Bank code - see [local details](#appendix-local-bank-details) /// for more information. Alternatively you can provide an `iban`. - /// - [JsonProperty("bank_code")] - public string BankCode { get; set; } - - /// - /// Branch code - see [local details](#appendix-local-bank-details) + /// + [JsonProperty("bank_code")] + public string BankCode { get; set; } + + /// + /// Branch code - see [local details](#appendix-local-bank-details) /// for more information. Alternatively you can provide an `iban`. - /// - [JsonProperty("branch_code")] - public string BranchCode { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + /// + [JsonProperty("branch_code")] + public string BranchCode { get; set; } + + /// + /// [ISO 3166-1 alpha-2 /// code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). /// Defaults to the country code of the `iban` if supplied, /// otherwise is required. - /// - [JsonProperty("country_code")] - public string CountryCode { get; set; } - - /// - /// International Bank Account Number. Alternatively you can provide + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// International Bank Account Number. Alternatively you can provide /// [local details](#appendix-local-bank-details). IBANs are not /// accepted for Swedish bank accounts denominated in SEK - you must /// supply [local details](#local-bank-details-sweden). - /// - [JsonProperty("iban")] - public string Iban { get; set; } + /// + [JsonProperty("iban")] + public string Iban { get; set; } } [JsonProperty("customer")] @@ -260,82 +260,82 @@ public class MandateImportEntryBankAccount /// public class MandateImportEntryCustomer { - - /// - /// The first line of the customer's address. Required if mandate + + /// + /// The first line of the customer's address. Required if mandate /// import scheme is either `bacs` or `sepa`. /// - /// - [JsonProperty("address_line1")] - public string AddressLine1 { get; set; } - - /// - /// The second line of the customer's address. - /// - [JsonProperty("address_line2")] - public string AddressLine2 { get; set; } - - /// - /// The third line of the customer's address. - /// - [JsonProperty("address_line3")] - public string AddressLine3 { get; set; } - - /// - /// The city of the customer's address. - /// - [JsonProperty("city")] - public string City { get; set; } - - /// - /// Customer's company name. Required unless a `given_name` and + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the customer's address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the customer's address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The city of the customer's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// Customer's company name. Required unless a `given_name` and /// `family_name` are provided. For Canadian customers, the use of a /// `company_name` value will mean that any mandate created from /// this customer will be considered to be a "Business PAD" /// (otherwise, any mandate will be considered to be a "Personal /// PAD"). - /// - [JsonProperty("company_name")] - public string CompanyName { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + /// + [JsonProperty("company_name")] + public string CompanyName { 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; } - - /// - /// For Danish customers only. The civic/company number (CPR or CVR) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// For Danish customers only. The civic/company number (CPR or CVR) /// of the customer. Must be supplied if the customer's bank account /// is denominated in Danish krone (DKK). - /// - [JsonProperty("danish_identity_number")] - public string DanishIdentityNumber { get; set; } - - /// - /// Customer's email address. Required in most cases, as this allows + /// + [JsonProperty("danish_identity_number")] + public string DanishIdentityNumber { get; set; } + + /// + /// Customer's email address. Required in most cases, as this allows /// GoCardless to send notifications to this customer. - /// - [JsonProperty("email")] - public string Email { get; set; } - - /// - /// Customer's surname. Required unless a `company_name` is + /// + [JsonProperty("email")] + public string Email { get; set; } + + /// + /// Customer's surname. Required unless a `company_name` is /// provided. - /// - [JsonProperty("family_name")] - public string FamilyName { get; set; } - - /// - /// Customer's first name. Required unless a `company_name` is + /// + [JsonProperty("family_name")] + public string FamilyName { get; set; } + + /// + /// Customer's first name. Required unless a `company_name` is /// provided. - /// - [JsonProperty("given_name")] - public string GivenName { get; set; } - - /// - /// [ISO + /// + [JsonProperty("given_name")] + public string GivenName { get; set; } + + /// + /// [ISO /// 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) /// code. Used as the language for notification emails sent by /// GoCardless if your organisation does not send its own (see @@ -344,43 +344,43 @@ public class MandateImportEntryCustomer /// "nb", "sl", "sv" are supported. If this is not provided, the /// language will be chosen based on the `country_code` (if /// supplied) or default to "en". - /// - [JsonProperty("language")] - public string Language { get; set; } - - /// - /// [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone + /// + [JsonProperty("language")] + public string Language { get; set; } + + /// + /// [ITU E.123](https://en.wikipedia.org/wiki/E.123) formatted phone /// number, including country code. - /// - [JsonProperty("phone_number")] - public string PhoneNumber { get; set; } - - /// - /// The customer's postal code. Required if mandate import scheme is + /// + [JsonProperty("phone_number")] + public string PhoneNumber { get; set; } + + /// + /// The customer's postal code. Required if mandate import scheme is /// either `bacs` or `sepa`. /// - /// - [JsonProperty("postal_code")] - public string PostalCode { get; set; } - - /// - /// The customer's address region, county or department. For US + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The customer's address region, county or department. For US /// customers a 2 letter /// [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) /// state code is required (e.g. `CA` for California). - /// - [JsonProperty("region")] - public string Region { get; set; } - - /// - /// For Swedish customers only. The civic/company number + /// + [JsonProperty("region")] + public string Region { get; set; } + + /// + /// For Swedish customers only. The civic/company number /// (personnummer, samordningsnummer, or organisationsnummer) of the /// customer. Must be supplied if the customer's bank account is /// denominated in Swedish krona (SEK). This field cannot be changed /// once it has been set. - /// - [JsonProperty("swedish_identity_number")] - public string SwedishIdentityNumber { get; set; } + /// + [JsonProperty("swedish_identity_number")] + public string SwedishIdentityNumber { get; set; } } /// @@ -393,12 +393,12 @@ public class MandateImportEntryCustomer /// public class MandateImportEntryLinks { - - /// - /// Unique identifier, beginning with "IM". - /// - [JsonProperty("mandate_import")] - public string MandateImport { get; set; } + + /// + /// Unique identifier, beginning with "IM". + /// + [JsonProperty("mandate_import")] + public string MandateImport { get; set; } } /// diff --git a/GoCardless/Services/MandateImportService.cs b/GoCardless/Services/MandateImportService.cs index f215d36..f234da4 100644 --- a/GoCardless/Services/MandateImportService.cs +++ b/GoCardless/Services/MandateImportService.cs @@ -186,15 +186,17 @@ public class MandateImportCreateRequest : IHasIdempotencyKey { /// - /// A Direct Debit scheme. Currently "ach", "autogiro", "bacs", "becs", - /// "becs_nz", "betalingsservice", "pad" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. /// [JsonProperty("scheme")] public MandateImportScheme? Scheme { get; set; } /// - /// A Direct Debit scheme. Currently "ach", "autogiro", "bacs", "becs", - /// "becs_nz", "betalingsservice", "pad" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. /// [JsonConverter(typeof(StringEnumConverter))] public enum MandateImportScheme @@ -218,15 +220,18 @@ public enum MandateImportScheme /// `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 "sepa_core" - [EnumMember(Value = "sepa_core")] - SepaCore, /// `scheme` with a value of "pay_to" [EnumMember(Value = "pay_to")] PayTo, + /// `scheme` with a value of "sepa_core" + [EnumMember(Value = "sepa_core")] + SepaCore, } /// diff --git a/GoCardless/Services/MandatePdfService.cs b/GoCardless/Services/MandatePdfService.cs index ec22898..c848c9d 100644 --- a/GoCardless/Services/MandatePdfService.cs +++ b/GoCardless/Services/MandatePdfService.cs @@ -262,15 +262,15 @@ public enum MandatePdfAccountType /// public class MandatePdfLinks { - - /// - /// ID of an existing [mandate](#core-endpoints-mandates) to build + + /// + /// ID of an existing [mandate](#core-endpoints-mandates) to build /// the PDF from. The customer's bank details will be censored in /// the generated PDF. No other parameters may be provided alongside /// this. - /// - [JsonProperty("mandate")] - public string Mandate { get; set; } + /// + [JsonProperty("mandate")] + public string Mandate { get; set; } } /// diff --git a/GoCardless/Services/MandateService.cs b/GoCardless/Services/MandateService.cs index b1a22e2..fda90e1 100644 --- a/GoCardless/Services/MandateService.cs +++ b/GoCardless/Services/MandateService.cs @@ -225,21 +225,21 @@ public class MandateCreateRequest : IHasIdempotencyKey /// public class MandateLinks { - - /// - /// ID of the associated [creditor](#core-endpoints-creditors). Only + + /// + /// ID of the associated [creditor](#core-endpoints-creditors). Only /// required if your account manages multiple creditors. - /// - [JsonProperty("creditor")] - public string Creditor { get; set; } - - /// - /// ID of the associated [customer bank + /// + [JsonProperty("creditor")] + public string Creditor { get; set; } + + /// + /// ID of the associated [customer bank /// account](#core-endpoints-customer-bank-accounts) which the /// mandate is created and submits payments against. - /// - [JsonProperty("customer_bank_account")] - public string CustomerBankAccount { get; set; } + /// + [JsonProperty("customer_bank_account")] + public string CustomerBankAccount { get; set; } } /// @@ -268,7 +268,7 @@ public class MandateLinks public string Reference { get; set; } /// - /// Direct Debit scheme to which this + /// Bank payment scheme to which this /// mandate and associated payments are submitted. Can be supplied or /// automatically detected from the customer's bank account. /// @@ -371,6 +371,12 @@ public class CreatedAtParam [JsonProperty("limit")] public int? Limit { get; set; } + /// + /// Mandate type + /// + [JsonProperty("mandate_type")] + public string MandateType { get; set; } + /// /// Unique reference. Different schemes have different length and /// [character set](#appendix-character-sets) requirements. GoCardless diff --git a/GoCardless/Services/PayerAuthorisationService.cs b/GoCardless/Services/PayerAuthorisationService.cs index 5e670b2..d3eaa52 100644 --- a/GoCardless/Services/PayerAuthorisationService.cs +++ b/GoCardless/Services/PayerAuthorisationService.cs @@ -250,49 +250,49 @@ public class PayerAuthorisationCreateRequest : IHasIdempotencyKey /// public class PayerAuthorisationBankAccount { - - /// - /// Name of the account holder, as known by the bank. Usually this + + /// + /// Name of the account holder, as known by the bank. Usually this /// is the same as the name stored with the linked /// [creditor](#core-endpoints-creditors). This field will be /// transliterated, upcased and truncated to 18 characters. This /// field is required unless the request includes a [customer bank /// account token](#javascript-flow-customer-bank-account-tokens). - /// - [JsonProperty("account_holder_name")] - public string AccountHolderName { get; set; } - - /// - /// Bank account number - see [local + /// + [JsonProperty("account_holder_name")] + public string AccountHolderName { get; set; } + + /// + /// Bank account number - see [local /// details](#appendix-local-bank-details) for more information. /// Alternatively you can provide an `iban`. - /// - [JsonProperty("account_number")] - public string AccountNumber { get; set; } - - /// - /// The last few digits of the account number. Currently 4 digits + /// + [JsonProperty("account_number")] + public string AccountNumber { get; set; } + + /// + /// The last few digits of the account number. Currently 4 digits /// for NZD bank accounts and 2 digits for other currencies. - /// - [JsonProperty("account_number_ending")] - public string AccountNumberEnding { get; set; } - - /// - /// Account number suffix (only for bank accounts denominated in + /// + [JsonProperty("account_number_ending")] + public string AccountNumberEnding { get; set; } + + /// + /// Account number suffix (only for bank accounts denominated in /// NZD) - see [local details](#local-bank-details-new-zealand) for /// more information. - /// - [JsonProperty("account_number_suffix")] - public string AccountNumberSuffix { get; set; } - - /// - /// Bank account type. Required for USD-denominated bank accounts. + /// + [JsonProperty("account_number_suffix")] + public string AccountNumberSuffix { get; set; } + + /// + /// Bank account type. Required for USD-denominated bank accounts. /// Must not be provided for bank accounts in other currencies. See /// [local details](#local-bank-details-united-states) for more /// information. - /// - [JsonProperty("account_type")] - public PayerAuthorisationAccountType? AccountType { get; set; } + /// + [JsonProperty("account_type")] + public PayerAuthorisationAccountType? AccountType { get; set; } /// /// Bank account type. Required for USD-denominated bank accounts. Must /// not be provided for bank accounts in other currencies. See [local @@ -309,53 +309,53 @@ public enum PayerAuthorisationAccountType [EnumMember(Value = "checking")] Checking, } - - /// - /// Bank code - see [local details](#appendix-local-bank-details) + + /// + /// Bank code - see [local details](#appendix-local-bank-details) /// for more information. Alternatively you can provide an `iban`. - /// - [JsonProperty("bank_code")] - public string BankCode { get; set; } - - /// - /// Branch code - see [local details](#appendix-local-bank-details) + /// + [JsonProperty("bank_code")] + public string BankCode { get; set; } + + /// + /// Branch code - see [local details](#appendix-local-bank-details) /// for more information. Alternatively you can provide an `iban`. - /// - [JsonProperty("branch_code")] - public string BranchCode { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + /// + [JsonProperty("branch_code")] + public string BranchCode { get; set; } + + /// + /// [ISO 3166-1 alpha-2 /// code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). /// Defaults to the country code of the `iban` if supplied, /// otherwise is required. - /// - [JsonProperty("country_code")] - public string CountryCode { get; set; } - - /// - /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + /// + [JsonProperty("country_code")] + public string CountryCode { 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; } - - /// - /// International Bank Account Number. Alternatively you can provide + /// + [JsonProperty("currency")] + public string Currency { get; set; } + + /// + /// International Bank Account Number. Alternatively you can provide /// [local details](#appendix-local-bank-details). IBANs are not /// accepted for Swedish bank accounts denominated in SEK - you must /// supply [local details](#local-bank-details-sweden). - /// - [JsonProperty("iban")] - public string Iban { get; set; } - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + /// + [JsonProperty("iban")] + public string Iban { 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; } + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } } /// @@ -370,118 +370,118 @@ public enum PayerAuthorisationAccountType /// public class PayerAuthorisationCustomer { - - /// - /// The first line of the customer's address. - /// - [JsonProperty("address_line1")] - public string AddressLine1 { get; set; } - - /// - /// The second line of the customer's address. - /// - [JsonProperty("address_line2")] - public string AddressLine2 { get; set; } - - /// - /// The third line of the customer's address. - /// - [JsonProperty("address_line3")] - public string AddressLine3 { get; set; } - - /// - /// The city of the customer's address. - /// - [JsonProperty("city")] - public string City { get; set; } - - /// - /// Customer's company name. Required unless a `given_name` and + + /// + /// The first line of the customer's address. + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the customer's address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the customer's address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The city of the customer's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// Customer's company name. Required unless a `given_name` and /// `family_name` are provided. For Canadian customers, the use of a /// `company_name` value will mean that any mandate created from /// this customer will be considered to be a "Business PAD" /// (otherwise, any mandate will be considered to be a "Personal /// PAD"). - /// - [JsonProperty("company_name")] - public string CompanyName { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + /// + [JsonProperty("company_name")] + public string CompanyName { 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; } - - /// - /// For Danish customers only. The civic/company number (CPR or CVR) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// For Danish customers only. The civic/company number (CPR or CVR) /// of the customer. Must be supplied if the customer's bank account /// is denominated in Danish krone (DKK). - /// - [JsonProperty("danish_identity_number")] - public string DanishIdentityNumber { get; set; } - - /// - /// Customer's email address. Required in most cases, as this allows + /// + [JsonProperty("danish_identity_number")] + public string DanishIdentityNumber { get; set; } + + /// + /// Customer's email address. Required in most cases, as this allows /// GoCardless to send notifications to this customer. - /// - [JsonProperty("email")] - public string Email { get; set; } - - /// - /// Customer's surname. Required unless a `company_name` is + /// + [JsonProperty("email")] + public string Email { get; set; } + + /// + /// Customer's surname. Required unless a `company_name` is /// provided. - /// - [JsonProperty("family_name")] - public string FamilyName { get; set; } - - /// - /// Customer's first name. Required unless a `company_name` is + /// + [JsonProperty("family_name")] + public string FamilyName { get; set; } + + /// + /// Customer's first name. Required unless a `company_name` is /// provided. - /// - [JsonProperty("given_name")] - public string GivenName { get; set; } - - /// - /// An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), + /// + [JsonProperty("given_name")] + public string GivenName { get; set; } + + /// + /// An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), /// used for both language /// and regional variations of our product. /// - /// - [JsonProperty("locale")] - public string Locale { get; set; } - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + /// + [JsonProperty("locale")] + public string Locale { 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; } - - /// - /// The customer's postal code. - /// - [JsonProperty("postal_code")] - public string PostalCode { get; set; } - - /// - /// The customer's address region, county or department. For US + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// The customer's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The customer's address region, county or department. For US /// customers a 2 letter /// [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) /// state code is required (e.g. `CA` for California). - /// - [JsonProperty("region")] - public string Region { get; set; } - - /// - /// For Swedish customers only. The civic/company number + /// + [JsonProperty("region")] + public string Region { get; set; } + + /// + /// For Swedish customers only. The civic/company number /// (personnummer, samordningsnummer, or organisationsnummer) of the /// customer. Must be supplied if the customer's bank account is /// denominated in Swedish krona (SEK). This field cannot be changed /// once it has been set. - /// - [JsonProperty("swedish_identity_number")] - public string SwedishIdentityNumber { get; set; } + /// + [JsonProperty("swedish_identity_number")] + public string SwedishIdentityNumber { get; set; } } /// @@ -496,42 +496,43 @@ public class PayerAuthorisationCustomer /// public class PayerAuthorisationMandate { - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + + /// + /// 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; } - - /// - /// For ACH customers only. Required for ACH customers. A string + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// For ACH customers only. Required for ACH customers. A string /// 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). - /// - [JsonProperty("payer_ip_address")] - public string PayerIpAddress { get; set; } - - /// - /// Unique reference. Different schemes have different length and + /// + [JsonProperty("payer_ip_address")] + public string PayerIpAddress { get; set; } + + /// + /// Unique reference. Different schemes have different length and /// [character set](#appendix-character-sets) requirements. /// GoCardless will generate a unique reference satisfying the /// different scheme requirements if this field is left blank. - /// - [JsonProperty("reference")] - public string Reference { get; set; } - - /// - /// A Direct Debit scheme. Currently "ach", "autogiro", "bacs", - /// "becs", "becs_nz", "betalingsservice", "pad" and "sepa_core" are - /// supported. - /// - [JsonProperty("scheme")] - public PayerAuthorisationScheme? Scheme { get; set; } + /// + [JsonProperty("reference")] + public string Reference { get; set; } + + /// + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", + /// "becs", "becs_nz", "betalingsservice", "faster_payments", "pad", + /// "pay_to" and "sepa_core" are supported. + /// + [JsonProperty("scheme")] + public PayerAuthorisationScheme? Scheme { get; set; } /// - /// A Direct Debit scheme. Currently "ach", "autogiro", "bacs", "becs", - /// "becs_nz", "betalingsservice", "pad" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. /// [JsonConverter(typeof(StringEnumConverter))] public enum PayerAuthorisationScheme @@ -555,15 +556,18 @@ public enum PayerAuthorisationScheme /// `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 "sepa_core" - [EnumMember(Value = "sepa_core")] - SepaCore, /// `scheme` with a value of "pay_to" [EnumMember(Value = "pay_to")] PayTo, + /// `scheme` with a value of "sepa_core" + [EnumMember(Value = "sepa_core")] + SepaCore, } } @@ -603,49 +607,49 @@ public class PayerAuthorisationUpdateRequest /// public class PayerAuthorisationBankAccount { - - /// - /// Name of the account holder, as known by the bank. Usually this + + /// + /// Name of the account holder, as known by the bank. Usually this /// is the same as the name stored with the linked /// [creditor](#core-endpoints-creditors). This field will be /// transliterated, upcased and truncated to 18 characters. This /// field is required unless the request includes a [customer bank /// account token](#javascript-flow-customer-bank-account-tokens). - /// - [JsonProperty("account_holder_name")] - public string AccountHolderName { get; set; } - - /// - /// Bank account number - see [local + /// + [JsonProperty("account_holder_name")] + public string AccountHolderName { get; set; } + + /// + /// Bank account number - see [local /// details](#appendix-local-bank-details) for more information. /// Alternatively you can provide an `iban`. - /// - [JsonProperty("account_number")] - public string AccountNumber { get; set; } - - /// - /// The last few digits of the account number. Currently 4 digits + /// + [JsonProperty("account_number")] + public string AccountNumber { get; set; } + + /// + /// The last few digits of the account number. Currently 4 digits /// for NZD bank accounts and 2 digits for other currencies. - /// - [JsonProperty("account_number_ending")] - public string AccountNumberEnding { get; set; } - - /// - /// Account number suffix (only for bank accounts denominated in + /// + [JsonProperty("account_number_ending")] + public string AccountNumberEnding { get; set; } + + /// + /// Account number suffix (only for bank accounts denominated in /// NZD) - see [local details](#local-bank-details-new-zealand) for /// more information. - /// - [JsonProperty("account_number_suffix")] - public string AccountNumberSuffix { get; set; } - - /// - /// Bank account type. Required for USD-denominated bank accounts. + /// + [JsonProperty("account_number_suffix")] + public string AccountNumberSuffix { get; set; } + + /// + /// Bank account type. Required for USD-denominated bank accounts. /// Must not be provided for bank accounts in other currencies. See /// [local details](#local-bank-details-united-states) for more /// information. - /// - [JsonProperty("account_type")] - public PayerAuthorisationAccountType? AccountType { get; set; } + /// + [JsonProperty("account_type")] + public PayerAuthorisationAccountType? AccountType { get; set; } /// /// Bank account type. Required for USD-denominated bank accounts. Must /// not be provided for bank accounts in other currencies. See [local @@ -662,53 +666,53 @@ public enum PayerAuthorisationAccountType [EnumMember(Value = "checking")] Checking, } - - /// - /// Bank code - see [local details](#appendix-local-bank-details) + + /// + /// Bank code - see [local details](#appendix-local-bank-details) /// for more information. Alternatively you can provide an `iban`. - /// - [JsonProperty("bank_code")] - public string BankCode { get; set; } - - /// - /// Branch code - see [local details](#appendix-local-bank-details) + /// + [JsonProperty("bank_code")] + public string BankCode { get; set; } + + /// + /// Branch code - see [local details](#appendix-local-bank-details) /// for more information. Alternatively you can provide an `iban`. - /// - [JsonProperty("branch_code")] - public string BranchCode { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + /// + [JsonProperty("branch_code")] + public string BranchCode { get; set; } + + /// + /// [ISO 3166-1 alpha-2 /// code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). /// Defaults to the country code of the `iban` if supplied, /// otherwise is required. - /// - [JsonProperty("country_code")] - public string CountryCode { get; set; } - - /// - /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) + /// + [JsonProperty("country_code")] + public string CountryCode { 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; } - - /// - /// International Bank Account Number. Alternatively you can provide + /// + [JsonProperty("currency")] + public string Currency { get; set; } + + /// + /// International Bank Account Number. Alternatively you can provide /// [local details](#appendix-local-bank-details). IBANs are not /// accepted for Swedish bank accounts denominated in SEK - you must /// supply [local details](#local-bank-details-sweden). - /// - [JsonProperty("iban")] - public string Iban { get; set; } - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + /// + [JsonProperty("iban")] + public string Iban { 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; } + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } } /// @@ -723,118 +727,118 @@ public enum PayerAuthorisationAccountType /// public class PayerAuthorisationCustomer { - - /// - /// The first line of the customer's address. - /// - [JsonProperty("address_line1")] - public string AddressLine1 { get; set; } - - /// - /// The second line of the customer's address. - /// - [JsonProperty("address_line2")] - public string AddressLine2 { get; set; } - - /// - /// The third line of the customer's address. - /// - [JsonProperty("address_line3")] - public string AddressLine3 { get; set; } - - /// - /// The city of the customer's address. - /// - [JsonProperty("city")] - public string City { get; set; } - - /// - /// Customer's company name. Required unless a `given_name` and + + /// + /// The first line of the customer's address. + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the customer's address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the customer's address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The city of the customer's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// Customer's company name. Required unless a `given_name` and /// `family_name` are provided. For Canadian customers, the use of a /// `company_name` value will mean that any mandate created from /// this customer will be considered to be a "Business PAD" /// (otherwise, any mandate will be considered to be a "Personal /// PAD"). - /// - [JsonProperty("company_name")] - public string CompanyName { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + /// + [JsonProperty("company_name")] + public string CompanyName { 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; } - - /// - /// For Danish customers only. The civic/company number (CPR or CVR) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// For Danish customers only. The civic/company number (CPR or CVR) /// of the customer. Must be supplied if the customer's bank account /// is denominated in Danish krone (DKK). - /// - [JsonProperty("danish_identity_number")] - public string DanishIdentityNumber { get; set; } - - /// - /// Customer's email address. Required in most cases, as this allows + /// + [JsonProperty("danish_identity_number")] + public string DanishIdentityNumber { get; set; } + + /// + /// Customer's email address. Required in most cases, as this allows /// GoCardless to send notifications to this customer. - /// - [JsonProperty("email")] - public string Email { get; set; } - - /// - /// Customer's surname. Required unless a `company_name` is + /// + [JsonProperty("email")] + public string Email { get; set; } + + /// + /// Customer's surname. Required unless a `company_name` is /// provided. - /// - [JsonProperty("family_name")] - public string FamilyName { get; set; } - - /// - /// Customer's first name. Required unless a `company_name` is + /// + [JsonProperty("family_name")] + public string FamilyName { get; set; } + + /// + /// Customer's first name. Required unless a `company_name` is /// provided. - /// - [JsonProperty("given_name")] - public string GivenName { get; set; } - - /// - /// An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), + /// + [JsonProperty("given_name")] + public string GivenName { get; set; } + + /// + /// An [IETF Language Tag](https://tools.ietf.org/html/rfc5646), /// used for both language /// and regional variations of our product. /// - /// - [JsonProperty("locale")] - public string Locale { get; set; } - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + /// + [JsonProperty("locale")] + public string Locale { 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; } - - /// - /// The customer's postal code. - /// - [JsonProperty("postal_code")] - public string PostalCode { get; set; } - - /// - /// The customer's address region, county or department. For US + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// The customer's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The customer's address region, county or department. For US /// customers a 2 letter /// [ISO3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) /// state code is required (e.g. `CA` for California). - /// - [JsonProperty("region")] - public string Region { get; set; } - - /// - /// For Swedish customers only. The civic/company number + /// + [JsonProperty("region")] + public string Region { get; set; } + + /// + /// For Swedish customers only. The civic/company number /// (personnummer, samordningsnummer, or organisationsnummer) of the /// customer. Must be supplied if the customer's bank account is /// denominated in Swedish krona (SEK). This field cannot be changed /// once it has been set. - /// - [JsonProperty("swedish_identity_number")] - public string SwedishIdentityNumber { get; set; } + /// + [JsonProperty("swedish_identity_number")] + public string SwedishIdentityNumber { get; set; } } /// @@ -849,42 +853,43 @@ public class PayerAuthorisationCustomer /// public class PayerAuthorisationMandate { - - /// - /// Key-value store of custom data. Up to 3 keys are permitted, with + + /// + /// 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; } - - /// - /// For ACH customers only. Required for ACH customers. A string + /// + [JsonProperty("metadata")] + public IDictionary Metadata { get; set; } + + /// + /// For ACH customers only. Required for ACH customers. A string /// 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). - /// - [JsonProperty("payer_ip_address")] - public string PayerIpAddress { get; set; } - - /// - /// Unique reference. Different schemes have different length and + /// + [JsonProperty("payer_ip_address")] + public string PayerIpAddress { get; set; } + + /// + /// Unique reference. Different schemes have different length and /// [character set](#appendix-character-sets) requirements. /// GoCardless will generate a unique reference satisfying the /// different scheme requirements if this field is left blank. - /// - [JsonProperty("reference")] - public string Reference { get; set; } - - /// - /// A Direct Debit scheme. Currently "ach", "autogiro", "bacs", - /// "becs", "becs_nz", "betalingsservice", "pad" and "sepa_core" are - /// supported. - /// - [JsonProperty("scheme")] - public PayerAuthorisationScheme? Scheme { get; set; } + /// + [JsonProperty("reference")] + public string Reference { get; set; } + + /// + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", + /// "becs", "becs_nz", "betalingsservice", "faster_payments", "pad", + /// "pay_to" and "sepa_core" are supported. + /// + [JsonProperty("scheme")] + public PayerAuthorisationScheme? Scheme { get; set; } /// - /// A Direct Debit scheme. Currently "ach", "autogiro", "bacs", "becs", - /// "becs_nz", "betalingsservice", "pad" and "sepa_core" are supported. + /// A bank payment scheme. Currently "ach", "autogiro", "bacs", "becs", + /// "becs_nz", "betalingsservice", "faster_payments", "pad", "pay_to" + /// and "sepa_core" are supported. /// [JsonConverter(typeof(StringEnumConverter))] public enum PayerAuthorisationScheme @@ -908,15 +913,18 @@ public enum PayerAuthorisationScheme /// `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 "sepa_core" - [EnumMember(Value = "sepa_core")] - SepaCore, /// `scheme` with a value of "pay_to" [EnumMember(Value = "pay_to")] PayTo, + /// `scheme` with a value of "sepa_core" + [EnumMember(Value = "sepa_core")] + SepaCore, } } } diff --git a/GoCardless/Services/PaymentService.cs b/GoCardless/Services/PaymentService.cs index ac88f3d..83720ad 100644 --- a/GoCardless/Services/PaymentService.cs +++ b/GoCardless/Services/PaymentService.cs @@ -312,13 +312,13 @@ public enum PaymentCurrency /// public class PaymentLinks { - - /// - /// ID of the [mandate](#core-endpoints-mandates) against which this + + /// + /// ID of the [mandate](#core-endpoints-mandates) against which this /// payment should be collected. - /// - [JsonProperty("mandate")] - public string Mandate { get; set; } + /// + [JsonProperty("mandate")] + public string Mandate { get; set; } } /// @@ -336,6 +336,7 @@ public class PaymentLinks /// Bacs - 10 characters
    BECS - /// 30 characters
    BECS NZ - 12 characters
    /// Betalingsservice - 30 characters
    + /// Faster Payments - 18 characters
    /// PAD - scheme doesn't offer references
    /// PayTo - 18 characters
    SEPA - /// 140 characters
    Note that this reference must be unique (for @@ -344,7 +345,9 @@ public class PaymentLinks /// specify a payment reference for Bacs payments (that is, when /// collecting from the UK) if you're on the GoCardless Plus, Pro or - /// Enterprise packages.

    + /// Enterprise packages.

    Restricted: You can not + /// specify a payment reference for Faster Payments.

    ///
    [JsonProperty("reference")] public string Reference { get; set; } @@ -392,34 +395,34 @@ public class PaymentListRequest ///
    public class PaymentChargeDate { - - /// - /// Limit to records where the payment was or will be collected from + + /// + /// Limit to records where the payment was or will be collected from /// the customer's bank account after the specified date. - /// - [JsonProperty("gt")] - public string Gt { get; set; } - - /// - /// Limit to records where the payment was or will be collected from + /// + [JsonProperty("gt")] + public string Gt { get; set; } + + /// + /// Limit to records where the payment was or will be collected from /// the customer's bank account on or after the specified date. - /// - [JsonProperty("gte")] - public string Gte { get; set; } - - /// - /// Limit to records where the payment was or will be collected from + /// + [JsonProperty("gte")] + public string Gte { get; set; } + + /// + /// Limit to records where the payment was or will be collected from /// the customer's bank account before the specified date. - /// - [JsonProperty("lt")] - public string Lt { get; set; } - - /// - /// Limit to records where the payment was or will be collected from + /// + [JsonProperty("lt")] + public string Lt { get; set; } + + /// + /// Limit to records where the payment was or will be collected from /// the customer's bank account on or before the specified date. - /// - [JsonProperty("lte")] - public string Lte { get; set; } + /// + [JsonProperty("lte")] + public string Lte { get; set; } } /// diff --git a/GoCardless/Services/PayoutItemService.cs b/GoCardless/Services/PayoutItemService.cs index 3964b79..df4b9e0 100644 --- a/GoCardless/Services/PayoutItemService.cs +++ b/GoCardless/Services/PayoutItemService.cs @@ -54,6 +54,13 @@ public PayoutItemService(GoCardlessClient goCardlessClient) /// Returns a [cursor-paginated](#api-usage-cursor-pagination) list of /// items in the payout. /// + ///
    + /// Note: From 1 March 2023 onwards, we will only + /// serve requests for payout items created in the last 6 months. + /// Requests for older payouts will return an HTTP status 410 + /// Gone. + ///
    + /// ///
    /// An optional `PayoutItemListRequest` representing the query parameters for this list request. /// An optional `RequestSettings` allowing you to configure the request @@ -112,6 +119,12 @@ public IEnumerable>> AllAsync(PayoutItemListReque /// Returns a [cursor-paginated](#api-usage-cursor-pagination) list of items /// in the payout. /// + ///
    + /// Note: From 1 March 2023 onwards, we will only serve + /// requests for payout items created in the last 6 months. Requests for + /// older payouts will return an HTTP status 410 Gone. + ///
    + /// ///
    public class PayoutItemListRequest { diff --git a/GoCardless/Services/PayoutService.cs b/GoCardless/Services/PayoutService.cs index ff175e0..716f3a2 100644 --- a/GoCardless/Services/PayoutService.cs +++ b/GoCardless/Services/PayoutService.cs @@ -254,7 +254,8 @@ public enum PayoutCurrency /// /// 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. + /// names up to 50 characters and values up to 500 characters. _Note:_ + /// This should not be used for storing PII data. /// [JsonProperty("metadata")] public IDictionary Metadata { get; set; } diff --git a/GoCardless/Services/RedirectFlowService.cs b/GoCardless/Services/RedirectFlowService.cs index cc6be23..c17197e 100644 --- a/GoCardless/Services/RedirectFlowService.cs +++ b/GoCardless/Services/RedirectFlowService.cs @@ -157,20 +157,21 @@ public class RedirectFlowCreateRequest : IHasIdempotencyKey /// public class RedirectFlowLinks { - - /// - /// The [creditor](#core-endpoints-creditors) for whom the mandate + + /// + /// The [creditor](#core-endpoints-creditors) for whom the mandate /// will be created. The `name` of the creditor will be displayed on /// the payment page. Required if your account manages multiple /// creditors. - /// - [JsonProperty("creditor")] - public string Creditor { get; set; } + /// + [JsonProperty("creditor")] + public string Creditor { 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. + /// names up to 50 characters and values up to 500 characters. _Note:_ + /// This should not be used for storing PII data. /// [JsonProperty("metadata")] public IDictionary Metadata { get; set; } @@ -191,15 +192,15 @@ public class RedirectFlowLinks /// public class RedirectFlowPrefilledBankAccount { - - /// - /// Bank account type for USD-denominated bank accounts. Must not be + + /// + /// Bank account type for USD-denominated bank accounts. Must not be /// provided for bank accounts in other currencies. See [local /// details](#local-bank-details-united-states) for more /// information. - /// - [JsonProperty("account_type")] - public RedirectFlowAccountType? AccountType { get; set; } + /// + [JsonProperty("account_type")] + public RedirectFlowAccountType? AccountType { get; set; } /// /// Bank account type for USD-denominated bank accounts. Must not be /// provided for bank accounts in other currencies. See [local @@ -234,103 +235,103 @@ public enum RedirectFlowAccountType /// public class RedirectFlowPrefilledCustomer { - - /// - /// The first line of the customer's address. - /// - [JsonProperty("address_line1")] - public string AddressLine1 { get; set; } - - /// - /// The second line of the customer's address. - /// - [JsonProperty("address_line2")] - public string AddressLine2 { get; set; } - - /// - /// The third line of the customer's address. - /// - [JsonProperty("address_line3")] - public string AddressLine3 { get; set; } - - /// - /// The city of the customer's address. - /// - [JsonProperty("city")] - public string City { get; set; } - - /// - /// Customer's company name. Company name should only be provided if + + /// + /// The first line of the customer's address. + /// + [JsonProperty("address_line1")] + public string AddressLine1 { get; set; } + + /// + /// The second line of the customer's address. + /// + [JsonProperty("address_line2")] + public string AddressLine2 { get; set; } + + /// + /// The third line of the customer's address. + /// + [JsonProperty("address_line3")] + public string AddressLine3 { get; set; } + + /// + /// The city of the customer's address. + /// + [JsonProperty("city")] + public string City { get; set; } + + /// + /// Customer's company name. Company name should only be provided if /// `given_name` and `family_name` are null. - /// - [JsonProperty("company_name")] - public string CompanyName { get; set; } - - /// - /// [ISO 3166-1 alpha-2 + /// + [JsonProperty("company_name")] + public string CompanyName { 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; } - - /// - /// For Danish customers only. The civic/company number (CPR or CVR) + /// + [JsonProperty("country_code")] + public string CountryCode { get; set; } + + /// + /// For Danish customers only. The civic/company number (CPR or CVR) /// of the customer. - /// - [JsonProperty("danish_identity_number")] - public string DanishIdentityNumber { get; set; } - - /// - /// Customer's email address. - /// - [JsonProperty("email")] - public string Email { get; set; } - - /// - /// Customer's surname. - /// - [JsonProperty("family_name")] - public string FamilyName { get; set; } - - /// - /// Customer's first name. - /// - [JsonProperty("given_name")] - public string GivenName { get; set; } - - /// - /// [ISO + /// + [JsonProperty("danish_identity_number")] + public string DanishIdentityNumber { get; set; } + + /// + /// Customer's email address. + /// + [JsonProperty("email")] + public string Email { get; set; } + + /// + /// Customer's surname. + /// + [JsonProperty("family_name")] + public string FamilyName { get; set; } + + /// + /// Customer's first name. + /// + [JsonProperty("given_name")] + public string GivenName { get; set; } + + /// + /// [ISO /// 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) /// code. - /// - [JsonProperty("language")] - public string Language { get; set; } - - /// - /// For New Zealand customers only. - /// - [JsonProperty("phone_number")] - public string PhoneNumber { get; set; } - - /// - /// The customer's postal code. - /// - [JsonProperty("postal_code")] - public string PostalCode { get; set; } - - /// - /// The customer's address region, county or department. - /// - [JsonProperty("region")] - public string Region { get; set; } - - /// - /// For Swedish customers only. The civic/company number + /// + [JsonProperty("language")] + public string Language { get; set; } + + /// + /// For New Zealand customers only. + /// + [JsonProperty("phone_number")] + public string PhoneNumber { get; set; } + + /// + /// The customer's postal code. + /// + [JsonProperty("postal_code")] + public string PostalCode { get; set; } + + /// + /// The customer's address region, county or department. + /// + [JsonProperty("region")] + public string Region { get; set; } + + /// + /// For Swedish customers only. The civic/company number /// (personnummer, samordningsnummer, or organisationsnummer) of the /// customer. - /// - [JsonProperty("swedish_identity_number")] - public string SwedishIdentityNumber { get; set; } + /// + [JsonProperty("swedish_identity_number")] + public string SwedishIdentityNumber { get; set; } } /// @@ -370,15 +371,18 @@ public enum RedirectFlowScheme /// `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 "sepa_core" - [EnumMember(Value = "sepa_core")] - SepaCore, /// `scheme` with a value of "pay_to" [EnumMember(Value = "pay_to")] PayTo, + /// `scheme` with a value of "sepa_core" + [EnumMember(Value = "sepa_core")] + SepaCore, } /// diff --git a/GoCardless/Services/RefundService.cs b/GoCardless/Services/RefundService.cs index 0495908..ec0759e 100644 --- a/GoCardless/Services/RefundService.cs +++ b/GoCardless/Services/RefundService.cs @@ -207,23 +207,23 @@ public class RefundCreateRequest : IHasIdempotencyKey /// public class RefundLinks { - - /// - /// ID of the [mandate](#core-endpoints-mandates) against which the + + /// + /// ID of the [mandate](#core-endpoints-mandates) against which the /// refund is being made.

    Restricted: You must /// request access to Mandate Refunds by contacting our support team.

    - ///
    - [JsonProperty("mandate")] - public string Mandate { get; set; } - - /// - /// ID of the [payment](#core-endpoints-payments) against which the + /// + [JsonProperty("mandate")] + public string Mandate { get; set; } + + /// + /// ID of the [payment](#core-endpoints-payments) against which the /// refund is being made. - /// - [JsonProperty("payment")] - public string Payment { get; set; } + ///
    + [JsonProperty("payment")] + public string Payment { get; set; } } /// @@ -241,6 +241,7 @@ public class RefundLinks /// Bacs - 10 characters
    BECS - /// 30 characters
    BECS NZ - 12 characters
    /// Betalingsservice - 30 characters
    + /// Faster Payments - 18 characters
    /// PAD - scheme doesn't offer references
    /// PayTo - 18 characters
    SEPA - /// 140 characters
    Note that this reference must be unique (for @@ -249,7 +250,9 @@ public class RefundLinks /// specify a payment reference for Bacs payments (that is, when /// collecting from the UK) if you're on the GoCardless Plus, Pro or - /// Enterprise packages.

    + /// Enterprise packages.

    Restricted: You can not + /// specify a payment reference for Faster Payments.

    ///
    [JsonProperty("reference")] public string Reference { get; set; } diff --git a/GoCardless/Services/ScenarioSimulatorService.cs b/GoCardless/Services/ScenarioSimulatorService.cs index ff54755..81dcb72 100644 --- a/GoCardless/Services/ScenarioSimulatorService.cs +++ b/GoCardless/Services/ScenarioSimulatorService.cs @@ -116,6 +116,9 @@ public ScenarioSimulatorService(GoCardlessClient goCardlessClient) /// Service (CASS) or when a customer contacts GoCardless to change their bank details. It /// must start in the `pending_submission` state. Only compatible with Bacs, SEPA and /// Autogiro mandates. + ///
  • `mandate_suspended_by_payer`: Transitions a mandate to `suspended_by_payer`, as if + /// payer has suspended the mandate after it has been setup successfully. It must start in + /// the `activated` state. Only compatible with PAY_TO mandates.
  • ///
  • `refund_paid`: Transitions a refund to `paid`. It must start in either the /// `pending_submission` or `submitted` state.
  • ///
  • `refund_settled`: Transitions a refund to `paid`, if it's not already, then @@ -174,16 +177,16 @@ public class ScenarioSimulatorRunRequest ///
  • public class ScenarioSimulatorLinks { - - /// - /// ID of the resource to run the simulation against. + + /// + /// ID of the resource to run the simulation against. /// Must be same type of resource as the simulator that is being /// run. /// eg. Payment ID for `payment_failed`, Mandate ID for /// `mandate_activated` etc - /// - [JsonProperty("resource")] - public string Resource { get; set; } + /// + [JsonProperty("resource")] + public string Resource { get; set; } } } diff --git a/GoCardless/Services/SubscriptionService.cs b/GoCardless/Services/SubscriptionService.cs index 92cc49a..5586186 100644 --- a/GoCardless/Services/SubscriptionService.cs +++ b/GoCardless/Services/SubscriptionService.cs @@ -109,7 +109,9 @@ public Task CreateAsync(SubscriptionCreateRequest request /// /// Returns a [cursor-paginated](#api-usage-cursor-pagination) list of - /// your subscriptions. + /// your subscriptions. Please note if the subscriptions are related to + /// customers who have been removed, they will not be shown in the + /// response. /// /// An optional `SubscriptionListRequest` representing the query parameters for this list request. /// An optional `RequestSettings` allowing you to configure the request @@ -455,13 +457,13 @@ public enum SubscriptionIntervalUnit /// public class SubscriptionLinks { - - /// - /// ID of the associated [mandate](#core-endpoints-mandates) which + + /// + /// ID of the associated [mandate](#core-endpoints-mandates) which /// the subscription will create payments against. - /// - [JsonProperty("mandate")] - public string Mandate { get; set; } + /// + [JsonProperty("mandate")] + public string Mandate { get; set; } } /// @@ -580,7 +582,8 @@ public enum SubscriptionMonth /// /// Returns a [cursor-paginated](#api-usage-cursor-pagination) list of your - /// subscriptions. + /// subscriptions. Please note if the subscriptions are related to customers + /// who have been removed, they will not be shown in the response. /// public class SubscriptionListRequest { diff --git a/README.md b/README.md index 8d602f6..42ef564 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.7.0` +`Install-Package GoCardless -Version 5.8.0` ## Usage