Class CustomerExporter
The service for the exporting customers.
Inheritance
Implements
Namespace: EPiServer.Commerce.ODP.Internal
Assembly: EPiServer.Commerce.ODP.dll
Version: 14.26.0Syntax
public class CustomerExporter : Object, ICustomerExporter
Constructors
CustomerExporter(ODPJobOptions, IServiceProvider, ILogger<CustomerExporter>, LocalizationService, IHttpClientFactory)
Default constructor
Declaration
public CustomerExporter(ODPJobOptions options, IServiceProvider serviceProvider, ILogger<CustomerExporter> logger, LocalizationService localizationService, IHttpClientFactory httpClientFactory)
Parameters
Type | Name | Description |
---|---|---|
ODPJobOptions | options | The options |
System.IServiceProvider | serviceProvider | The service provider |
Microsoft.Extensions.Logging.ILogger<CustomerExporter> | logger | The logger |
EPiServer.Framework.Localization.LocalizationService | localizationService | The localization service |
System.Net.Http.IHttpClientFactory | httpClientFactory | The HttpClient factory |
Methods
Export(Action<String>)
Export customers to ODP.
Declaration
public ExportResult Export(Action<string> uiNotifier)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String> | uiNotifier | The ui notifier |
Returns
Type | Description |
---|---|
ExportResult | The number of errors |
Export(DateTime, DateTime, Action<String>)
Export customers to ODP.
Declaration
public ExportResult Export(DateTime fromDate, DateTime toDate, Action<string> uiNotifier)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | fromDate | The start date to export. |
System.DateTime | toDate | The end date to export. |
System.Action<System.String> | uiNotifier | The ui notifier |
Returns
Type | Description |
---|---|
ExportResult | The number of errors |
GetCustomerAddresses(IEnumerable<CustomerContact>)
Get customer addresses.
Declaration
protected virtual IEnumerable<CustomerAddress> GetCustomerAddresses(IEnumerable<CustomerContact> customers)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CustomerContact> | customers | The list of customer contact. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<CustomerAddress> | List of customer address. |
GetCustomers(DateTime, DateTime, Int32, Int32)
Gets the customers from data storage by start date
Declaration
protected virtual IEnumerable<CustomerContact> GetCustomers(DateTime fromDate, DateTime toDate, int index, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | fromDate | The start date |
System.DateTime | toDate | The start date |
System.Int32 | index | The staring record |
System.Int32 | pageSize | Number of records to return |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<CustomerContact> |
GetCustomers(Int32, Int32)
Gets the customers from data storage.
Declaration
protected virtual IEnumerable<CustomerContact> GetCustomers(int index, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The staring record |
System.Int32 | pageSize | Number of records to return |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<CustomerContact> |
SendDataToS3(IEnumerable<CustomerContact>, IEnumerable<CustomerAddress>, MarketKey, Action<String>)
Declaration
protected virtual void SendDataToS3(IEnumerable<CustomerContact> customers, IEnumerable<CustomerAddress> addresses, MarketKey marketKey, Action<string> uiNotifier)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CustomerContact> | customers | |
System.Collections.Generic.IEnumerable<CustomerAddress> | addresses | |
MarketKey | marketKey | |
System.Action<System.String> | uiNotifier |