From 0201ac77447f44e6123b4c22d9d299ee5bc1c248 Mon Sep 17 00:00:00 2001 From: Alexander Zinovev Date: Thu, 5 Sep 2019 11:26:18 +0200 Subject: [PATCH 1/2] 64: Fix typos in Settlements models. --- .../Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs | 2 +- Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs b/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs index 373b751..c43b9c5 100644 --- a/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs +++ b/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs @@ -17,6 +17,6 @@ public class SettlementsGetAllPayoutsResponse /// Pagination information /// [JsonProperty(PropertyName = "pagination")] - public Pagination Paginatinon { get; set; } + public Pagination Pagination { get; set; } } } diff --git a/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs b/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs index 02fe969..33fe7c4 100644 --- a/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs +++ b/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs @@ -11,7 +11,7 @@ public class SettlementsPayoutTotals /// The total amount of commissions, in minor units /// [JsonProperty(PropertyName = "commission_amount")] - public int ComissionAmount { get; set; } + public int CommissionAmount { get; set; } /// /// The total amount of money that has been repaid by the merchant from the debt to Klarna, in minor units /// From 140c02160fa5df33d930eb124152f19fab1d98eb Mon Sep 17 00:00:00 2001 From: Alexander Zinovev Date: Thu, 10 Oct 2019 16:21:56 +0200 Subject: [PATCH 2/2] 64: Keep backward compatibility when fixing typos. --- .../Model/SettlementsGetAllPayoutsResponse.cs | 12 +++++++++++- .../Model/SettlementsPayoutTotals.cs | 9 ++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs b/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs index c43b9c5..d38e3dc 100644 --- a/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs +++ b/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsGetAllPayoutsResponse.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using Newtonsoft.Json; namespace Klarna.Rest.Core.Model @@ -18,5 +19,14 @@ public class SettlementsGetAllPayoutsResponse /// [JsonProperty(PropertyName = "pagination")] public Pagination Pagination { get; set; } + /// + /// Deprecated param + /// + [Obsolete("Paginatinon has a typo in the name and marked as deprecated. Use Pagination instead.")] + public Pagination Paginatinon + { + get => Pagination; + set => Pagination = value; + } } } diff --git a/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs b/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs index 33fe7c4..c18fc38 100644 --- a/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs +++ b/Klarna.Rest/Klarna.Rest.Core/Model/SettlementsPayoutTotals.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using System; +using Newtonsoft.Json; namespace Klarna.Rest.Core.Model { @@ -7,6 +8,12 @@ namespace Klarna.Rest.Core.Model /// public class SettlementsPayoutTotals { + [Obsolete("ComissionAmount has a typo in the name and marked as deprecated. Use CommissionAmount instead.")] + public int ComissionAmount + { + get => CommissionAmount; + set => CommissionAmount = value; + } /// /// The total amount of commissions, in minor units ///