Skip to content

Commit

Permalink
Merge pull request #96 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Bump to v5.11.0
  • Loading branch information
KarmanLeung authored Dec 22, 2022
2 parents 6195c02 + 64b6223 commit 8137945
Show file tree
Hide file tree
Showing 7 changed files with 181 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.10.0</PackageVersion>
<PackageVersion>5.11.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.10.0</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/gocardless/gocardless-dotnet/releases/tag/v5.11.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.10.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}";
var userAgentInformation = $" gocardless-dotnet/5.11.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.10.0");
requestMessage.Headers.Add("GoCardless-Client-Version", "5.11.0");
requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet");
requestMessage.Headers.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken);
Expand Down
44 changes: 44 additions & 0 deletions GoCardless/Resources/BillingRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,22 @@ public class BillingRequestLinks
/// </summary>
public class BillingRequestMandateRequest
{
/// <summary>
/// This field is ACH specific, sometimes referred to as [SEC
/// code](https://www.moderntreasury.com/learn/sec-codes).
///
/// This is the way that the payer gives authorisation to the merchant.
/// web: Authorisation is Internet Initiated or via Mobile Entry (maps
/// to SEC code: WEB)
/// telephone: Authorisation is provided orally over telephone (maps
/// to SEC code: TEL)
/// paper: Authorisation is provided in writing and signed, or
/// similarly authenticated (maps to SEC code: PPD)
///
/// </summary>
[JsonProperty("authorisation_source")]
public BillingRequestMandateRequestAuthorisationSource? AuthorisationSource { get; set; }

/// <summary>
/// Constraints that will apply to the mandate_request. (Optional)
/// Specifically for PayTo and VRP.
Expand Down Expand Up @@ -477,6 +493,34 @@ public class BillingRequestMandateRequest
public BillingRequestMandateRequestVerify? Verify { get; set; }
}

/// <summary>
/// This field is ACH specific, sometimes referred to as [SEC
/// code](https://www.moderntreasury.com/learn/sec-codes).
///
/// This is the way that the payer gives authorisation to the merchant.
/// web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB)
/// telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL)
/// paper: Authorisation is provided in writing and signed, or similarly authenticated (maps
/// to SEC code: PPD)
///
/// </summary>
[JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)]
public enum BillingRequestMandateRequestAuthorisationSource {
/// <summary>Unknown status</summary>
[EnumMember(Value = "unknown")]
Unknown = 0,

/// <summary>`authorisation_source` with a value of "web"</summary>
[EnumMember(Value = "web")]
Web,
/// <summary>`authorisation_source` with a value of "telephone"</summary>
[EnumMember(Value = "telephone")]
Telephone,
/// <summary>`authorisation_source` with a value of "paper"</summary>
[EnumMember(Value = "paper")]
Paper,
}

/// <summary>
/// Represents a billing request mandate request constraint resource.
///
Expand Down
44 changes: 44 additions & 0 deletions GoCardless/Resources/Mandate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ namespace GoCardless.Resources
/// </summary>
public class Mandate
{
/// <summary>
/// This field is ACH specific, sometimes referred to as [SEC
/// code](https://www.moderntreasury.com/learn/sec-codes).
///
/// This is the way that the payer gives authorisation to the merchant.
/// web: Authorisation is Internet Initiated or via Mobile Entry (maps
/// to SEC code: WEB)
/// telephone: Authorisation is provided orally over telephone (maps
/// to SEC code: TEL)
/// paper: Authorisation is provided in writing and signed, or
/// similarly authenticated (maps to SEC code: PPD)
///
/// </summary>
[JsonProperty("authorisation_source")]
public MandateAuthorisationSource? AuthorisationSource { get; set; }

/// <summary>
/// (Optional) Payto and VRP Scheme specific information
/// </summary>
Expand Down Expand Up @@ -111,6 +127,34 @@ public class Mandate
public MandateStatus? Status { get; set; }
}

/// <summary>
/// This field is ACH specific, sometimes referred to as [SEC
/// code](https://www.moderntreasury.com/learn/sec-codes).
///
/// This is the way that the payer gives authorisation to the merchant.
/// web: Authorisation is Internet Initiated or via Mobile Entry (maps to SEC code: WEB)
/// telephone: Authorisation is provided orally over telephone (maps to SEC code: TEL)
/// paper: Authorisation is provided in writing and signed, or similarly authenticated (maps
/// to SEC code: PPD)
///
/// </summary>
[JsonConverter(typeof(GcStringEnumConverter), (int)Unknown)]
public enum MandateAuthorisationSource {
/// <summary>Unknown status</summary>
[EnumMember(Value = "unknown")]
Unknown = 0,

/// <summary>`authorisation_source` with a value of "web"</summary>
[EnumMember(Value = "web")]
Web,
/// <summary>`authorisation_source` with a value of "telephone"</summary>
[EnumMember(Value = "telephone")]
Telephone,
/// <summary>`authorisation_source` with a value of "paper"</summary>
[EnumMember(Value = "paper")]
Paper,
}

/// <summary>
/// Represents a mandate consent parameter resource.
///
Expand Down
44 changes: 44 additions & 0 deletions GoCardless/Services/BillingRequestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,50 @@ public class BillingRequestLinks
public class BillingRequestMandateRequest
{

/// <summary>
/// This field is ACH specific, sometimes referred to as [SEC
/// code](https://www.moderntreasury.com/learn/sec-codes).
///
/// This is the way that the payer gives authorisation to the
/// merchant.
/// web: Authorisation is Internet Initiated or via Mobile Entry
/// (maps to SEC code: WEB)
/// telephone: Authorisation is provided orally over telephone
/// (maps to SEC code: TEL)
/// paper: Authorisation is provided in writing and signed, or
/// similarly authenticated (maps to SEC code: PPD)
///
/// </summary>
[JsonProperty("authorisation_source")]
public BillingRequestAuthorisationSource? AuthorisationSource { get; set; }
/// <summary>
/// This field is ACH specific, sometimes referred to as [SEC
/// code](https://www.moderntreasury.com/learn/sec-codes).
///
/// This is the way that the payer gives authorisation to the merchant.
/// web: Authorisation is Internet Initiated or via Mobile Entry (maps
/// to SEC code: WEB)
/// telephone: Authorisation is provided orally over telephone (maps
/// to SEC code: TEL)
/// paper: Authorisation is provided in writing and signed, or
/// similarly authenticated (maps to SEC code: PPD)
///
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum BillingRequestAuthorisationSource
{

/// <summary>`authorisation_source` with a value of "web"</summary>
[EnumMember(Value = "web")]
Web,
/// <summary>`authorisation_source` with a value of "telephone"</summary>
[EnumMember(Value = "telephone")]
Telephone,
/// <summary>`authorisation_source` with a value of "paper"</summary>
[EnumMember(Value = "paper")]
Paper,
}

/// <summary>
/// Constraints that will apply to the mandate_request. (Optional)
/// Specifically for PayTo and VRP.
Expand Down
44 changes: 44 additions & 0 deletions GoCardless/Services/MandateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,50 @@ public Task<MandateResponse> ReinstateAsync(string identity, MandateReinstateReq
public class MandateCreateRequest : IHasIdempotencyKey
{

/// <summary>
/// This field is ACH specific, sometimes referred to as [SEC
/// code](https://www.moderntreasury.com/learn/sec-codes).
///
/// This is the way that the payer gives authorisation to the merchant.
/// web: Authorisation is Internet Initiated or via Mobile Entry (maps
/// to SEC code: WEB)
/// telephone: Authorisation is provided orally over telephone (maps
/// to SEC code: TEL)
/// paper: Authorisation is provided in writing and signed, or
/// similarly authenticated (maps to SEC code: PPD)
///
/// </summary>
[JsonProperty("authorisation_source")]
public MandateAuthorisationSource? AuthorisationSource { get; set; }

/// <summary>
/// This field is ACH specific, sometimes referred to as [SEC
/// code](https://www.moderntreasury.com/learn/sec-codes).
///
/// This is the way that the payer gives authorisation to the merchant.
/// web: Authorisation is Internet Initiated or via Mobile Entry (maps
/// to SEC code: WEB)
/// telephone: Authorisation is provided orally over telephone (maps
/// to SEC code: TEL)
/// paper: Authorisation is provided in writing and signed, or
/// similarly authenticated (maps to SEC code: PPD)
///
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public enum MandateAuthorisationSource
{

/// <summary>`authorisation_source` with a value of "web"</summary>
[EnumMember(Value = "web")]
Web,
/// <summary>`authorisation_source` with a value of "telephone"</summary>
[EnumMember(Value = "telephone")]
Telephone,
/// <summary>`authorisation_source` with a value of "paper"</summary>
[EnumMember(Value = "paper")]
Paper,
}

/// <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.10.0`
`Install-Package GoCardless -Version 5.11.0`


## Usage
Expand Down

0 comments on commit 8137945

Please sign in to comment.