diff --git a/GoCardless/GoCardless.csproj b/GoCardless/GoCardless.csproj index 89f2caf..a541070 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 2.16.0 + 2.17.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/v2.16.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v2.17.0 netstandard1.6;netstandard2.0;net452 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index 8097061..b6fb662 100644 --- a/GoCardless/GoCardlessClient.cs +++ b/GoCardless/GoCardlessClient.cs @@ -229,9 +229,9 @@ private HttpRequestMessage BuildHttpRequestMessage(string method, string path var httpMethod = new HttpMethod(method); var requestMessage = new HttpRequestMessage(httpMethod, new Uri(_baseUrl, path)); - requestMessage.Headers.Add("User-Agent", "gocardless-dotnet/2.16.0"); + requestMessage.Headers.Add("User-Agent", "gocardless-dotnet/2.17.0"); requestMessage.Headers.Add("GoCardless-Version", "2015-07-06"); - requestMessage.Headers.Add("GoCardless-Client-Version", "2.16.0"); + requestMessage.Headers.Add("GoCardless-Client-Version", "2.17.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/Creditor.cs b/GoCardless/Resources/Creditor.cs index 4fc234e..c9b56d7 100644 --- a/GoCardless/Resources/Creditor.cs +++ b/GoCardless/Resources/Creditor.cs @@ -53,9 +53,8 @@ public class Creditor public string City { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. + /// [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; } @@ -67,6 +66,16 @@ public class Creditor [JsonProperty("created_at")] public DateTimeOffset? CreatedAt { get; set; } + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code + /// for the currency in which amounts will be paid out (after foreign + /// exchange). Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" + /// and "USD" are supported. Present only if payouts will be (or were) + /// made via foreign exchange. + /// + [JsonProperty("fx_payout_currency")] + public CreditorFxPayoutCurrency? FxPayoutCurrency { get; set; } + /// /// Unique identifier, beginning with "CR". /// @@ -141,6 +150,41 @@ public class Creditor public CreditorVerificationStatus? VerificationStatus { get; set; } } + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in + /// which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", "DKK", + /// "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be (or + /// were) made via foreign exchange. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum CreditorFxPayoutCurrency { + + /// `fx_payout_currency` with a value of "AUD" + [EnumMember(Value = "AUD")] + AUD, + /// `fx_payout_currency` with a value of "CAD" + [EnumMember(Value = "CAD")] + CAD, + /// `fx_payout_currency` with a value of "DKK" + [EnumMember(Value = "DKK")] + DKK, + /// `fx_payout_currency` with a value of "EUR" + [EnumMember(Value = "EUR")] + EUR, + /// `fx_payout_currency` with a value of "GBP" + [EnumMember(Value = "GBP")] + GBP, + /// `fx_payout_currency` with a value of "NZD" + [EnumMember(Value = "NZD")] + NZD, + /// `fx_payout_currency` with a value of "SEK" + [EnumMember(Value = "SEK")] + SEK, + /// `fx_payout_currency` with a value of "USD" + [EnumMember(Value = "USD")] + USD, + } + /// /// Resources linked to this Creditor /// @@ -239,8 +283,8 @@ public class CreditorSchemeIdentifier public string City { get; set; } /// - /// The support [ISO 3166-1 country - /// code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements). + /// [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; } diff --git a/GoCardless/Resources/CreditorBankAccount.cs b/GoCardless/Resources/CreditorBankAccount.cs index c9a9fa2..ff037fd 100644 --- a/GoCardless/Resources/CreditorBankAccount.cs +++ b/GoCardless/Resources/CreditorBankAccount.cs @@ -56,10 +56,10 @@ public class CreditorBankAccount public string BankName { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. Defaults to the country code of the `iban` if - /// supplied, otherwise is required. + /// [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; } @@ -73,7 +73,8 @@ public class CreditorBankAccount /// /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) - /// currency code, defaults to national currency of `country_code`. + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", + /// "SEK" and "USD" are supported. /// [JsonProperty("currency")] public string Currency { get; set; } diff --git a/GoCardless/Resources/Customer.cs b/GoCardless/Resources/Customer.cs index f31b777..cc8b030 100644 --- a/GoCardless/Resources/Customer.cs +++ b/GoCardless/Resources/Customer.cs @@ -52,9 +52,8 @@ public class Customer public string CompanyName { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. + /// [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; } diff --git a/GoCardless/Resources/CustomerBankAccount.cs b/GoCardless/Resources/CustomerBankAccount.cs index 3cf97d9..14607a8 100644 --- a/GoCardless/Resources/CustomerBankAccount.cs +++ b/GoCardless/Resources/CustomerBankAccount.cs @@ -24,9 +24,9 @@ namespace GoCardless.Resources public class CustomerBankAccount { /// - /// Name of the account holder, as known by the bank. Usually this - /// matches the name of the linked - /// [customer](#core-endpoints-customers). This field will be + /// 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. /// [JsonProperty("account_holder_name")] @@ -53,10 +53,10 @@ public class CustomerBankAccount public string BankName { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. Defaults to the country code of the `iban` if - /// supplied, otherwise is required. + /// [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; } @@ -70,7 +70,8 @@ public class CustomerBankAccount /// /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) - /// currency code, defaults to national currency of `country_code`. + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", + /// "SEK" and "USD" are supported. /// [JsonProperty("currency")] public string Currency { get; set; } diff --git a/GoCardless/Resources/Payment.cs b/GoCardless/Resources/Payment.cs index 2d09877..c6cf0bc 100644 --- a/GoCardless/Resources/Payment.cs +++ b/GoCardless/Resources/Payment.cs @@ -68,6 +68,12 @@ public class Payment [JsonProperty("description")] public string Description { get; set; } + /// + /// + /// + [JsonProperty("fx")] + public PaymentFx Fx { get; set; } + /// /// Unique identifier, beginning with "PM". /// @@ -88,12 +94,15 @@ public class Payment public IDictionary Metadata { get; set; } /// - /// An optional payment reference that will appear on your customer's - /// bank statement. For Bacs payments this can be up to 10 characters, - /// for SEPA payments the limit is 140 characters, for Autogiro payments - /// the limit is 11 characters, for Betalingsservice or BECS payments - /// the limit is 30 characters and for BECS NZ or PAD the limit is 12 - /// characters.

ACH - 10 characters
+ /// Autogiro - 11 characters
+ /// Bacs - 10 characters
BECS - + /// 30 characters
BECS NZ - 12 characters
+ /// Betalingsservice - 30 characters
+ /// PAD - 12 characters
SEPA - + /// 140 characters

Restricted: You can only /// specify a payment reference for Bacs payments (that is, when /// collecting from the UK) if you're on the + /// Estimated rate that will be used in the foreign exchange of the + /// `amount` into the `fx_currency`. + /// This will vary based on the prevailing market rate until the moment + /// that it is paid out. + /// Present only before a resource is paid out. + ///

+ [JsonProperty("estimated_exchange_rate")] + public decimal? EstimatedExchangeRate { get; set; } + + /// + /// Rate used in the foreign exchange of the `amount` into the + /// `fx_currency`. + /// Present only after a resource is paid out. + /// + [JsonProperty("exchange_rate")] + public decimal? ExchangeRate { get; set; } + + /// + /// Amount that was paid out in the `fx_currency` after foreign + /// exchange. + /// Present only after the resource has been paid out. + /// + [JsonProperty("fx_amount")] + public int? FxAmount { get; set; } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code + /// for the currency in which amounts will be paid out (after foreign + /// exchange). Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" + /// and "USD" are supported. Present only if payouts will be (or were) + /// made via foreign exchange. + /// + [JsonProperty("fx_currency")] + public PaymentFxFxCurrency? FxCurrency { get; set; } + } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in + /// which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", "DKK", + /// "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be (or + /// were) made via foreign exchange. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PaymentFxFxCurrency { + + /// `fx_currency` with a value of "AUD" + [EnumMember(Value = "AUD")] + AUD, + /// `fx_currency` with a value of "CAD" + [EnumMember(Value = "CAD")] + CAD, + /// `fx_currency` with a value of "DKK" + [EnumMember(Value = "DKK")] + DKK, + /// `fx_currency` with a value of "EUR" + [EnumMember(Value = "EUR")] + EUR, + /// `fx_currency` with a value of "GBP" + [EnumMember(Value = "GBP")] + GBP, + /// `fx_currency` with a value of "NZD" + [EnumMember(Value = "NZD")] + NZD, + /// `fx_currency` with a value of "SEK" + [EnumMember(Value = "SEK")] + SEK, + /// `fx_currency` with a value of "USD" + [EnumMember(Value = "USD")] + USD, + } + /// /// Resources linked to this Payment /// diff --git a/GoCardless/Resources/Payout.cs b/GoCardless/Resources/Payout.cs index 528ed81..aff3249 100644 --- a/GoCardless/Resources/Payout.cs +++ b/GoCardless/Resources/Payout.cs @@ -19,7 +19,7 @@ namespace GoCardless.Resources public class Payout { /// - /// Amount in pence or cents. + /// Amount in minor unit (e.g. pence in GBP, cents in EUR). /// [JsonProperty("amount")] public int? Amount { get; set; } @@ -54,8 +54,8 @@ public class Payout public PayoutCurrency? Currency { get; set; } /// - /// Fees that have already been deducted from the payout amount in pence - /// or cents. + /// Fees that have already been deducted from the payout amount in minor + /// unit (e.g. pence in GBP, cents in EUR). /// /// For each `late_failure_settled` or `chargeback_settled` action, we /// refund the transaction fees in a payout. This means that a payout @@ -68,6 +68,12 @@ public class Payout [JsonProperty("deducted_fees")] public int? DeductedFees { get; set; } + /// + /// + /// + [JsonProperty("fx")] + public PayoutFx Fx { get; set; } + /// /// Unique identifier, beginning with "PO". /// @@ -137,6 +143,80 @@ public enum PayoutCurrency { USD, } + public class PayoutFx + { + /// + /// Estimated rate that will be used in the foreign exchange of the + /// `amount` into the `fx_currency`. + /// This will vary based on the prevailing market rate until the moment + /// that it is paid out. + /// Present only before a resource is paid out. + /// + [JsonProperty("estimated_exchange_rate")] + public decimal? EstimatedExchangeRate { get; set; } + + /// + /// Rate used in the foreign exchange of the `amount` into the + /// `fx_currency`. + /// Present only after a resource is paid out. + /// + [JsonProperty("exchange_rate")] + public decimal? ExchangeRate { get; set; } + + /// + /// Amount that was paid out in the `fx_currency` after foreign + /// exchange. + /// Present only after the resource has been paid out. + /// + [JsonProperty("fx_amount")] + public int? FxAmount { get; set; } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code + /// for the currency in which amounts will be paid out (after foreign + /// exchange). Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" + /// and "USD" are supported. Present only if payouts will be (or were) + /// made via foreign exchange. + /// + [JsonProperty("fx_currency")] + public PayoutFxFxCurrency? FxCurrency { get; set; } + } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in + /// which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", "DKK", + /// "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be (or + /// were) made via foreign exchange. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PayoutFxFxCurrency { + + /// `fx_currency` with a value of "AUD" + [EnumMember(Value = "AUD")] + AUD, + /// `fx_currency` with a value of "CAD" + [EnumMember(Value = "CAD")] + CAD, + /// `fx_currency` with a value of "DKK" + [EnumMember(Value = "DKK")] + DKK, + /// `fx_currency` with a value of "EUR" + [EnumMember(Value = "EUR")] + EUR, + /// `fx_currency` with a value of "GBP" + [EnumMember(Value = "GBP")] + GBP, + /// `fx_currency` with a value of "NZD" + [EnumMember(Value = "NZD")] + NZD, + /// `fx_currency` with a value of "SEK" + [EnumMember(Value = "SEK")] + SEK, + /// `fx_currency` with a value of "USD" + [EnumMember(Value = "USD")] + USD, + } + /// /// Resources linked to this Payout /// diff --git a/GoCardless/Resources/Refund.cs b/GoCardless/Resources/Refund.cs index 859864a..ac71454 100644 --- a/GoCardless/Resources/Refund.cs +++ b/GoCardless/Resources/Refund.cs @@ -21,7 +21,7 @@ namespace GoCardless.Resources public class Refund { /// - /// Amount in pence/cents/öre. + /// Amount in minor unit (e.g. pence in GBP, cents in EUR). /// [JsonProperty("amount")] public int? Amount { get; set; } @@ -41,6 +41,12 @@ public class Refund [JsonProperty("currency")] public string Currency { get; set; } + /// + /// + /// + [JsonProperty("fx")] + public RefundFx Fx { get; set; } + /// /// Unique identifier, beginning with "RF". /// @@ -61,15 +67,99 @@ public class Refund public IDictionary Metadata { get; set; } /// - /// An optional refund reference, displayed on your customer's bank - /// statement. This can be up to 18 characters long for Bacs or BECS - /// payments, 140 characters for SEPA payments, or 25 characters for - /// Autogiro payments. + /// An optional reference that will appear on your customer's bank + /// statement. The character limit for this reference is dependent on + /// the scheme.
ACH - 10 characters
+ /// Autogiro - 11 characters
+ /// Bacs - 10 characters
BECS - + /// 30 characters
BECS NZ - 12 characters
+ /// Betalingsservice - 30 characters
+ /// PAD - 12 characters
SEPA - + /// 140 characters

Restricted: You can only + /// specify a payment reference for Bacs payments (that is, when + /// collecting from the UK) if you're on the GoCardless Plus or Pro + /// packages.

///
[JsonProperty("reference")] public string Reference { get; set; } } + public class RefundFx + { + /// + /// Estimated rate that will be used in the foreign exchange of the + /// `amount` into the `fx_currency`. + /// This will vary based on the prevailing market rate until the moment + /// that it is paid out. + /// Present only before a resource is paid out. + /// + [JsonProperty("estimated_exchange_rate")] + public decimal? EstimatedExchangeRate { get; set; } + + /// + /// Rate used in the foreign exchange of the `amount` into the + /// `fx_currency`. + /// Present only after a resource is paid out. + /// + [JsonProperty("exchange_rate")] + public decimal? ExchangeRate { get; set; } + + /// + /// Amount that was paid out in the `fx_currency` after foreign + /// exchange. + /// Present only after the resource has been paid out. + /// + [JsonProperty("fx_amount")] + public int? FxAmount { get; set; } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code + /// for the currency in which amounts will be paid out (after foreign + /// exchange). Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", "SEK" + /// and "USD" are supported. Present only if payouts will be (or were) + /// made via foreign exchange. + /// + [JsonProperty("fx_currency")] + public RefundFxFxCurrency? FxCurrency { get; set; } + } + + /// + /// [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) code for the currency in + /// which amounts will be paid out (after foreign exchange). Currently "AUD", "CAD", "DKK", + /// "EUR", "GBP", "NZD", "SEK" and "USD" are supported. Present only if payouts will be (or + /// were) made via foreign exchange. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RefundFxFxCurrency { + + /// `fx_currency` with a value of "AUD" + [EnumMember(Value = "AUD")] + AUD, + /// `fx_currency` with a value of "CAD" + [EnumMember(Value = "CAD")] + CAD, + /// `fx_currency` with a value of "DKK" + [EnumMember(Value = "DKK")] + DKK, + /// `fx_currency` with a value of "EUR" + [EnumMember(Value = "EUR")] + EUR, + /// `fx_currency` with a value of "GBP" + [EnumMember(Value = "GBP")] + GBP, + /// `fx_currency` with a value of "NZD" + [EnumMember(Value = "NZD")] + NZD, + /// `fx_currency` with a value of "SEK" + [EnumMember(Value = "SEK")] + SEK, + /// `fx_currency` with a value of "USD" + [EnumMember(Value = "USD")] + USD, + } + /// /// Resources linked to this Refund /// diff --git a/GoCardless/Resources/Subscription.cs b/GoCardless/Resources/Subscription.cs index 282cc1a..e56880f 100644 --- a/GoCardless/Resources/Subscription.cs +++ b/GoCardless/Resources/Subscription.cs @@ -152,6 +152,9 @@ public class Subscription /// /// Name of the month on which to charge a customer. Must be lowercase. + /// Only applies + /// when the interval_unit is `yearly`. + /// /// [JsonProperty("month")] public SubscriptionMonth? Month { get; set; } @@ -203,8 +206,7 @@ public class Subscription public string Status { get; set; } /// - /// Up to 10 upcoming payments with the amount, in pence, and charge - /// date for each. + /// Up to 10 upcoming payments with their amounts and charge dates. /// [JsonProperty("upcoming_payments")] public List UpcomingPayments { get; set; } @@ -241,7 +243,9 @@ public class SubscriptionLinks } /// - /// Name of the month on which to charge a customer. Must be lowercase. + /// Name of the month on which to charge a customer. Must be lowercase. Only applies + /// when the interval_unit is `yearly`. + /// /// [JsonConverter(typeof(StringEnumConverter))] public enum SubscriptionMonth { @@ -317,13 +321,13 @@ public enum SubscriptionStatus { } /// - /// Up to 10 upcoming payments with the amount, in pence, and charge date - /// for each. + /// Up to 10 upcoming payments with their amounts and charge dates. /// public class SubscriptionUpcomingPayment { /// - /// The amount of this payment, in pence. + /// The amount of this payment, in minor unit (e.g. pence in GBP, cents + /// in EUR). /// [JsonProperty("amount")] public int? Amount { get; set; } diff --git a/GoCardless/Services/CreditorBankAccountService.cs b/GoCardless/Services/CreditorBankAccountService.cs index 42229e8..ba693f2 100644 --- a/GoCardless/Services/CreditorBankAccountService.cs +++ b/GoCardless/Services/CreditorBankAccountService.cs @@ -227,17 +227,18 @@ public enum CreditorBankAccountAccountType public string BranchCode { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. Defaults to the country code of the `iban` if - /// supplied, otherwise is required. + /// [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) - /// currency code, defaults to national currency of `country_code`. + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", + /// "SEK" and "USD" are supported. /// [JsonProperty("currency")] public string Currency { get; set; } diff --git a/GoCardless/Services/CreditorService.cs b/GoCardless/Services/CreditorService.cs index 79332ae..16c6852 100644 --- a/GoCardless/Services/CreditorService.cs +++ b/GoCardless/Services/CreditorService.cs @@ -184,9 +184,8 @@ public class CreditorCreateRequest : IHasIdempotencyKey public string City { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. + /// [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; } @@ -328,9 +327,8 @@ public class CreditorUpdateRequest public string City { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. + /// [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; } diff --git a/GoCardless/Services/CustomerBankAccountService.cs b/GoCardless/Services/CustomerBankAccountService.cs index d022a91..65f6317 100644 --- a/GoCardless/Services/CustomerBankAccountService.cs +++ b/GoCardless/Services/CustomerBankAccountService.cs @@ -213,9 +213,9 @@ public class CustomerBankAccountCreateRequest : IHasIdempotencyKey { /// - /// Name of the account holder, as known by the bank. Usually this - /// matches the name of the linked - /// [customer](#core-endpoints-customers). This field will be + /// 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. /// [JsonProperty("account_holder_name")] @@ -256,7 +256,7 @@ public enum CustomerBankAccountAccountType /// /// Bank code - see [local details](#appendix-local-bank-details) for - /// more information. Alternatively you can provide an `iban`. + /// more information. Alternatively you can provide an `iban`. /// [JsonProperty("bank_code")] public string BankCode { get; set; } @@ -269,17 +269,18 @@ public enum CustomerBankAccountAccountType public string BranchCode { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. Defaults to the country code of the `iban` if - /// supplied, otherwise is required. + /// [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) - /// currency code, defaults to national currency of `country_code`. + /// currency code. Currently "AUD", "CAD", "DKK", "EUR", "GBP", "NZD", + /// "SEK" and "USD" are supported. /// [JsonProperty("currency")] public string Currency { get; set; } diff --git a/GoCardless/Services/CustomerService.cs b/GoCardless/Services/CustomerService.cs index 902bfb9..f76ac2a 100644 --- a/GoCardless/Services/CustomerService.cs +++ b/GoCardless/Services/CustomerService.cs @@ -218,9 +218,8 @@ public class CustomerCreateRequest : IHasIdempotencyKey public string CompanyName { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. + /// [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; } @@ -425,9 +424,8 @@ public class CustomerUpdateRequest public string CompanyName { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. + /// [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; } diff --git a/GoCardless/Services/MandateImportEntryService.cs b/GoCardless/Services/MandateImportEntryService.cs index 1649c4c..f3ed332 100644 --- a/GoCardless/Services/MandateImportEntryService.cs +++ b/GoCardless/Services/MandateImportEntryService.cs @@ -205,8 +205,8 @@ public class MandateImportEntryBankAccount /// /// Name of the account holder, as known by the bank. Usually this - /// matches the name of the linked - /// [customer](#core-endpoints-customers). This field will be + /// 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. /// [JsonProperty("account_holder_name")] @@ -222,7 +222,7 @@ public class MandateImportEntryBankAccount /// /// Bank code - see [local details](#appendix-local-bank-details) - /// for more information. Alternatively you can provide an `iban`. + /// for more information. Alternatively you can provide an `iban`. /// [JsonProperty("bank_code")] public string BankCode { get; set; } @@ -235,10 +235,10 @@ public class MandateImportEntryBankAccount public string BranchCode { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. Defaults to the country code of the `iban` if - /// supplied, otherwise is required. + /// [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; } @@ -299,9 +299,8 @@ public class MandateImportEntryCustomer public string CompanyName { get; set; } /// - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. + /// [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; } diff --git a/GoCardless/Services/PaymentService.cs b/GoCardless/Services/PaymentService.cs index 673f421..4f86d3a 100644 --- a/GoCardless/Services/PaymentService.cs +++ b/GoCardless/Services/PaymentService.cs @@ -329,12 +329,15 @@ public class PaymentLinks public IDictionary Metadata { get; set; } /// - /// An optional payment reference that will appear on your customer's - /// bank statement. For Bacs payments this can be up to 10 characters, - /// for SEPA payments the limit is 140 characters, for Autogiro payments - /// the limit is 11 characters, for Betalingsservice or BECS payments - /// the limit is 30 characters and for BECS NZ or PAD the limit is 12 - /// characters.

ACH - 10 characters
+ /// Autogiro - 11 characters
+ /// Bacs - 10 characters
BECS - + /// 30 characters
BECS NZ - 12 characters
+ /// Betalingsservice - 30 characters
+ /// PAD - 12 characters
SEPA - + /// 140 characters

Restricted: You can only /// specify a payment reference for Bacs payments (that is, when /// collecting from the UK) if you're on the - /// [ISO - /// 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - /// alpha-2 code. + /// [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; } diff --git a/GoCardless/Services/RefundService.cs b/GoCardless/Services/RefundService.cs index 65281cc..cfc4080 100644 --- a/GoCardless/Services/RefundService.cs +++ b/GoCardless/Services/RefundService.cs @@ -182,7 +182,7 @@ public class RefundCreateRequest : IHasIdempotencyKey { /// - /// Amount in pence/cents/öre. + /// Amount in minor unit (e.g. pence in GBP, cents in EUR). /// [JsonProperty("amount")] public int? Amount { get; set; } @@ -222,20 +222,30 @@ public class RefundLinks public IDictionary Metadata { get; set; } /// - /// An optional refund reference, displayed on your customer's bank - /// statement. This can be up to 18 characters long for Bacs or BECS - /// payments, 140 characters for SEPA payments, or 25 characters for - /// Autogiro payments. + /// An optional reference that will appear on your customer's bank + /// statement. The character limit for this reference is dependent on + /// the scheme.
ACH - 10 characters
+ /// Autogiro - 11 characters
+ /// Bacs - 10 characters
BECS - + /// 30 characters
BECS NZ - 12 characters
+ /// Betalingsservice - 30 characters
+ /// PAD - 12 characters
SEPA - + /// 140 characters

Restricted: You can only + /// specify a payment reference for Bacs payments (that is, when + /// collecting from the UK) if you're on the GoCardless Plus or Pro + /// packages.

///
[JsonProperty("reference")] public string Reference { get; set; } /// - /// Total expected refunded amount in pence/cents/öre. If there are - /// other - /// partial refunds against this payment, this value should be the sum - /// of the existing - /// refunds plus the amount of the refund being created. + /// Total expected refunded amount in minor unit (e.g. pence/cents/öre). + /// If there are + /// other partial refunds against this payment, this value should be the + /// sum of the + /// existing refunds plus the amount of the refund being created. /// /// Must be supplied if `links[payment]` is present. /// diff --git a/GoCardless/Services/SubscriptionService.cs b/GoCardless/Services/SubscriptionService.cs index 8a6bcaf..b3591dc 100644 --- a/GoCardless/Services/SubscriptionService.cs +++ b/GoCardless/Services/SubscriptionService.cs @@ -366,12 +366,18 @@ public class SubscriptionLinks /// /// Name of the month on which to charge a customer. Must be lowercase. + /// Only applies + /// when the interval_unit is `yearly`. + /// /// [JsonProperty("month")] public SubscriptionMonth? Month { get; set; } /// /// Name of the month on which to charge a customer. Must be lowercase. + /// Only applies + /// when the interval_unit is `yearly`. + /// /// [JsonConverter(typeof(StringEnumConverter))] public enum SubscriptionMonth diff --git a/README.md b/README.md index 3641e6a..c4bad61 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 2.16.0` +`Install-Package GoCardless -Version 2.17.0` ## Usage