Пример #1
0
        protected override async Task LoadData()
        {
            IEbayService ebayService = DependencyService.Get <IEbayService>();
            List <Item>  items       = await ebayService.FindPopularItems(_parentCategory);

            _listV.ItemsSource = items;
        }
Пример #2
0
 public EbayMagentoProcessor(IMapper mapper,
                             IEbayService ebayService,
                             IMagentoService magentoService,
                             IConnectionService connectionService,
                             IUserChannelService userChannelService,
                             IChannelEbayService channelEbayService,
                             IChannelMagentoService channelMagentoService,
                             ITicketEbayService ticketEbayService,
                             IMessageEbayService messageEbayService,
                             ITicketMagentoService ticketMagentoService,
                             IMessageMagentoService messageMagentoService,
                             ITicketEbayMagentoService ticketEbayMagentoService,
                             IMessageEbayMagentoService messageEbayMagentoService)
 {
     this.mapper                    = mapper;
     this.ebayService               = ebayService;
     this.magentoService            = magentoService;
     this.connectionService         = connectionService;
     this.userChannelService        = userChannelService;
     this.channelEbayService        = channelEbayService;
     this.channelMagentoService     = channelMagentoService;
     this.ticketEbayService         = ticketEbayService;
     this.messageEbayService        = messageEbayService;
     this.ticketMagentoService      = ticketMagentoService;
     this.messageMagentoService     = messageMagentoService;
     this.ticketEbayMagentoService  = ticketEbayMagentoService;
     this.messageEbayMagentoService = messageEbayMagentoService;
 }
Пример #3
0
        protected override async Task LoadData()
        {
            IEbayService ebayService = DependencyService.Get <IEbayService>();
            ItemDetails  itemDetails = await ebayService.GetItemDetails(_item);

            _carouselV.ItemsSource = itemDetails.PictureURL;
        }
Пример #4
0
        protected override async Task LoadData()
        {
            IEbayService    ebayService = DependencyService.Get <IEbayService>();
            List <Category> categories  = await ebayService.GetCategories(_parentCategory);

            _listV.ItemsSource = categories;
        }
Пример #5
0
        public async Task <IActionResult> ProcessPlatformNotification()
        {
            string body = null;

            using (var reader = new StreamReader(Request.Body))
            {
                body = await reader.ReadToEndAsync();

                XNamespace             soapNs   = "http://schemas.xmlsoap.org/soap/envelope/";
                XElement               root     = XElement.Parse(body);
                IEnumerable <XElement> elements = from el in root.Descendants(soapNs + "Body")
                                                  select el;
                if (elements != null && elements.Count() == 1)
                {
                    XElement element = elements.First();
                    IEnumerable <XElement> childElements = element.Elements();
                    if (childElements.Count() == 1)
                    {
                        XElement childElement          = childElements.First();
                        string   notificationEventName = (string)childElement.Element(ebayNs + "NotificationEventName");
                        string   accountName           = (string)childElement.Element(ebayNs + "RecipientUserID");
                        m_logger.Info("Processing " + accountName + " " + notificationEventName + " event");
                        IEbayService ebayService = m_platformServiceFactory.GetEbayServiceByAccount(accountName);
                        if (ebayService != null)
                        {
                            ebayService.ProcessPlatformNotification(notificationEventName, childElement);
                        }
                    }
                }
            }

            return(Ok());
        }
Пример #6
0
        public IActionResult CompleteSale(string company, string ebayAccountName, int orderId)
        {
            IEbayService ebayService = m_platformServiceFactory.GetEbayService(company);

            ebayService.CompleteSale(orderId);

            return(Ok());
        }
Пример #7
0
        public IActionResult GetNotificationsUsage(string company, string account)
        {
            IEbayService ebayService = m_platformServiceFactory.GetEbayService(company);

            if (ebayService != null)
            {
                ebayService.GetNotificationsUsage(account);
            }

            return(Ok());
        }
Пример #8
0
        public IActionResult GetNotificationPreferences(string company, string account)
        {
            List <string> enabledNotificationTypes = new List <string>();
            IEbayService  ebayService = m_platformServiceFactory.GetEbayService(company);

            if (ebayService != null)
            {
                enabledNotificationTypes = ebayService.GetEnabledNotificationTypes(account);
            }

            return(Ok(enabledNotificationTypes));
        }
Пример #9
0
        public async Task <IActionResult> ProcessPlatformNotification(string company)
        {
            IEbayService ebayService = m_platformServiceFactory.GetEbayService(company);

            if (ebayService != null)
            {
                string body = null;
                using (var reader = new StreamReader(Request.Body))
                {
                    body = await reader.ReadToEndAsync();

                    ebayService.ProcessPlatformNotification(body);
                }
            }
            return(new OkResult());
        }
Пример #10
0
        public IActionResult SetNotificationPreferences(string company, string account, bool enable)
        {
            string baseUrl = $"{Request.Scheme}://{Request.Host}{Request.PathBase}";
            string url     = baseUrl + "/EbayNotification";

            string[]     eventTypes  = { "AuctionCheckoutComplete", "MyMessageseBayMessage", "MyMessagesM2MMessage", "ItemListed", "ItemClosed" };
            IEbayService ebayService = m_platformServiceFactory.GetEbayService(company);

            if (ebayService != null)
            {
                if (account.ToUpper() == "ALL")
                {
                    ebayService.SetNotificationPreferences(url, enable, eventTypes);
                }
                else
                {
                    ebayService.SetNotificationPreferences(account, url, enable, eventTypes);
                }
            }

            return(Ok());
        }
 public ServiceConnectionController(IEbayService ebayService,
                                    IMagentoService magentoService,
                                    IGmailService gmailService,
                                    IChannelEbayService channelEbayService,
                                    IChannelMagentoService channelMagentoService,
                                    IChannelEmailService channelEmailService,
                                    IUserService userService,
                                    IUserChannelService userChannelSerivce,
                                    IConnectionService connectionService,
                                    IMapper mapper)
 {
     this.ebayService           = ebayService;
     this.magentoService        = magentoService;
     this.gmailService          = gmailService;
     this.channelEbayService    = channelEbayService;
     this.channelMagentoService = channelMagentoService;
     this.channelEmailService   = channelEmailService;
     this.userService           = userService;
     this.userChannelSerivce    = userChannelSerivce;
     this.connectionService     = connectionService;
     this.mapper = mapper;
 }
Пример #12
0
 public EbayHub(HttpContext context, WebSocket webSocket, IEbayService ebayService, IOptions <EnvorinmentOptions> options) : base(context, webSocket)
 {
     _ebayService  = ebayService;
     configuration = options.Value;
 }
Пример #13
0
 public CategoriesViewModel(IEbayService ebayService)
 {
     _ebayService = ebayService;
     _rows        = new List <Category>();
 }
Пример #14
0
 public Form1(IEbayService service)
 {
     InitializeComponent();
     Service = service;
 }
Пример #15
0
 public ItemsViewModel(IEbayService ebayService)
 {
     _ebayService = ebayService;
     _rows        = new List <Item>();
 }
Пример #16
0
        public void CompleteSale(string company, string ebayAccountName, int orderId)
        {
            IEbayService ebayService = m_platformServiceFactory.GetEbayService(company);

            ebayService.CompleteSale(orderId);
        }
Пример #17
0
 public SpendService(IKeywordRepository keywordsRepository, IEbayService ebayService, IMapper mapper)
 {
     _keywordsRepository = keywordsRepository;
     _ebayService        = ebayService;
     _mapper             = mapper;
 }
Пример #18
0
 public Form1(IEbayService service)
 {
     InitializeComponent();
     Service = service;
 }