Skip to content

Commit e7c4ae6

Browse files
committed
Added request filters to store manager
1 parent 1f62893 commit e7c4ae6

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

NetoDotNET/Store/StoreConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class StoreConfiguration
2525
/// <param name="APIKey">Your Neto API Secure Key (generate this in your Neto control panel).</param>
2626
/// <param name="username">Your Neto API username (managed under Staff Users in the Neto control panel). Not required if using a key.</param>
2727
/// <param name="baseEndpoint">API base endpoint e.g /do/WS/NetoAPI</param>
28-
public StoreConfiguration(string storeUrl, string APIKey, string username, string baseEndpoint, Action<HttpRequestMessage> requestFilter = null, Action<HttpResponseMessage> responseFilter = null)
28+
public StoreConfiguration(string storeUrl, string APIKey, string username, string baseEndpoint, Action<HttpRequestMessage> requestFilter, Action<HttpResponseMessage> responseFilter)
2929
{
3030
if (string.IsNullOrEmpty(storeUrl))
3131
{

NetoDotNET/Store/StoreManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using NetoDotNET.Resources.Currency;
1313
using NetoDotNET.Resources.Shippings;
1414
using NetoDotNET.Resources.Supplier;
15+
using System.Net.Http;
1516

1617
namespace NetoDotNET
1718
{
@@ -84,9 +85,9 @@ public class StoreManager
8485
/// <param name="storeName">The name of the Neto store https://www.*storeName*.com.au</param>
8586
/// <param name="APIKey">Your Neto API Secure Key (generate this in your Neto control panel).</param>
8687
/// <param name="username">Your Neto API username (managed under Staff Users in the Neto control panel). Not required if using a key.</param>
87-
public StoreManager(string storeName, string APIKey, string username)
88+
public StoreManager(string storeName, string APIKey, string username, Action<HttpRequestMessage> requestFilter = null, Action<HttpResponseMessage> responseFilter = null)
8889
{
89-
this._configuration = new StoreConfiguration(storeName, APIKey, username, _baseEndpoint);
90+
this._configuration = new StoreConfiguration(storeName, APIKey, username, _baseEndpoint, requestFilter, responseFilter);
9091

9192
this.Products = new ProductResource(this._configuration, null);
9293
this.Categories = new CategoryResource(this._configuration, null);

0 commit comments

Comments
 (0)