internal FeedSubmissionProcessor(AmazonRegion region, string merchantId, string mWSAuthToken, IMarketplaceWebServiceClient marketplaceWebServiceClient, IEasyMwsLogger logger, EasyMwsOptions options) { _region = region; _merchantId = merchantId; _options = options; _logger = logger; _marketplaceWebServiceClient = marketplaceWebServiceClient; _mWSAuthToken = mWSAuthToken; }
/// <summary> /// Constructor to be used for UnitTesting/Mocking (in the absence of a dedicated DependencyInjection framework) /// </summary> internal EasyMwsClient(AmazonRegion region, string merchantId, string accessKeyId, string mwsSecretAccessKey, string mWSAuthToken, IReportQueueingProcessor reportProcessor, IFeedQueueingProcessor feedProcessor, IEasyMwsLogger easyMwsLogger, EasyMwsOptions options) : this(region, merchantId, accessKeyId, mwsSecretAccessKey, mWSAuthToken, easyMwsLogger, options) { _reportProcessor = reportProcessor; _feedProcessor = feedProcessor; RegisterEvents(); }
internal FeedProcessor(AmazonRegion region, string merchantId, string mWSAuthToken, EasyMwsOptions options, IMarketplaceWebServiceClient mwsClient, IEasyMwsLogger logger) { _region = region; _merchantId = merchantId; _options = options; _logger = logger; _callbackActivator = _callbackActivator ?? new CallbackActivator(); _feedSubmissionProcessor = _feedSubmissionProcessor ?? new FeedSubmissionProcessor(_region, _merchantId, mWSAuthToken, mwsClient, _logger, _options); RegisterEvents(); }
/// <param name="region">The region of the account. Required parameter. A finer grained region or country can be specified on a PropertiesContainer by specifying its marketplaceIdList constructor argument.</param> /// <param name="merchantId">Seller ID / Merchant ID. Required parameter.</param> /// <param name="accessKeyId">Amazon account access key. Required parameter. This key can either belong to a seller or to a developer account authorized by a seller. If the key belongs to a developer account authorized by the seller then also make sure to specify the MWSAuthToken argument.</param> /// <param name="mwsSecretAccessKey">Amazon account secret access key. Required parameter. This key can either belong to a seller or to a developer account authorized by a seller. If the key belongs to a developer account authorized by the seller then also make sure to specify the MWSAuthToken argument.</param> /// <param name="mwsAuthToken">MWS Authorization Token. Optional parameter. If the provided access keys belong to a developer account authorized by a seller, this argument is the MWS Authorization Token provided by the seller to the authorized developer.</param> /// <param name="easyMwsLogger">An optional IEasyMwsLogger instance that can provide access to logs. It is strongly recommended to use a logger implementation already existing in the EasyMws package.</param> /// <param name="options">Configuration options for EasyMwsClient</param> public EasyMwsClient(AmazonRegion region, string merchantId, string accessKeyId, string mwsSecretAccessKey, string mwsAuthToken = null, IEasyMwsLogger easyMwsLogger = null, EasyMwsOptions options = null) { if (string.IsNullOrEmpty(merchantId) || string.IsNullOrEmpty(accessKeyId) || string.IsNullOrEmpty(mwsSecretAccessKey)) { throw new ArgumentNullException( "One or more required parameters provided to initialize the EasyMwsClient were null or empty"); } _amazonRegion = region; _merchantId = merchantId; _options = options ?? new EasyMwsOptions(); _easyMwsLogger = easyMwsLogger ?? new EasyMwsLogger(isEnabled: false); var mwsClient = new MarketplaceWebServiceClient(accessKeyId, mwsSecretAccessKey, CreateConfig(_amazonRegion)); _reportProcessor = _reportProcessor ?? new ReportProcessor(_amazonRegion, _merchantId, mwsAuthToken, _options, mwsClient, _easyMwsLogger); _feedProcessor = _feedProcessor ?? new FeedProcessor(_amazonRegion, _merchantId, mwsAuthToken, _options, mwsClient, _easyMwsLogger); RegisterEvents(); }
/// <summary> /// Constructor to be used for UnitTesting/Mocking (in the absence of a dedicated DependencyInjection framework) /// </summary> internal FeedProcessor(AmazonRegion region, string merchantId, string mWSAuthToken, EasyMwsOptions options, IMarketplaceWebServiceClient mwsClient, IFeedSubmissionProcessor feedSubmissionProcessor, ICallbackActivator callbackActivator, IEasyMwsLogger logger) : this(region, merchantId, mWSAuthToken, options, mwsClient, logger) { _feedSubmissionProcessor = feedSubmissionProcessor; _callbackActivator = callbackActivator; RegisterEvents(); }
internal ReportRequestEntryService(IReportRequestEntryRepository reportRequestEntryRepository, EasyMwsOptions options = null, IEasyMwsLogger logger = null) : this(options, logger) => (_reportRequestEntryRepository) = (reportRequestEntryRepository);
public TestEasyMwsLogPublisher(IEasyMwsLogger logger) { _logger = logger; }
/// <summary> /// Constructor to be used for UnitTesting/Mocking (in the absence of a dedicated DependencyInjection framework) /// </summary> internal ReportProcessor(AmazonRegion region, string merchantId, string mWSAuthToken, EasyMwsOptions options, IMarketplaceWebServiceClient mwsClient, IRequestReportProcessor requestReportProcessor, ICallbackActivator callbackActivator, IEasyMwsLogger logger) : this(region, merchantId, mWSAuthToken, options, mwsClient, logger) { _requestReportProcessor = requestReportProcessor; _callbackActivator = callbackActivator; RegisterEvents(); }
internal FeedSubmissionEntryService(IFeedSubmissionEntryRepository feedSubmissionRepo, EasyMwsOptions options = null, IEasyMwsLogger logger = null) : this(options, logger) => (_feedRepo) = (feedSubmissionRepo);
public void Setup() { _logger = new EasyMwsLogger(); _easyMwsClient = new EasyMwsClient(AmazonRegion.Europe, "test", "test", "test", "test", _logger, new EasyMwsOptions()); }