Skip to content

Commit

Permalink
Merge pull request #187 from myob-oss/SDK_22_4
Browse files Browse the repository at this point in the history
Public API SDK for 2022.4
  • Loading branch information
MichaelK120 authored May 11, 2022
2 parents bfc49a3 + c3042b9 commit 77376bb
Show file tree
Hide file tree
Showing 35 changed files with 81 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace MYOB.AccountRight.SDK.Contracts.Version2.Banking
namespace MYOB.AccountRight.SDK.Contracts.Version2.Banking
{
/// <summary>
/// Describes the AttachmentData object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;

namespace MYOB.AccountRight.SDK.Contracts.Version2.Banking
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace MYOB.AccountRight.SDK.Contracts.Version2.Purchase
namespace MYOB.AccountRight.SDK.Contracts.Version2.Purchase
{
/// <summary>
/// Describes the BillAttachmentData object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;

namespace MYOB.AccountRight.SDK.Contracts.Version2.Purchase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;

namespace MYOB.AccountRight.SDK.Contracts.Version2.Purchase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Contracts;
using System.Collections.Generic;
Expand Down Expand Up @@ -217,7 +217,7 @@ public override void Get(CompanyFile cf, Guid uid, ICompanyFileCredentials crede
/// <param name="credentials"></param>
/// <param name="eTag"></param>
/// <returns></returns>
public override SpendMoneyAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null)
public override SpendMoneyAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null)
{
throw new NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts.Version2.Purchase;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts.Version2;
using MYOB.AccountRight.SDK.Contracts.Version2.Purchase;
Expand Down Expand Up @@ -253,7 +253,7 @@ public override void Get(CompanyFile cf, Guid uid, ICompanyFileCredentials crede
/// <param name="credentials"></param>
/// <param name="eTag"></param>
/// <returns></returns>
public override BillAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null)
public override BillAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null)
{
throw new NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts.Version2;
using MYOB.AccountRight.SDK.Contracts.Version2.Purchase;
Expand Down Expand Up @@ -253,7 +253,7 @@ public override void Get(CompanyFile cf, Guid uid, ICompanyFileCredentials crede
/// <param name="credentials"></param>
/// <param name="eTag"></param>
/// <returns></returns>
public override BillAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null)
public override BillAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null)
{
throw new NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts.Version2;
using MYOB.AccountRight.SDK.Contracts.Version2.Purchase;
Expand Down Expand Up @@ -253,7 +253,7 @@ public override void Get(CompanyFile cf, Guid uid, ICompanyFileCredentials crede
/// <param name="credentials"></param>
/// <param name="eTag"></param>
/// <returns></returns>
public override BillAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null)
public override BillAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null)
{
throw new NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts.Version2;
using MYOB.AccountRight.SDK.Contracts.Version2.Purchase;
Expand Down Expand Up @@ -253,7 +253,7 @@ public override void Get(CompanyFile cf, Guid uid, ICompanyFileCredentials crede
/// <param name="credentials"></param>
/// <param name="eTag"></param>
/// <returns></returns>
public override BillAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null)
public override BillAttachmentWrapper Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null)
{
throw new NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Contracts.Version2.Purchase;
using MYOB.AccountRight.SDK.Contracts.Version2.Purchase;
using NUnit.Framework;

namespace SDK.Test.Contracts.Version2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Contracts.Version2.Banking;
using MYOB.AccountRight.SDK.Contracts.Version2.Banking;
using NUnit.Framework;

namespace SDK.Test.Contracts.Version2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Services;
using MYOB.AccountRight.SDK.Services;
using NUnit.Framework;

namespace SDK.Test.Services
Expand Down
2 changes: 1 addition & 1 deletion MYOB.API.SDK/SDK.Test/Services/CustomListServiceTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Services.Company;
using MYOB.AccountRight.SDK.Services.Company;
using NUnit.Framework;

namespace SDK.Test.Services
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Services.Purchase;
using NUnit.Framework;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Services.Purchase;
using NUnit.Framework;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Services.Purchase;
using NUnit.Framework;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Services.Purchase;
using NUnit.Framework;
using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Contracts;
using MYOB.AccountRight.SDK.Services.Banking;
using NUnit.Framework;
using System;
Expand Down
2 changes: 1 addition & 1 deletion MYOB.API.SDK/SDK/Contracts/Subscription.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;

namespace MYOB.AccountRight.SDK.Contracts
{
Expand Down
2 changes: 1 addition & 1 deletion MYOB.API.SDK/SDK/Contracts/Version2/Company/CustomList.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;

namespace MYOB.AccountRight.SDK.Contracts.Version2.Company
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;

namespace MYOB.AccountRight.SDK.Contracts.Version2.Company
{
Expand Down
39 changes: 39 additions & 0 deletions MYOB.API.SDK/SDK/Contracts/Version2/Inventory/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,26 @@ public Item()
/// Uniform resource identifier to retrieve the Item's photo
/// </summary>
public Uri PhotoURI { get; set; }

/// <summary>
/// List of LocationDetails
/// </summary>
public ItemLocationDetail[] LocationDetails { get; set; }

/// <summary>
/// Default Sell Location Link
/// </summary>
public LocationLink DefaultSellLocation { get; set; }

/// <summary>
/// Default Receive Location Link
/// </summary>
public LocationLink DefaultReceiveLocation { get; set; }

/// <summary>
/// Bill Of Material Information
/// </summary>
public BillOfMaterials BillOfMaterials { get; set; }
}

/// <summary>
Expand Down Expand Up @@ -343,4 +351,35 @@ public enum CalculateSalesTaxOn

}

/// <summary>
/// Item information required for Bill Of Materials items
/// </summary>
public class BillOfMaterialsItem
{
/// <summary>
/// Quantity of component items
/// </summary>
public double Quantity { get; set; }

/// <summary>
/// Component item definition
/// </summary>
public ItemLink Item { get; set; }
}

/// <summary>
/// Bill Of Materials data
/// </summary>
public class BillOfMaterials
{
/// <summary>
/// Quantity of built item
/// </summary>
public double Quantity { get; set; }

/// <summary>
/// List of component items
/// </summary>
public BillOfMaterialsItem[] Items { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using MYOB.AccountRight.SDK.Contracts.Version2.GeneralLedger;
using MYOB.AccountRight.SDK.Contracts.Version2.Report.TaxCodeSummary;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace MYOB.AccountRight.SDK.Contracts.Version2.Sale
namespace MYOB.AccountRight.SDK.Contracts.Version2.Sale
{
/// <summary>
/// Quote Status Type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Contracts.Version2.Company;

namespace MYOB.AccountRight.SDK.Services.Company
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public AccountingPropertiesService(IApiConfiguration configuration, IWebRequestF
/// <param name="credentials">The credentials to access the company file</param>
/// <param name="eTag">The <see cref="BaseEntity.ETag" /> from a previously fetched entity</param>
/// <returns></returns>
public override AccountingProperties Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null)
public override AccountingProperties Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null)
{
return base.GetRange(cf, null, credentials, eTag).Items.Maybe(_ => _[0]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public override string Route
/// <param name="credentials">The credentials to access the company file</param>
/// <param name="eTag">The <see cref="BaseEntity.ETag" /> from a previously fetched entity</param>
/// <returns></returns>
public override CategoryRegister Get(Contracts.CompanyFile cf, System.Guid uid, ICompanyFileCredentials credentials, string eTag = null)
public override CategoryRegister Get(Contracts.CompanyFile cf, System.Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null)
{
throw new NotSupportedException();
}
Expand Down
2 changes: 1 addition & 1 deletion MYOB.API.SDK/SDK/Services/Version2/IReadable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public interface IReadable<T> : IReadableRange<T> where T : class
/// <param name="credentials">The credentials to access the company file</param>
/// <param name="eTag">The <see cref="BaseEntity.ETag" /> from a previously fetched entity</param>
/// <returns></returns>
T Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null);
T Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null);

#if ASYNC

Expand Down
5 changes: 1 addition & 4 deletions MYOB.API.SDK/SDK/Services/Version2/Inventory/ItemService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ public ItemService(IApiConfiguration configuration, IWebRequestFactory webReques
/// <summary>
/// The route to the service (after the company file identifier)
/// </summary>
public override string Route
{
get { return "Inventory/Item"; }
}
public override string Route => "Inventory/Item";
}
}
4 changes: 2 additions & 2 deletions MYOB.API.SDK/SDK/Services/Version2/ReadableService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public virtual void Get(CompanyFile cf, Guid uid, ICompanyFileCredentials creden
/// <param name="credentials">The credentials to access the company file</param>
/// <param name="eTag">The <see cref="BaseEntity.ETag" /> from a previously fetched entity</param>
/// <returns></returns>
public virtual T Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null)
public virtual T Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, string eTag = null, string query = null)
{
return MakeApiGetRequestSync<T>(BuildUri(cf, uid), credentials, eTag);
return MakeApiGetRequestSync<T>(BuildUri(cf, uid, query), credentials, eTag);
}

#if ASYNC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Communication;
using MYOB.AccountRight.SDK.Contracts.Version2.Report.BalanceSheetSummary;

namespace MYOB.AccountRight.SDK.Services
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2022.2.{build}
version: 2022.4.{build}
shallow_clone: true
assembly_info:
patch: true
Expand All @@ -25,14 +25,14 @@ artifacts:
deploy:
- provider: NuGet
api_key:
secure: TvAgMkMonXiz+6/39tLFgbwWog1kr10sUCoCjUd/S1ylzqDyttGChbjDGepirhsB
secure: bpVQhiwc92bNODO8fHvMq/S69e1P+8S1ELHcds+9s6YYppchTbgX2FiehNAVJJk8
skip_symbols: true
artifact: Release
on:
branch: release
- provider: NuGet
api_key:
secure: TvAgMkMonXiz+6/39tLFgbwWog1kr10sUCoCjUd/S1ylzqDyttGChbjDGepirhsB
secure: bpVQhiwc92bNODO8fHvMq/S69e1P+8S1ELHcds+9s6YYppchTbgX2FiehNAVJJk8
skip_symbols: true
artifact: Candidate
on:
Expand Down

0 comments on commit 77376bb

Please sign in to comment.