From a3714a12979c2dcc213f3935b4b11965be2e7e41 Mon Sep 17 00:00:00 2001 From: Bella Leber-Smeaton Date: Thu, 19 Sep 2024 14:19:17 +1000 Subject: [PATCH] Generate SDK 24.8 --- .gitignore | 1 + MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj | 6 ++++ MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj | 6 ++++ MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj | 6 ++++ .../Version2/PriceLevelDetailTests.cs | 18 +++++++++++ MYOB.API.SDK/SDK.Test/SDK.Test.csproj | 2 ++ .../Services/PriceLevelDetailServiceTests.cs | 16 ++++++++++ MYOB.API.SDK/SDK/ApiConfiguration.cs | 1 + .../Version2/Inventory/PriceLevelDetail.cs | 23 ++++++++++++++ MYOB.API.SDK/SDK/SDK.csproj | 2 ++ .../Inventory/PriceLevelDetailService.cs | 30 +++++++++++++++++++ appveyor.yml | 2 +- 12 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 MYOB.API.SDK/SDK.Test/Contracts/Version2/PriceLevelDetailTests.cs create mode 100644 MYOB.API.SDK/SDK.Test/Services/PriceLevelDetailServiceTests.cs create mode 100644 MYOB.API.SDK/SDK/Contracts/Version2/Inventory/PriceLevelDetail.cs create mode 100644 MYOB.API.SDK/SDK/Services/Version2/Inventory/PriceLevelDetailService.cs diff --git a/.gitignore b/.gitignore index fece0de6..130193a5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ MYOB.API.SDK/**/obj/**/* # IDEs .idea/ +.vs/ \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj b/MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj index 141b9f28..50c8ecf8 100644 --- a/MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj +++ b/MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj @@ -70,6 +70,9 @@ Contracts\Version2\Inventory\InventoryBuild.cs + + Contracts\Version2\Inventory\PriceLevelDetail.cs + Contracts\Version2\Payroll\EmployeePaymentSummary.cs @@ -1061,6 +1064,9 @@ Services\Version2\Inventory\ItemService.cs + + Services\Version2\Inventory\PriceLevelDetailService.cs + Services\Version2\IOperation.cs diff --git a/MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj b/MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj index 266cb801..be753bcf 100644 --- a/MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj +++ b/MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj @@ -93,6 +93,9 @@ Contracts\Version2\Inventory\InventoryBuild.cs + + Contracts\Version2\Inventory\PriceLevelDetail.cs + Contracts\Version2\Payroll\EmployeePaymentSummary.cs @@ -1084,6 +1087,9 @@ Services\Version2\Inventory\ItemService.cs + + Services\Version2\Inventory\PriceLevelDetailService.cs + Services\Version2\IOperation.cs diff --git a/MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj b/MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj index 838b405b..382701bd 100644 --- a/MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj +++ b/MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj @@ -97,6 +97,9 @@ Contracts\Version2\Inventory\InventoryBuild.cs + + Contracts\Version2\Inventory\PriceLevelDetail.cs + Contracts\Version2\Payroll\EmployeePaymentSummary.cs @@ -1088,6 +1091,9 @@ Services\Version2\Inventory\ItemService.cs + + Services\Version2\Inventory\PriceLevelDetailService.cs + Services\Version2\IOperation.cs diff --git a/MYOB.API.SDK/SDK.Test/Contracts/Version2/PriceLevelDetailTests.cs b/MYOB.API.SDK/SDK.Test/Contracts/Version2/PriceLevelDetailTests.cs new file mode 100644 index 00000000..d6381fcc --- /dev/null +++ b/MYOB.API.SDK/SDK.Test/Contracts/Version2/PriceLevelDetailTests.cs @@ -0,0 +1,18 @@ +using MYOB.AccountRight.SDK.Contracts.Version2.Inventory; +using NUnit.Framework; + +namespace SDK.Test.Contracts.Version2 +{ + [TestFixture] + public class PriceLevelDetailTests + { + [Test] + public void PriceLevelDetailIsCreatedWithDefaultValues() + { + var priceLevelDetail = new PriceLevelDetail(); + + Assert.AreEqual(null, priceLevelDetail.Name); + Assert.AreEqual(null, priceLevelDetail.Value); + } + } +} \ No newline at end of file diff --git a/MYOB.API.SDK/SDK.Test/SDK.Test.csproj b/MYOB.API.SDK/SDK.Test/SDK.Test.csproj index c292e7be..3e436f11 100644 --- a/MYOB.API.SDK/SDK.Test/SDK.Test.csproj +++ b/MYOB.API.SDK/SDK.Test/SDK.Test.csproj @@ -117,6 +117,7 @@ + @@ -166,6 +167,7 @@ + diff --git a/MYOB.API.SDK/SDK.Test/Services/PriceLevelDetailServiceTests.cs b/MYOB.API.SDK/SDK.Test/Services/PriceLevelDetailServiceTests.cs new file mode 100644 index 00000000..7175a691 --- /dev/null +++ b/MYOB.API.SDK/SDK.Test/Services/PriceLevelDetailServiceTests.cs @@ -0,0 +1,16 @@ +using System.Globalization; +using MYOB.AccountRight.SDK.Services.Inventory; +using NUnit.Framework; + +namespace SDK.Test.Services +{ + [TestFixture] + public class PriceLevelDetailServiceTests + { + [Test] + public void ServiceHasTheExpectedRoute() + { + Assert.AreEqual("Inventory/PriceLevelDetail", new PriceLevelDetailService(null).Route); + } + } +} \ No newline at end of file diff --git a/MYOB.API.SDK/SDK/ApiConfiguration.cs b/MYOB.API.SDK/SDK/ApiConfiguration.cs index 0b1784fb..50d1e56d 100644 --- a/MYOB.API.SDK/SDK/ApiConfiguration.cs +++ b/MYOB.API.SDK/SDK/ApiConfiguration.cs @@ -39,6 +39,7 @@ static ApiConfiguration() /// The redirect uri for the application (OAuth related) /// The AccountRight API endpoint, defaults to 'https://api.myob.com/accountright' /// Should the returned entities have the and fields populated + /// If API Key is different from the Client ID, we can provide it explicitly public ApiConfiguration(string clientId, string clientSecret, string redirectUrl, string apiBaseUrl = "https://api.myob.com/accountright", bool generateUris = true, string apiKey = null) { ApiBaseUrl = apiBaseUrl; diff --git a/MYOB.API.SDK/SDK/Contracts/Version2/Inventory/PriceLevelDetail.cs b/MYOB.API.SDK/SDK/Contracts/Version2/Inventory/PriceLevelDetail.cs new file mode 100644 index 00000000..d440ea83 --- /dev/null +++ b/MYOB.API.SDK/SDK/Contracts/Version2/Inventory/PriceLevelDetail.cs @@ -0,0 +1,23 @@ +namespace MYOB.AccountRight.SDK.Contracts.Version2.Inventory +{ + /// + /// Price level detail + /// + public class PriceLevelDetail + { + /// + /// Name of the Price Level + /// + public string Name { get; set; } + + /// + /// Value of the Price Level + /// + public string Value { get; set; } + + /// + /// row version number + /// + public string RowVersion { get; set; } + } +} \ No newline at end of file diff --git a/MYOB.API.SDK/SDK/SDK.csproj b/MYOB.API.SDK/SDK/SDK.csproj index 62f7d52c..b75055f9 100644 --- a/MYOB.API.SDK/SDK/SDK.csproj +++ b/MYOB.API.SDK/SDK/SDK.csproj @@ -143,6 +143,7 @@ + @@ -407,6 +408,7 @@ + diff --git a/MYOB.API.SDK/SDK/Services/Version2/Inventory/PriceLevelDetailService.cs b/MYOB.API.SDK/SDK/Services/Version2/Inventory/PriceLevelDetailService.cs new file mode 100644 index 00000000..2fd4703f --- /dev/null +++ b/MYOB.API.SDK/SDK/Services/Version2/Inventory/PriceLevelDetailService.cs @@ -0,0 +1,30 @@ +using MYOB.AccountRight.SDK.Communication; +using MYOB.AccountRight.SDK.Contracts.Version2.Inventory; + +namespace MYOB.AccountRight.SDK.Services.Inventory +{ + /// + /// A service that provides access to the resource + /// + public class PriceLevelDetailService: ReadableService + { + /// + /// Initialise a service that can use resources + /// + /// The configuration required to communicate with the API service + /// A custom implementation of the , if one is not supplied a default will be used. + /// An implementation of a service that will store/persist the OAuth tokens required to communicate with the cloud based API at http://api.myob.com/accountright + public PriceLevelDetailService(IApiConfiguration configuration, IWebRequestFactory webRequestFactory = null, IOAuthKeyService keyService = null) + : base(configuration, webRequestFactory, keyService) + { + } + + /// + /// The route to the service (after the company file identifier) + /// + public override string Route + { + get { return "Inventory/PriceLevelDetail"; } + } + } +} diff --git a/appveyor.yml b/appveyor.yml index 03d87cc0..36585c41 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 2024.7.{build} +version: 2024.8.{build} shallow_clone: true assembly_info: patch: true