Class ErpServiceCaller
- Assembly
- Dynamicweb.DataIntegration.dll
Provides methods for getting data from ERP service
public class ErpServiceCaller : IDisposable
- Inheritance
-
ErpServiceCaller
- Implements
- Inherited Members
Constructors
ErpServiceCaller(string, ILogger)
Initializes a new instance of the ErpServiceCaller class for using a persistent WCF client connection.
public ErpServiceCaller(string endpoint, ILogger logger)
Parameters
Methods
Dispose()
Disposes of the persistent ERPClient connection
public void Dispose()
GetAllData(string, string, ILogger)
Gets all data using the persistent connection.
public virtual string GetAllData(string secret, string settings, ILogger logger)
Parameters
Returns
GetAllData(string, string, string, ILogger)
Gets all data using a one-shot connection
public static string GetAllData(string endpoint, string secret, string settings, ILogger logger)
Parameters
Returns
- string
String with data
GetAllData(string, string, string, TimeSpan, ILogger)
Gets all data using a one-shot connection
public static string GetAllData(string endpoint, string secret, string settings, TimeSpan timeout, ILogger logger)
Parameters
endpoint
stringEndpoint
secret
stringSecret
settings
stringSettings
timeout
TimeSpanTimeout
logger
ILoggerThe logger.
Returns
- string
String with data
GetAllDataRequest(string)
Create xml request string for getting all data
public static string GetAllDataRequest(string settings)
Parameters
settings
stringSettings string
Returns
- string
Xml formatted string with settings values
GetDataFromRequestString(string, string, string, ILogger)
Gets the data from a request string.
public static string GetDataFromRequestString(string endpoint, string secret, string requestXml, ILogger logger)
Parameters
endpoint
stringThe endpoint.
secret
stringThe secret.
requestXml
stringThe request XML.
logger
ILoggerThe logger.
Returns
GetDataFromRequestString(string, string, string, TimeSpan, ILogger)
Gets the data from a request string.
public static string GetDataFromRequestString(string endpoint, string secret, string requestXml, TimeSpan timeout, ILogger logger)
Parameters
endpoint
stringThe endpoint.
secret
stringThe secret.
requestXml
stringThe request XML.
timeout
TimeSpanThe timeout.
logger
ILoggerThe logger.
Returns
GetPutOrdersRequest(string, string)
Creates xml string request for put order operation
public static string GetPutOrdersRequest(string orders, string settings)
Parameters
Returns
- string
String
GetPutUsersRequest(string, string)
Creates GetPutUsers request text
public static string GetPutUsersRequest(string users, string settings)
Parameters
Returns
- string
String result
GetUsers(string, string, string, ILogger)
Requests users from ERP service
public static string GetUsers(string endpoint, string secret, string settings, ILogger logger)
Parameters
Returns
- string
String result
GetUsers(string, string, string, TimeSpan, ILogger)
Requests users from ERP service
public static string GetUsers(string endpoint, string secret, string settings, TimeSpan timeout, ILogger logger)
Parameters
endpoint
stringEndpoint
secret
stringSecret
settings
stringSettings
timeout
TimeSpanTimeout
logger
ILoggerThe logger.
Returns
- string
String result
GetUsersRequest(string)
Creates xml string request for getting users
public static string GetUsersRequest(string settings)
Parameters
settings
stringSettings
Returns
- string
String result
PutOrders(string, string, string, ILogger)
Performs put orders request
public static string PutOrders(string endpoint, string secret, string request, ILogger logger)
Parameters
endpoint
stringThe endpoint.
secret
stringThe secret.
request
stringThe request.
logger
ILoggerThe logger.
Returns
PutOrders(string, string, string, string, ILogger)
Performs put orders request
public static string PutOrders(string endpoint, string secret, string orders, string settings, ILogger logger)
Parameters
endpoint
stringEndpoint
secret
stringSecret
orders
stringOrders
settings
stringSettings
logger
ILoggerThe logger.
Returns
- string
String result
PutOrders(string, string, string, string, TimeSpan, ILogger)
Performs put orders request
public static string PutOrders(string endpoint, string secret, string orders, string settings, TimeSpan timeout, ILogger logger)
Parameters
endpoint
stringEndpoint
secret
stringSecret
orders
stringOrders
settings
stringSettings
timeout
TimeSpanTimeout
logger
ILoggerThe logger.
Returns
- string
String result
PutOrders(string, string, string, TimeSpan, ILogger)
Performs put orders request
public static string PutOrders(string endpoint, string secret, string request, TimeSpan timeout, ILogger logger)
Parameters
endpoint
stringThe endpoint.
secret
stringThe secret.
request
stringThe request.
timeout
TimeSpanThe timeout.
logger
ILoggerThe logger.
Returns
PutUsers(string, string, string, ILogger)
Performs PutUsers request
public static string PutUsers(string endpoint, string secret, string request, ILogger logger)
Parameters
Returns
- string
String result
PutUsers(string, string, string, string, ILogger)
Performs PutUsers request
public static string PutUsers(string endpoint, string secret, string users, string settings, ILogger logger)
Parameters
endpoint
stringEndpoint
secret
stringSecret
users
stringUsers
settings
stringSettings
logger
ILoggerThe logger.
Returns
PutUsers(string, string, string, string, TimeSpan, ILogger)
Performs PutUsers request
public static string PutUsers(string endpoint, string secret, string users, string settings, TimeSpan timeout, ILogger logger)
Parameters
endpoint
stringEndpoint
secret
stringSecret
users
stringUsers
settings
stringSettings
timeout
TimeSpanTimeout
logger
ILoggerThe logger.
Returns
PutUsers(string, string, string, TimeSpan, ILogger)
Performs PutUsers request
public static string PutUsers(string endpoint, string secret, string request, TimeSpan timeout, ILogger logger)
Parameters
endpoint
stringEndpoint
secret
stringSecret
request
stringRequest
timeout
TimeSpanTimeout
logger
ILoggerThe logger.
Returns
- string
String result