예제 #1
0
        public void can_rate()
        {
            var x = AmazonRateInfo.GetUserRatingInfo("A1OXZLJTRHTZJ3");

            Assert.That(x.Rating, Is.GreaterThan(0));
            Assert.That(x.Name, Is.EqualTo("Contigoit"));
        }
예제 #2
0
        private int ConnectAmazonTrn(string marketplaceId, string merchantId, string mwsAuthToken)
        {
            Log.InfoFormat("Adding Marketplace '{0}' to customer {1} with MerchantId '{2}'", marketplaceId, _context.User.Id, merchantId);

            if (string.IsNullOrEmpty(marketplaceId) || string.IsNullOrEmpty(merchantId))
            {
                return(-1);
            }

            var customer = _context.Customer;

            var amazon = new AmazonDatabaseMarketPlace();

            var sellerInfo = AmazonRateInfo.GetUserRatingInfo(merchantId);

            _mpChecker.Check(amazon.InternalId, customer, sellerInfo.Name);

            var amazonSecurityInfo = new AmazonSecurityInfo(merchantId, mwsAuthToken);

            amazonSecurityInfo.AddMarketplace(marketplaceId);

            var marketplace = _helper.SaveOrUpdateCustomerMarketplace(sellerInfo.Name, amazon, amazonSecurityInfo, customer, marketplaceId);

            _session.Flush();

            if (CurrentValues.Instance.AskvilleEnabled)
            {
                Askville(marketplace.Id, merchantId, marketplaceId);
            }

            _customerRepository.SaveOrUpdate(customer);

            return(marketplace.Id);
        }
예제 #3
0
 public static AmazonUserRatingInfo GetUserStatisticsInfo(AmazonUserInfo request)
 {
     return(AmazonRateInfo.GetUserRatingInfo(request));
 }
예제 #4
0
 public void can_rate2()
 {
     var x = AmazonRateInfo.GetUserRatingInfo("A2KLM32RICPAA2");
 }