From f54147cef18eb99789f230c61f21f75222659978 Mon Sep 17 00:00:00 2001 From: Paul Edrupt Date: Thu, 27 Feb 2014 16:06:14 +1000 Subject: [PATCH 1/8] Add ContactPerson model Add ContactPersons to Contact model. --- source/XeroApi/Model/Contact.cs | 2 ++ source/XeroApi/Model/ContactPerson.cs | 36 +++++++++++++++++++++++++++ source/XeroApi/XeroApi.csproj | 1 + 3 files changed, 39 insertions(+) create mode 100644 source/XeroApi/Model/ContactPerson.cs diff --git a/source/XeroApi/Model/Contact.cs b/source/XeroApi/Model/Contact.cs index c387b70..8f70750 100644 --- a/source/XeroApi/Model/Contact.cs +++ b/source/XeroApi/Model/Contact.cs @@ -24,6 +24,8 @@ public class Contact : EndpointModelBase public string EmailAddress { get; set; } public string SkypeUserName { get; set; } + + public ContactPersons ContactPersons { get; set; } public string BankAccountDetails { get; set; } diff --git a/source/XeroApi/Model/ContactPerson.cs b/source/XeroApi/Model/ContactPerson.cs new file mode 100644 index 0000000..1d919ce --- /dev/null +++ b/source/XeroApi/Model/ContactPerson.cs @@ -0,0 +1,36 @@ +using System; +using System.Text; + +namespace XeroApi.Model +{ + public class ContactPerson : ModelBase + { + public string FirstName { get; set; } + + public string LastName { get; set; } + + public string EmailAddress { get; set; } + + public bool IncludeInEmails { get; set; } + + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + if (!string.IsNullOrEmpty(FirstName)) + sb.Append(FirstName + Environment.NewLine); + + if (!string.IsNullOrEmpty(LastName)) + sb.Append(LastName + Environment.NewLine); + + if (!string.IsNullOrEmpty(EmailAddress)) + sb.Append(EmailAddress + Environment.NewLine); + + return sb.ToString().TrimEnd(' '); + } + } + + public class ContactPersons : ModelList + { + } +} diff --git a/source/XeroApi/XeroApi.csproj b/source/XeroApi/XeroApi.csproj index c5fbbcd..c92783e 100644 --- a/source/XeroApi/XeroApi.csproj +++ b/source/XeroApi/XeroApi.csproj @@ -70,6 +70,7 @@ + From 8a988b95daa51254abb93aa59b535b6650e564e7 Mon Sep 17 00:00:00 2001 From: Paul Edrupt Date: Thu, 27 Feb 2014 16:09:49 +1000 Subject: [PATCH 2/8] Add ExpectedPaymentDate and PlannedPaymentDate to Invoice model --- source/XeroApi/Model/Invoice.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/XeroApi/Model/Invoice.cs b/source/XeroApi/Model/Invoice.cs index 5432dc7..d8aa09f 100644 --- a/source/XeroApi/Model/Invoice.cs +++ b/source/XeroApi/Model/Invoice.cs @@ -72,6 +72,10 @@ public class Invoice : EndpointModelBase, IAttachmentParent [ReadOnly] public DateTime? FullyPaidOnDate { get; set; } + public DateTime? ExpectedPaymentDate { get; set; } + + public DateTime? PlannedPaymentDate { get; set; } + public override string ToString() { return string.Format("Invoice:{0} Id:{1}", InvoiceNumber, InvoiceID); From cf6141bc5fa32ccae902f7653f5ca08a2b7dd744 Mon Sep 17 00:00:00 2001 From: Paul Edrupt Date: Thu, 27 Feb 2014 16:11:05 +1000 Subject: [PATCH 3/8] Add DiscountRate to LineItem model --- source/XeroApi/Model/LineItem.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/XeroApi/Model/LineItem.cs b/source/XeroApi/Model/LineItem.cs index 6ad8478..e90b453 100644 --- a/source/XeroApi/Model/LineItem.cs +++ b/source/XeroApi/Model/LineItem.cs @@ -22,6 +22,8 @@ public class LineItem : ModelBase public decimal? Quantity { get; set; } + public decimal? DiscountRate { get; set; } + public override string ToString() { return string.Format("LineItem:{0}", Description ?? ItemCode); From 6b206ec1b85c34ac8755fdef459c90a92d128cc7 Mon Sep 17 00:00:00 2001 From: TDaphneB Date: Wed, 26 Mar 2014 09:26:52 +1300 Subject: [PATCH 4/8] Added Code and Reference fields to BatchPayments. Added Code and Reference fields to BatchPayments and added them to the ToString method too. --- source/XeroApi/Model/BatchPayments.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/XeroApi/Model/BatchPayments.cs b/source/XeroApi/Model/BatchPayments.cs index f0f7bca..94a5f3b 100644 --- a/source/XeroApi/Model/BatchPayments.cs +++ b/source/XeroApi/Model/BatchPayments.cs @@ -10,6 +10,8 @@ public class BatchPayments public string BankAccountNumber { get; set; } public string BankAccountName { get; set; } public string Details { get; set; } + public string Code { get; set; } + public string Reference { get; set; } public override string ToString() { @@ -20,7 +22,11 @@ public override string ToString() sb.AppendFormat("Bank Account Name: {0} ", BankAccountName); sb.AppendFormat("Details: {0}", Details); - + + sb.AppendFormat("Code: {0}", Code); + + sb.AppendFormat("Reference: {0}", Reference); + return sb.ToString(); } } From 04f9db9ceb0a8b2a1e037470868f00cd67ae7558 Mon Sep 17 00:00:00 2001 From: Noctis- Date: Mon, 7 Jul 2014 13:31:15 +1000 Subject: [PATCH 5/8] Update PauseTimeTests.cs --- source/XeroApi.Tests/PauseTimeTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/XeroApi.Tests/PauseTimeTests.cs b/source/XeroApi.Tests/PauseTimeTests.cs index 4089d45..4971049 100644 --- a/source/XeroApi.Tests/PauseTimeTests.cs +++ b/source/XeroApi.Tests/PauseTimeTests.cs @@ -18,7 +18,8 @@ public void it_can_pause_time() stopwatch.Stop(); - Assert.AreEqual(1000, stopwatch.ElapsedMilliseconds, 10, "Actual elapsed timespan is not within 50ms of the expected timespan"); + // Time delta was 10ms and exception said 50ms. Fixing delta. + Assert.AreEqual(1000, stopwatch.ElapsedMilliseconds, 50, "Actual elapsed timespan is not within 50ms of the expected timespan"); } } From 3886f109ebbde50f7aaa291a9962f9f4774ede2f Mon Sep 17 00:00:00 2001 From: philals Date: Tue, 25 Aug 2015 09:11:14 +1200 Subject: [PATCH 6/8] Update README.md Remove that image that does not load. Adds message to say library is unsupported and links to new library. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index a8b01df..a76e0aa 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ XeroApi .Net Library ==================== -![Project status](http://stillmaintained.com/XeroAPI/XeroAPI.Net.png) - +This library is unsupported. Please see [https://github.com/XeroAPI/Xero-Net](https://github.com/XeroAPI/Xero-Net) for the updated and supported .Net library. Introduction ------------ From 6791bc4825f043b1f3b6bc2db26e0e32aecf4d80 Mon Sep 17 00:00:00 2001 From: Ronan Quirke Date: Mon, 14 Sep 2015 16:57:21 +1200 Subject: [PATCH 7/8] Increased visibility of no longer supported notice --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a76e0aa..af9607d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ XeroApi .Net Library ==================== +Unsupported - no longer under active development +------------ This library is unsupported. Please see [https://github.com/XeroAPI/Xero-Net](https://github.com/XeroAPI/Xero-Net) for the updated and supported .Net library. Introduction From 3946a195397870b81cb5ce55ad9b20dd9c679658 Mon Sep 17 00:00:00 2001 From: Matthew Mortimer Date: Fri, 9 Nov 2018 14:06:26 +1300 Subject: [PATCH 8/8] Fix bug with Content-Length. Bump => 1.1.0.34 --- source/XeroAPI.Net.nuspec | 8 ++++---- .../OAuth/Consumer/ConsumerResponse.cs | 2 +- .../OAuth/Framework/DateTimeUtility.cs | Bin 1629 -> 1624 bytes .../XeroApi/OAuth/Framework/NonceGenerator.cs | Bin 1588 -> 1583 bytes source/XeroApi/Properties/AssemblyInfo.cs | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/XeroAPI.Net.nuspec b/source/XeroAPI.Net.nuspec index 41ef3c5..b75a0b4 100644 --- a/source/XeroAPI.Net.nuspec +++ b/source/XeroAPI.Net.nuspec @@ -1,16 +1,16 @@ - + XeroAPI.Net - 0.0.0.0 + 1.1.0.34 .Net wrapper library for Xero API XeroAPI https://github.com/XeroAPI/XeroAPI.Net https://secure.gravatar.com/avatar/7fff030fb8040a5157c3fd463858167f.png?s=128 false - .Net wrapper library for Xero API. This library allows you to perform GET/PUT/POST methods against the Xero API without needing to know the internals of xml serialisation, oauth signatures or character encodings. See http://developer.xero.com for more information. - .Net wrapper library for Xero API + Obsolete Xero SDK. See https://github.com/XeroAPI/Xero-NetStandard for the new dotnet standard SDK + Obsolete Xero SDK. See https://github.com/XeroAPI/Xero-NetStandard for the new dotnet standard SDK diff --git a/source/XeroApi/OAuth/Consumer/ConsumerResponse.cs b/source/XeroApi/OAuth/Consumer/ConsumerResponse.cs index 58e13c7..801e5ee 100644 --- a/source/XeroApi/OAuth/Consumer/ConsumerResponse.cs +++ b/source/XeroApi/OAuth/Consumer/ConsumerResponse.cs @@ -57,7 +57,7 @@ public class ConsumerResponse : IConsumerResponse if (webResponse.Headers["Content-Type"] != string.Empty) ContentType = webResponse.Headers["Content-Type"]; - if (webResponse.Headers["Content-Length"] != string.Empty) + if (!string.IsNullOrEmpty(webResponse.Headers["Content-Length"])) ContentLength = int.Parse(webResponse.Headers["Content-Length"]); TimeTaken = timeTaken; diff --git a/source/XeroApi/OAuth/Framework/DateTimeUtility.cs b/source/XeroApi/OAuth/Framework/DateTimeUtility.cs index 6922d5c0376f9d7a0957fbd64b631add60db591c..1d6a8767a0f11e217fbb1feb4b57700da5d6e4b6 100644 GIT binary patch delta 7 Ocmcc1bAx9?1RDSihyvUI delta 13 Ucmcb?bC+jB1RE