Skip to content

Commit

Permalink
version update 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sangeet-joy_xero committed Aug 22, 2024
1 parent a92a674 commit 399fb37
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 52 deletions.
37 changes: 0 additions & 37 deletions Xero.NetStandard.OAuth2/Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,43 +265,6 @@ public ApiClient(string basePath)
_baseUrl = basePath;
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" />, defaulting to the global configurations' base url.
/// </summary>
/// <param name="client">An instance of HttpClient.</param>
/// <param name="handler">An optional instance of HttpClientHandler that is used by HttpClient.</param>
/// <exception cref="ArgumentNullException"></exception>
/// <remarks>
/// Some configuration settings will not be applied without passing an HttpClientHandler.
/// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings.
/// </remarks>
public ApiClient(HttpClient client, HttpClientHandler handler = null) :
this(client, Xero.NetStandard.OAuth2.Client.GlobalConfiguration.Instance.BasePath, handler)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ApiClient" />.
/// </summary>
/// <param name="client">An instance of HttpClient.</param>
/// <param name="basePath">The target service's base path in URL format.</param>
/// <param name="handler">An optional instance of HttpClientHandler that is used by HttpClient.</param>
/// <exception cref="ArgumentNullException"></exception>
/// <exception cref="ArgumentException"></exception>
/// <remarks>
/// Some configuration settings will not be applied without passing an HttpClientHandler.
/// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings.
/// </remarks>
public ApiClient(HttpClient client, string basePath, HttpClientHandler handler = null)

This comment has been minimized.

Copy link
@ElyeM

ElyeM Aug 28, 2024

@sangeet-joy-tw @vigneshk1121

Seems that this constructor was removed, was this intentionally? with this change we cant call the ApiClient with our own HttpClient.

Please look into this.

{
if (client == null) throw new ArgumentNullException("client cannot be null");
if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty");

_httpClientHandler = handler;
_httpClient = client;
_baseUrl = basePath;
}

/// <summary>
/// Disposes resources if they were created by us
/// </summary>
Expand Down
7 changes: 3 additions & 4 deletions Xero.NetStandard.OAuth2/Client/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
using System.Text;
using Newtonsoft.Json;
using System.Net;
using System.Security.Cryptography.X509Certificates;

namespace Xero.NetStandard.OAuth2.Client
{
Expand All @@ -32,7 +31,7 @@ public class Configuration : IReadableConfiguration
/// Version of the package.
/// </summary>
/// <value>Version of the package.</value>
public const string Version = "8.1.1";
public const string Version = "9.0.0";

/// <summary>
/// Identifier for ISO 8601 DateTime Format
Expand Down Expand Up @@ -104,7 +103,7 @@ public class Configuration : IReadableConfiguration
[System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")]
public Configuration()
{
UserAgent = "xero-netstandard-8.1.1";
UserAgent = "xero-netstandard-9.0.0";
BasePath = "https://api.xero.com/api.xro/2.0";
DefaultHeader = new ConcurrentDictionary<string, string>();
ApiKey = new ConcurrentDictionary<string, string>();
Expand Down Expand Up @@ -343,7 +342,7 @@ public static String ToDebugReport()
String report = "C# SDK (Xero.NetStandard.OAuth2) Debug Report:\n";
report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n";
report += " Version of the API: 6.1.1\n";
report += " SDK Package Version: 8.1.1\n";
report += " SDK Package Version: 9.0.0\n";

return report;
}
Expand Down
1 change: 0 additions & 1 deletion Xero.NetStandard.OAuth2/Client/IReadableConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

using System.Collections.Generic;
using System.Net;
using System.Security.Cryptography.X509Certificates;

namespace Xero.NetStandard.OAuth2.Client
{
Expand Down
2 changes: 1 addition & 1 deletion Xero.NetStandard.OAuth2/Xero.NetStandard.OAuth2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<RootNamespace>Xero.NetStandard.OAuth2</RootNamespace>
<Version>8.1.1</Version>
<Version>9.0.0</Version>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Xero.NetStandard.OAuth2.xml</DocumentationFile>
<PackageLicenseUrl>https://github.com/XeroAPI/Xero-NetStandard/</PackageLicenseUrl>
<PackageIconUrl>https://en.gravatar.com/userimage/180557955/74b3a957d886bc921b0d1455beed9dab.png</PackageIconUrl>
Expand Down
2 changes: 1 addition & 1 deletion docs/accounting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6217,7 +6217,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Accounting"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="Accounting"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="Accounting"><a href="#api-Accounting">Methods</a></li>
<li data-group="Accounting" data-name="createAccount" class="">
<a href="#api-Accounting-createAccount">createAccount</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/appstore/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="AppStore"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="AppStore"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="AppStore"><a href="#api-AppStore">Methods</a></li>
<li data-group="AppStore" data-name="getSubscription" class="">
<a href="#api-AppStore-getSubscription">getSubscription</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/bankfeeds/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="BankFeeds"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="BankFeeds"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="BankFeeds"><a href="#api-BankFeeds">Methods</a></li>
<li data-group="BankFeeds" data-name="createFeedConnections" class="">
<a href="#api-BankFeeds-createFeedConnections">createFeedConnections</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Files"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="Files"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="Files"><a href="#api-Files">Methods</a></li>
<li data-group="Files" data-name="createFileAssociation" class="">
<a href="#api-Files-createFileAssociation">createFileAssociation</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/finance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2738,7 +2738,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Finance"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="Finance"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="Finance"><a href="#api-Finance">Methods</a></li>
<li data-group="Finance" data-name="getAccountingActivityAccountUsage" class="">
<a href="#api-Finance-getAccountingActivityAccountUsage">getAccountingActivityAccountUsage</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll-au/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3413,7 +3413,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollAu"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="PayrollAu"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="PayrollAu"><a href="#api-PayrollAu">Methods</a></li>
<li data-group="PayrollAu" data-name="approveLeaveApplication" class="">
<a href="#api-PayrollAu-approveLeaveApplication">approveLeaveApplication</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll-nz/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4032,7 +4032,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollNz"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="PayrollNz"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="PayrollNz"><a href="#api-PayrollNz">Methods</a></li>
<li data-group="PayrollNz" data-name="approveTimesheet" class="">
<a href="#api-PayrollNz-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/payroll-uk/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3511,7 +3511,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="PayrollUk"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="PayrollUk"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="PayrollUk"><a href="#api-PayrollUk">Methods</a></li>
<li data-group="PayrollUk" data-name="approveTimesheet" class="">
<a href="#api-PayrollUk-approveTimesheet">approveTimesheet</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@
<nav id="scrollingNav">
<ul class="sidenav nav nav-list">
<li class="nav-header" data-group="Project"><strong>SDK: </strong><span id='sdk-name'></span></li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>8.1.1</li>
<li class="nav-header" data-group="Project"><strong>VSN: </strong>9.0.0</li>
<li class="nav-header" data-group="Project"><a href="#api-Project">Methods</a></li>
<li data-group="Project" data-name="createProject" class="">
<a href="#api-Project-createProject">createProject</a>
Expand Down

0 comments on commit 399fb37

Please sign in to comment.