예제 #1
0
        public BaseTest()
        {
            var testCredentials = this.LoadTestSettings <TestCredentials>(@"\..\..\credentials.csv");

            this.Credentials = new NewEggCredentials(testCredentials.SellerId, testCredentials.ApiKey, testCredentials.SecretKey);
            this.Config      = new NewEggConfig((NewEggPlatform)Enum.Parse(typeof(NewEggPlatform), testCredentials.Platform));
        }
        public GetModifiedOrdersCommand(NewEggConfig config, NewEggCredentials credentials, string payload) : base(config, credentials, GetModifiedOrdersServiceUrl)
        {
            Condition.Requires(payload, "payload").IsNotNullOrWhiteSpace();

            this.Payload = payload;
            this.AddUrlParameter("version", ApiVersion);
        }
예제 #3
0
        public SubmitFeedCommand(NewEggConfig config, NewEggCredentials credentials, SubmitFeedRequestTypeEnum requestType, string payload) : base(config, credentials, SubmitFeedServiceUrl)
        {
            Condition.Requires(payload, "payload").IsNotNullOrWhiteSpace();

            this.Payload = payload;
            base.AddUrlParameter("requesttype", requestType.ToString().ToUpper());
        }
예제 #4
0
        public INewEggCredsService CreateCredsService(NewEggConfig config, string sellerId, string secretKey)
        {
            var credentials = new NewEggCredentials(sellerId, this._developerApiKey, secretKey);

            if (config.Platform == NewEggPlatform.NewEgg)
            {
                return(new NewEggCredsService(config, credentials));
            }

            return(new BusinessAccount.Services.Creds.NewEggCredsService(config, credentials));
        }
예제 #5
0
        protected NewEggCommand(NewEggConfig config, NewEggCredentials credentials, string relativeUrl)
        {
            Condition.Requires(config, "config").IsNotNull();
            Condition.Requires(credentials, "credentials").IsNotNull();

            this.Config         = config;
            this.Credentials    = credentials;
            this.RelativeUrl    = relativeUrl;
            this._urlParameters = new Dictionary <string, string>
            {
                { "sellerId", this.Credentials.SellerId }
            };
        }
예제 #6
0
 public NewEggItemsService(NewEggConfig config, NewEggCredentials credentials) : base(credentials, config)
 {
 }
        public UpdateItemInventoryCommand(NewEggConfig config, NewEggCredentials credentials, string payload) : base(config, credentials, UpdateItemInventoryServiceUrl)
        {
            Condition.Requires(payload, "payload").IsNotNullOrWhiteSpace();

            this.Payload = payload;
        }
예제 #8
0
        public GetFeedStatusCommand(NewEggConfig config, NewEggCredentials credentials, string payload) : base(config, credentials, GetFeedStatusServiceUrl)
        {
            Condition.Requires(payload, "payload").IsNotNullOrWhiteSpace();

            this.Payload = payload;
        }