Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate SDK version 245 #273

Merged
merged 7 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions MYOB.API.SDK/SDK.Test/Communication/ApiRequestHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ private static void AssertStandardHeaders(bool supplyCredentials, bool supplyOAu

Assert.IsTrue(request.Headers[HttpRequestHeader.AcceptEncoding].Split(new[] {','}).Contains("gzip"));

Assert.AreEqual("<<clientid>>", request.Headers["x-myobapi-key"]);
Assert.AreEqual("v2", request.Headers["x-myobapi-version"]);

if (supplyCredentials)
Expand Down Expand Up @@ -173,7 +172,6 @@ private static void AssertEmptyCredentialsHeaders(bool supplyOAuth, WebRequest r

Assert.IsTrue(request.Headers[HttpRequestHeader.AcceptEncoding].Split(new[] { ',' }).Contains("gzip"));

Assert.AreEqual("<<clientid>>", request.Headers["x-myobapi-key"]);
Assert.AreEqual("v2", request.Headers["x-myobapi-version"]);
Assert.IsNull(request.Headers["x-myobapi-cftoken"]);
}
Expand Down
5 changes: 5 additions & 0 deletions MYOB.API.SDK/SDK/ApiConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ public ApiConfiguration(string apiBaseUrl) : this(null, null, null, apiBaseUrl)
/// </summary>
public bool GenerateUris { get; private set; }

/// <summary>
/// The Api key used for making api request
/// </summary>
public string AuthApiKey { get; private set; }

#if !PORTABLE
/// <summary>
/// Gets or sets the cache policy for all requests
Expand Down
2 changes: 1 addition & 1 deletion MYOB.API.SDK/SDK/Communication/ApiRequestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void SetStandardHeaders(WebRequest request, IApiConfiguration configurati
#endif
});

request.Headers["x-myobapi-key"] = configuration.ClientId;
request.Headers["x-myobapi-key"] = configuration.AuthApiKey;
request.Headers["x-myobapi-version"] = "v2";

if ((credentials != null) && (!String.IsNullOrEmpty(credentials.Username))) // password can be empty
Expand Down
5 changes: 5 additions & 0 deletions MYOB.API.SDK/SDK/Contracts/Version2/Sale/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ public Invoice()
/// If true, surcharge fee could apply to invoice
/// </summary>
public bool CanApplySurcharge { get; set; }

/// <summary>
/// If true or null, BPay could apply to invoice when OIP enabled
/// </summary>
public bool? CanApplyBPay { get; set; }

}
}
5 changes: 5 additions & 0 deletions MYOB.API.SDK/SDK/IApiConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ public interface IApiConfiguration
/// </summary>
string ApiBaseUrl { get; }

/// <summary>
/// The Api key used for making api request
/// </summary>
string AuthApiKey { get; }

#if !PORTABLE
/// <summary>
/// Gets or sets the cache policy for all requests
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#AccountRight Live API .Net SDK#

[![Join the chat at https://gitter.im/MYOB-Technology/AccountRight_Live_API_.Net_SDK](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/MYOB-Technology/AccountRight_Live_API_.Net_SDK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This is the source repository for the MYOB AccountRight Live .Net SDK.

The official release of the SDK can be found on [NUGET](http://www.nuget.org/packages/MYOB.AccountRight.API.SDK/) and can be installed from Visual Studio using the Package Manager console.
Expand Down
8 changes: 1 addition & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2024.4.{build}
version: 2024.5.{build}
shallow_clone: true
assembly_info:
patch: true
Expand Down Expand Up @@ -28,12 +28,6 @@ deploy:
api_key:
secure: OGw616WsfGBUWoVi1NZFVekoCyXoqi1f93v8GJJ8Y1DgcH5utdKg0yX2FGkFkXfj
artifact: Release
notifications:
- provider: Webhook
url: https://webhooks.gitter.im/e/a5f4ffd724543d128fff
on_build_success: true
on_build_failure: true
on_build_status_changed: true
on_success:
- cmd: >-
.\packages\coveralls.io.1.3.4\tools\coveralls.net.exe --opencover .\Artefacts\Coverage\output.xml
Loading