Skip to content

Commit

Permalink
Merge pull request #110 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Template changes
  • Loading branch information
barrucadu authored Jan 10, 2024
2 parents 4e875ec + ab59ccf commit ad0c880
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 5 deletions.
4 changes: 2 additions & 2 deletions GoCardless/GoCardless.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageId>GoCardless</PackageId>
<PackageVersion>5.19.0</PackageVersion>
<PackageVersion>5.20.0</PackageVersion>
<Authors>GoCardless Ltd</Authors>
<Description>Client for the GoCardless API - a powerful, simple solution for the collection of recurring bank-to-bank payments</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand All @@ -11,7 +11,7 @@
<Copyright>GoCardless Ltd</Copyright>
<PackageTags>gocardless payments rest api direct debit</PackageTags>
<PackageLicenseUrl>https://github.com/gocardless/gocardless-dotnet/blob/master/LICENSE.txt</PackageLicenseUrl>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v5.19.0</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v5.20.0</PackageReleaseNotes>
<TargetFrameworks>netstandard1.6;netstandard2.0;net46</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
4 changes: 2 additions & 2 deletions GoCardless/GoCardlessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,11 @@ private HttpRequestMessage BuildHttpRequestMessage<T>(string method, string path
runtimeFrameworkInformation = System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion();
#endif

var userAgentInformation = $" gocardless-dotnet/5.19.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}";
var userAgentInformation = $" gocardless-dotnet/5.20.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.19.0");
requestMessage.Headers.Add("GoCardless-Client-Version", "5.20.0");
requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet");
requestMessage.Headers.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken);
Expand Down
12 changes: 12 additions & 0 deletions GoCardless/Resources/Mandate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ public class Mandate
[JsonProperty("next_possible_charge_date")]
public string NextPossibleChargeDate { get; set; }

/// <summary>
/// If this is an an ACH mandate, the earliest date that can be used as
/// a
/// `charge_date` on any newly created payment to be charged through
/// standard
/// ACH, rather than Faster ACH. This value will change over time.
///
/// It is only present in the API response for ACH mandates.
/// </summary>
[JsonProperty("next_possible_standard_ach_charge_date")]
public string NextPossibleStandardAchChargeDate { get; set; }

/// <summary>
/// Boolean value showing whether payments and subscriptions under this
/// mandate require approval via an automated email before being
Expand Down
10 changes: 10 additions & 0 deletions GoCardless/Resources/Payment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ public class Payment
[JsonProperty("description")]
public string Description { get; set; }

/// <summary>
/// This field indicates whether the ACH payment is processed through
/// Faster
/// ACH or standard ACH.
///
/// It is only present in the API response for ACH payments.
/// </summary>
[JsonProperty("faster_ach")]
public bool? FasterAch { get; set; }

/// <summary>
///
/// </summary>
Expand Down
18 changes: 18 additions & 0 deletions GoCardless/Services/BankDetailsLookupService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public BankDetailsLookupService(GoCardlessClient goCardlessClient)
/// check and
/// reachability check are performed.
///
/// In case an account holder name is provided (and an account number, a
/// sort code or an iban
/// are already present) an account holder name verification will also
/// be performed.
///
/// If your request returns an [error](#api-usage-errors) or the
/// `available_debit_schemes`
/// attribute is an empty array, you will not be able to collect
Expand Down Expand Up @@ -83,6 +88,11 @@ public Task<BankDetailsLookupResponse> CreateAsync(BankDetailsLookupCreateReques
/// and
/// reachability check are performed.
///
/// In case an account holder name is provided (and an account number, a
/// sort code or an iban
/// are already present) an account holder name verification will also be
/// performed.
///
/// If your request returns an [error](#api-usage-errors) or the
/// `available_debit_schemes`
/// attribute is an empty array, you will not be able to collect payments
Expand Down Expand Up @@ -111,6 +121,14 @@ public Task<BankDetailsLookupResponse> CreateAsync(BankDetailsLookupCreateReques
public class BankDetailsLookupCreateRequest
{

/// <summary>
/// The account holder name associated with the account number (if
/// available). If provided and the country code is GB, a payer name
/// verification will be performed.
/// </summary>
[JsonProperty("account_holder_name")]
public string AccountHolderName { get; set; }

/// <summary>
/// Bank account number - see [local
/// details](#appendix-local-bank-details) for more information.
Expand Down
11 changes: 11 additions & 0 deletions GoCardless/Services/PaymentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,17 @@ public enum PaymentCurrency
[JsonProperty("description")]
public string Description { get; set; }

/// <summary>
/// Set this to true or false in the request to create an ACH payment to
/// explicitly choose whether the payment should be processed through
/// Faster
/// ACH or standard ACH, rather than relying on the presence or absence
/// of the
/// charge date to indicate that.
/// </summary>
[JsonProperty("faster_ach")]
public bool? FasterAch { get; set; }

/// <summary>
/// Linked resources.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.19.0`
`Install-Package GoCardless -Version 5.20.0`


## Usage
Expand Down

0 comments on commit ad0c880

Please sign in to comment.