From 41aa9f978d657ee08689f0b255ef0f1dce87aaa3 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 11:58:13 +0000 Subject: [PATCH 1/3] Changes generated by 4892b2c12379d81b416e147bd7e67f48099968a2 This commit was automatically created from gocardless/gocardless-dotnet-template@4892b2c12379d81b416e147bd7e67f48099968a2 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/9268823153 --- GoCardless/Services/PayerThemeService.cs | 30 +++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/GoCardless/Services/PayerThemeService.cs b/GoCardless/Services/PayerThemeService.cs index 756e4db..857f68a 100644 --- a/GoCardless/Services/PayerThemeService.cs +++ b/GoCardless/Services/PayerThemeService.cs @@ -36,22 +36,18 @@ public PayerThemeService(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) + public Task CreateForCreditorAsync(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); + return _goCardlessClient.ExecuteAsync("POST", "/branding/payer_themes", urlParams, request, null, "payer_themes", customiseRequestMessage); } } @@ -87,6 +83,24 @@ public class PayerThemeCreateForCreditorRequest /// [JsonProperty("link_text_colour")] public string LinkTextColour { get; set; } + + /// + /// Linked resources. + /// + [JsonProperty("links")] + public PayerThemeLinks Links { get; set; } + /// + /// Linked resources for a PayerTheme. + /// + public class PayerThemeLinks + { + + /// + /// ID of the creditor the payer theme belongs to + /// + [JsonProperty("creditor")] + public string Creditor { get; set; } + } } /// From d93a5362f181104aa74be853b222b2c757188c31 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 12:47:03 +0000 Subject: [PATCH 2/3] Changes generated by bcddd8aaa4e75b2132a8b7d0c96bbca3f9c5e796 This commit was automatically created from gocardless/gocardless-dotnet-template@bcddd8aaa4e75b2132a8b7d0c96bbca3f9c5e796 by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/9269554530 --- GoCardless/Services/LogoService.cs | 36 +++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/GoCardless/Services/LogoService.cs b/GoCardless/Services/LogoService.cs index e0fff71..b19e885 100644 --- a/GoCardless/Services/LogoService.cs +++ b/GoCardless/Services/LogoService.cs @@ -38,22 +38,18 @@ public LogoService(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) + public Task CreateForCreditorAsync(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); + return _goCardlessClient.ExecuteAsync("POST", "/branding/logos", urlParams, request, null, "logos", customiseRequestMessage); } } @@ -64,6 +60,30 @@ public Task CreateForCreditorAsync(string identity, LogoCreateForC /// public class LogoCreateForCreditorRequest { + + /// + /// Base64 encoded string. + /// + [JsonProperty("image")] + public string Image { get; set; } + + /// + /// Linked resources. + /// + [JsonProperty("links")] + public LogoLinks Links { get; set; } + /// + /// Linked resources for a Logo. + /// + public class LogoLinks + { + + /// + /// ID of the creditor the payer theme belongs to + /// + [JsonProperty("creditor")] + public string Creditor { get; set; } + } } /// From 5e930d20fedebdbce4f5c6073a8afe4c80bf3bc4 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 13:43:05 +0000 Subject: [PATCH 3/3] Changes generated by d18fb07aaafbc35fc197b72568b65a3fd57e0dde This commit was automatically created from gocardless/gocardless-dotnet-template@d18fb07aaafbc35fc197b72568b65a3fd57e0dde by the `push-files` action. Workflow run: https://github.com/gocardless/gocardless-dotnet-template/actions/runs/9270472018 --- 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 213350a..9d58c7b 100644 --- a/GoCardless/GoCardless.csproj +++ b/GoCardless/GoCardless.csproj @@ -2,7 +2,7 @@ GoCardless - 6.2.0 + 6.3.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.2.0 + https://github.com/gocardless/gocardless-dotnet/releases/tag/v6.3.0 netstandard1.6;netstandard2.0;netstandard2.1;net46;net8.0 True true diff --git a/GoCardless/GoCardlessClient.cs b/GoCardless/GoCardlessClient.cs index 8afafd4..11886a0 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.2.0 {runtimeFrameworkInformation} {Helpers.CleanupOSDescriptionString(OSRunningOn)}"; + var userAgentInformation = $" gocardless-dotnet/6.3.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.2.0"); + requestMessage.Headers.Add("GoCardless-Client-Version", "6.3.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 3c12664..a082484 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.2.0` +`Install-Package GoCardless -Version 6.3.0` ## Usage