Exemplo n.º 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);
        }
Exemplo n.º 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());
        }
Exemplo n.º 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));
        }
Exemplo n.º 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 }
            };
        }
Exemplo n.º 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;
        }
Exemplo n.º 8
0
        public GetFeedStatusCommand(NewEggConfig config, NewEggCredentials credentials, string payload) : base(config, credentials, GetFeedStatusServiceUrl)
        {
            Condition.Requires(payload, "payload").IsNotNullOrWhiteSpace();

            this.Payload = payload;
        }