diff --git a/GoCardless/GoCardless.csproj b/GoCardless/GoCardless.csproj index 3a4ca6c..53f7657 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 4.5.0 + 4.6.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/v4.5.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v4.6.0 netstandard1.6;netstandard2.0;net46 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index 8dc2a14..06cadd1 100644 --- a/GoCardless/GoCardlessClient.cs +++ b/GoCardless/GoCardlessClient.cs @@ -252,9 +252,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/4.5.0"); + requestMessage.Headers.Add("User-Agent", "gocardless-dotnet/4.6.0"); requestMessage.Headers.Add("GoCardless-Version", "2015-07-06"); - requestMessage.Headers.Add("GoCardless-Client-Version", "4.5.0"); + requestMessage.Headers.Add("GoCardless-Client-Version", "4.6.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 28a6ea8..71fb5cc 100644 --- a/GoCardless/Resources/Creditor.cs +++ b/GoCardless/Resources/Creditor.cs @@ -15,9 +15,8 @@ namespace GoCardless.Resources /// your organisation will have a single "creditor", but the API also /// supports collecting payments on behalf of others. /// - /// Please get in touch if you wish to use this endpoint. Currently, for - /// Anti Money Laundering reasons, any creditors you add must be directly - /// related to your organisation. + /// Currently, for Anti Money Laundering reasons, any creditors you add must + /// be directly related to your organisation. /// public class Creditor { diff --git a/GoCardless/Resources/PayerAuthorisation.cs b/GoCardless/Resources/PayerAuthorisation.cs index 534617e..96bc3f7 100644 --- a/GoCardless/Resources/PayerAuthorisation.cs +++ b/GoCardless/Resources/PayerAuthorisation.cs @@ -51,6 +51,9 @@ namespace GoCardless.Resources /// Authorisation is still saved if incomplete data is provided. /// We return the list of incomplete data in the `incomplete_fields` along /// with the resources in the body of the response. + /// The bank account details(account_number, bank_code & branch_code) must + /// be sent together rather than splitting across different request for both + /// `create` and `update` endpoints. ///

/// The API is designed to be flexible and allows you to collect /// information in multiple steps without storing any sensitive data in the @@ -149,6 +152,13 @@ public class PayerAuthorisationBankAccount [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 NZD) - /// see [local details](#local-bank-details-new-zealand) for more diff --git a/GoCardless/Services/CreditorService.cs b/GoCardless/Services/CreditorService.cs index 29b9eb3..fda78de 100644 --- a/GoCardless/Services/CreditorService.cs +++ b/GoCardless/Services/CreditorService.cs @@ -21,9 +21,8 @@ namespace GoCardless.Services /// your organisation will have a single "creditor", but the API also /// supports collecting payments on behalf of others. /// - /// Please get in touch if you wish to use this endpoint. Currently, for - /// Anti Money Laundering reasons, any creditors you add must be directly - /// related to your organisation. + /// Currently, for Anti Money Laundering reasons, any creditors you add must + /// be directly related to your organisation. /// public class CreditorService diff --git a/GoCardless/Services/PayerAuthorisationService.cs b/GoCardless/Services/PayerAuthorisationService.cs index 4878f87..d072026 100644 --- a/GoCardless/Services/PayerAuthorisationService.cs +++ b/GoCardless/Services/PayerAuthorisationService.cs @@ -57,6 +57,9 @@ namespace GoCardless.Services /// Authorisation is still saved if incomplete data is provided. /// We return the list of incomplete data in the `incomplete_fields` along /// with the resources in the body of the response. + /// The bank account details(account_number, bank_code & branch_code) must + /// be sent together rather than splitting across different request for both + /// `create` and `update` endpoints. ///

/// The API is designed to be flexible and allows you to collect /// information in multiple steps without storing any sensitive data in the @@ -122,8 +125,8 @@ public Task CreateAsync(PayerAuthorisationCreateRequ /// /// Updates a Payer Authorisation. Updates the Payer Authorisation with - /// the request data.Can be invoked as many times as needed. Only fields - /// present in the request will be modified. An empty array of + /// the request data. Can be invoked as many times as needed. Only + /// fields present in the request will be modified. An empty array of /// incomplete_fields means that the resource is valid. This endpoint /// has been designed this way so you do not need to save any payer data /// on your servers or the browser while still being able to implement a @@ -151,7 +154,7 @@ public Task UpdateAsync(string identity, PayerAuthor /// /// Submits all the data previously pushed to this PayerAuthorisation - /// for verification.This time, a 200 HTTP status is returned if the + /// for verification. This time, a 200 HTTP status is returned if the /// resource is valid and a 422 error response in case of validation /// errors. After it is successfully submitted, the Payer Authorisation /// can no longer be edited. @@ -184,7 +187,7 @@ public Task SubmitAsync(string identity, PayerAuthor /// acknowledge the end of the setup process. /// They might want to make the payers go through some other steps /// after they go through our flow or make them go through the necessary - /// verification mechanism(upcomming feature). + /// verification mechanism (upcoming feature). ///

///
/// Unique identifier, beginning with "PA". @@ -258,6 +261,13 @@ public class PayerAuthorisationBankAccount [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 /// NZD) - see [local details](#local-bank-details-new-zealand) for @@ -557,14 +567,14 @@ public enum PayerAuthorisationScheme /// /// Updates a Payer Authorisation. Updates the Payer Authorisation with the - /// request data.Can be invoked as many times as needed. Only fields present - /// in the request will be modified. An empty array of incomplete_fields - /// means that the resource is valid. This endpoint has been designed this - /// way so you do not need to save any payer data on your servers or the - /// browser while still being able to implement a progressive solution, such - /// a multi-step form.

Note that in order to update the - /// `metadata` attribute values it must be sent completely as it overrides - /// the previously existing values.

+ /// request data. Can be invoked as many times as needed. Only fields + /// present in the request will be modified. An empty array of + /// incomplete_fields means that the resource is valid. This endpoint has + /// been designed this way so you do not need to save any payer data on your + /// servers or the browser while still being able to implement a progressive + /// solution, such a multi-step form.

Note that in order + /// to update the `metadata` attribute values it must be sent completely as + /// it overrides the previously existing values.

///
public class PayerAuthorisationUpdateRequest { @@ -601,6 +611,13 @@ public class PayerAuthorisationBankAccount [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 /// NZD) - see [local details](#local-bank-details-new-zealand) for @@ -892,9 +909,10 @@ public enum PayerAuthorisationScheme /// /// Submits all the data previously pushed to this PayerAuthorisation for - /// verification.This time, a 200 HTTP status is returned if the resource is - /// valid and a 422 error response in case of validation errors. After it is - /// successfully submitted, the Payer Authorisation can no longer be edited. + /// verification. This time, a 200 HTTP status is returned if the resource + /// is valid and a 422 error response in case of validation errors. After it + /// is successfully submitted, the Payer Authorisation can no longer be + /// edited. /// public class PayerAuthorisationSubmitRequest { @@ -912,7 +930,7 @@ public class PayerAuthorisationSubmitRequest /// acknowledge the end of the setup process. /// They might want to make the payers go through some other steps after /// they go through our flow or make them go through the necessary - /// verification mechanism(upcomming feature). + /// verification mechanism (upcoming feature). ///

///
public class PayerAuthorisationConfirmRequest diff --git a/GoCardless/Services/PayoutItemService.cs b/GoCardless/Services/PayoutItemService.cs index 3694ade..9b56543 100644 --- a/GoCardless/Services/PayoutItemService.cs +++ b/GoCardless/Services/PayoutItemService.cs @@ -128,6 +128,29 @@ public class PayoutItemListRequest [JsonProperty("before")] public string Before { get; set; } + /// + /// Boolean value indicating whether the API should return tax data for + /// the cutover period of April to August 2020. Defaults to false. + /// + [JsonProperty("include_2020_tax_cutover")] + public PayoutItemInclude2020TaxCutover? Include2020TaxCutover { get; set; } + + /// + /// Boolean value indicating whether the API should return tax data for + /// the cutover period of April to August 2020. Defaults to false. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PayoutItemInclude2020TaxCutover + { + + /// `include2020_tax_cutover` with a value of "true" + [EnumMember(Value = "true")] + True, + /// `include2020_tax_cutover` with a value of "false" + [EnumMember(Value = "false")] + False, + } + /// /// Number of records to return. /// diff --git a/README.md b/README.md index 4694709..ae60cd5 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 4.5.0` +`Install-Package GoCardless -Version 4.6.0` ## Usage