From 1fb37289a1d6f87b3b4ee4323044051aa0ac8ae6 Mon Sep 17 00:00:00 2001
From: "gocardless-ci-robot[bot]"
<123969075+gocardless-ci-robot[bot]@users.noreply.github.com>
Date: Fri, 17 May 2024 15:57:14 +0000
Subject: [PATCH 1/3] Changes generated by
6d326a174ae3a863df23b5bdc4ba2fb9342ba6d8
This commit was automatically created from gocardless/gocardless-dotnet-template@6d326a174ae3a863df23b5bdc4ba2fb9342ba6d8
by the `push-files` action.
Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/9130948561
---
GoCardless/GoCardlessClient.Generated.cs | 5 +++
GoCardless/Resources/Logo.cs | 27 +++++++++++++
GoCardless/Services/LogoService.cs | 49 ++++++++++++++++++++++++
3 files changed, 81 insertions(+)
create mode 100644 GoCardless/Resources/Logo.cs
create mode 100644 GoCardless/Services/LogoService.cs
diff --git a/GoCardless/GoCardlessClient.Generated.cs b/GoCardless/GoCardlessClient.Generated.cs
index 26a5073..f7d6df2 100644
--- a/GoCardless/GoCardlessClient.Generated.cs
+++ b/GoCardless/GoCardlessClient.Generated.cs
@@ -83,6 +83,11 @@ public partial class GoCardlessClient
///
public InstitutionService Institutions => new InstitutionService(this);
+ ///
+ ///A service for working with logo resources.
+ ///
+ public LogoService Logos => new LogoService(this);
+
///
///A service for working with mandate resources.
///
diff --git a/GoCardless/Resources/Logo.cs b/GoCardless/Resources/Logo.cs
new file mode 100644
index 0000000..7ceca3b
--- /dev/null
+++ b/GoCardless/Resources/Logo.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using GoCardless.Internals;
+
+namespace GoCardless.Resources
+{
+
+ ///
+ /// Represents a logo resource.
+ ///
+ /// Logos are image uploads that, when associated with a creditor, are shown
+ /// on the [billing request flow](#billing-requests-billing-request-flows)
+ /// payment pages.
+ ///
+ public class Logo
+ {
+ ///
+ /// Unique identifier, beginning with "LO".
+ ///
+ [JsonProperty("id")]
+ public string Id { get; set; }
+ }
+
+}
diff --git a/GoCardless/Services/LogoService.cs b/GoCardless/Services/LogoService.cs
new file mode 100644
index 0000000..ab74b2c
--- /dev/null
+++ b/GoCardless/Services/LogoService.cs
@@ -0,0 +1,49 @@
+
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Threading;
+using System.Threading.Tasks;
+using GoCardless.Internals;
+using GoCardless.Resources;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace GoCardless.Services
+{
+ ///
+ /// Service class for working with logo resources.
+ ///
+ /// Logos are image uploads that, when associated with a creditor, are shown
+ /// on the [billing request flow](#billing-requests-billing-request-flows)
+ /// payment pages.
+ ///
+
+ public class LogoService
+ {
+ private readonly GoCardlessClient _goCardlessClient;
+
+ ///
+ /// Constructor. Users of this library should not call this. An instance of this
+ /// class can be accessed through an initialised GoCardlessClient.
+ ///
+ public LogoService(GoCardlessClient goCardlessClient)
+ {
+ _goCardlessClient = goCardlessClient;
+ }
+ }
+
+ ///
+ /// An API response for a request returning a single logo.
+ ///
+ public class LogoResponse : ApiResponse
+ {
+ ///
+ /// The logo from the response.
+ ///
+ [JsonProperty("logos")]
+ public Logo Logo { get; private set; }
+ }
+}
From 968fdd178cfa8d3c166be080b23fe7b9b22c4a4c Mon Sep 17 00:00:00 2001
From: "gocardless-ci-robot[bot]"
<123969075+gocardless-ci-robot[bot]@users.noreply.github.com>
Date: Wed, 22 May 2024 12:10:58 +0000
Subject: [PATCH 2/3] Changes generated by
ed40618970111f59597c68ea339488cc1d597940
This commit was automatically created from gocardless/gocardless-dotnet-template@ed40618970111f59597c68ea339488cc1d597940
by the `push-files` action.
Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/9190982671
---
GoCardless/GoCardlessClient.Generated.cs | 5 ++
GoCardless/Resources/PayerTheme.cs | 25 ++++++
GoCardless/Services/LogoService.cs | 31 +++++++
GoCardless/Services/PayerThemeService.cs | 103 +++++++++++++++++++++++
4 files changed, 164 insertions(+)
create mode 100644 GoCardless/Resources/PayerTheme.cs
create mode 100644 GoCardless/Services/PayerThemeService.cs
diff --git a/GoCardless/GoCardlessClient.Generated.cs b/GoCardless/GoCardlessClient.Generated.cs
index f7d6df2..f40abfe 100644
--- a/GoCardless/GoCardlessClient.Generated.cs
+++ b/GoCardless/GoCardlessClient.Generated.cs
@@ -118,6 +118,11 @@ public partial class GoCardlessClient
///
public PayerAuthorisationService PayerAuthorisations => new PayerAuthorisationService(this);
+ ///
+ ///A service for working with payer theme resources.
+ ///
+ public PayerThemeService PayerThemes => new PayerThemeService(this);
+
///
///A service for working with payment resources.
///
diff --git a/GoCardless/Resources/PayerTheme.cs b/GoCardless/Resources/PayerTheme.cs
new file mode 100644
index 0000000..ec4b53b
--- /dev/null
+++ b/GoCardless/Resources/PayerTheme.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.Serialization;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using GoCardless.Internals;
+
+namespace GoCardless.Resources
+{
+
+ ///
+ /// Represents a payer theme resource.
+ ///
+ /// Custom colour themes for payment pages and customer notifications.
+ ///
+ public class PayerTheme
+ {
+ ///
+ /// Unique identifier, beginning with "PTH".
+ ///
+ [JsonProperty("id")]
+ public string Id { get; set; }
+ }
+
+}
diff --git a/GoCardless/Services/LogoService.cs b/GoCardless/Services/LogoService.cs
index ab74b2c..e0fff71 100644
--- a/GoCardless/Services/LogoService.cs
+++ b/GoCardless/Services/LogoService.cs
@@ -33,6 +33,37 @@ public LogoService(GoCardlessClient goCardlessClient)
{
_goCardlessClient = goCardlessClient;
}
+
+ ///
+ /// Creates a new logo associated with a creditor. If a creditor already
+ /// has a logo, this will update the existing logo linked to the
+ /// creditor.
+ ///
+ /// Unique identifier, beginning with "CR".
+ /// An optional `LogoCreateForCreditorRequest` representing the body for this create_for_creditor request.
+ /// An optional `RequestSettings` allowing you to configure the request
+ /// A single logo resource
+ public Task CreateForCreditorAsync(string identity, LogoCreateForCreditorRequest request = null, RequestSettings customiseRequestMessage = null)
+ {
+ request = request ?? new LogoCreateForCreditorRequest();
+ if (identity == null) throw new ArgumentException(nameof(identity));
+
+ var urlParams = new List>
+ {
+ new KeyValuePair("identity", identity),
+ };
+
+ return _goCardlessClient.ExecuteAsync("POST", "/creditors/:identity/branding/logos", urlParams, request, null, "logos", customiseRequestMessage);
+ }
+ }
+
+
+ ///
+ /// Creates a new logo associated with a creditor. If a creditor already has
+ /// a logo, this will update the existing logo linked to the creditor.
+ ///
+ public class LogoCreateForCreditorRequest
+ {
}
///
diff --git a/GoCardless/Services/PayerThemeService.cs b/GoCardless/Services/PayerThemeService.cs
new file mode 100644
index 0000000..756e4db
--- /dev/null
+++ b/GoCardless/Services/PayerThemeService.cs
@@ -0,0 +1,103 @@
+
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Threading;
+using System.Threading.Tasks;
+using GoCardless.Internals;
+using GoCardless.Resources;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+
+namespace GoCardless.Services
+{
+ ///
+ /// Service class for working with payer theme resources.
+ ///
+ /// Custom colour themes for payment pages and customer notifications.
+ ///
+
+ public class PayerThemeService
+ {
+ private readonly GoCardlessClient _goCardlessClient;
+
+ ///
+ /// Constructor. Users of this library should not call this. An instance of this
+ /// class can be accessed through an initialised GoCardlessClient.
+ ///
+ public PayerThemeService(GoCardlessClient goCardlessClient)
+ {
+ _goCardlessClient = goCardlessClient;
+ }
+
+ ///
+ /// Creates a new payer theme associated with a creditor. If a creditor
+ /// already has payer themes, this will update the existing payer theme
+ /// linked to the creditor.
+ ///
+ /// Unique identifier, beginning with "CR".
+ /// An optional `PayerThemeCreateForCreditorRequest` representing the body for this create_for_creditor request.
+ /// An optional `RequestSettings` allowing you to configure the request
+ /// A single payer theme resource
+ public Task CreateForCreditorAsync(string identity, PayerThemeCreateForCreditorRequest request = null, RequestSettings customiseRequestMessage = null)
+ {
+ request = request ?? new PayerThemeCreateForCreditorRequest();
+ if (identity == null) throw new ArgumentException(nameof(identity));
+
+ var urlParams = new List>
+ {
+ new KeyValuePair("identity", identity),
+ };
+
+ return _goCardlessClient.ExecuteAsync("POST", "/creditors/:identity/branding/payer_themes", urlParams, request, null, "payer_themes", customiseRequestMessage);
+ }
+ }
+
+
+ ///
+ /// Creates a new payer theme associated with a creditor. If a creditor
+ /// already has payer themes, this will update the existing payer theme
+ /// linked to the creditor.
+ ///
+ public class PayerThemeCreateForCreditorRequest
+ {
+
+ ///
+ /// Colour for buttons background (hexcode)
+ ///
+ [JsonProperty("button_background_colour")]
+ public string ButtonBackgroundColour { get; set; }
+
+ ///
+ /// Colour for content box border (hexcode)
+ ///
+ [JsonProperty("content_box_border_colour")]
+ public string ContentBoxBorderColour { get; set; }
+
+ ///
+ /// Colour for header background (hexcode)
+ ///
+ [JsonProperty("header_background_colour")]
+ public string HeaderBackgroundColour { get; set; }
+
+ ///
+ /// Colour for text links (hexcode)
+ ///
+ [JsonProperty("link_text_colour")]
+ public string LinkTextColour { get; set; }
+ }
+
+ ///
+ /// An API response for a request returning a single payer theme.
+ ///
+ public class PayerThemeResponse : ApiResponse
+ {
+ ///
+ /// The payer theme from the response.
+ ///
+ [JsonProperty("payer_themes")]
+ public PayerTheme PayerTheme { get; private set; }
+ }
+}
From b61e40c43c09ab9dc90addd1b5b8c84190dee207 Mon Sep 17 00:00:00 2001
From: "gocardless-ci-robot[bot]"
<123969075+gocardless-ci-robot[bot]@users.noreply.github.com>
Date: Wed, 22 May 2024 13:03:11 +0000
Subject: [PATCH 3/3] Changes generated by
9029208ed2ac42f477b1151fd2d863cc18725a67
This commit was automatically created from gocardless/gocardless-dotnet-template@9029208ed2ac42f477b1151fd2d863cc18725a67
by the `push-files` action.
Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/9191804776
---
GoCardless/GoCardless.csproj | 4 ++--
GoCardless/GoCardlessClient.cs | 4 ++--
README.md | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/GoCardless/GoCardless.csproj b/GoCardless/GoCardless.csproj
index a6f239c..b8a4812 100644
--- a/GoCardless/GoCardless.csproj
+++ b/GoCardless/GoCardless.csproj
@@ -2,7 +2,7 @@
GoCardless
- 6.0.2
+ 6.1.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/v6.0.2
+ https://github.com/gocardless/gocardless-dotnet/releases/tag/v6.1.0
netstandard1.6;netstandard2.0;netstandard2.1;net46;net8.0
True
true
diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs
index 0d97fc5..fb20eee 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/6.0.2 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}";
+ var userAgentInformation = $" gocardless-dotnet/6.1.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", "6.0.2");
+ requestMessage.Headers.Add("GoCardless-Client-Version", "6.1.0");
requestMessage.Headers.Add("GoCardless-Client-Library", "gocardless-dotnet");
requestMessage.Headers.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _accessToken);
diff --git a/README.md b/README.md
index c256c99..4a81d09 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 6.0.2`
+`Install-Package GoCardless -Version 6.1.0`
## Usage