protected override void ExecuteInternal()
        {
            eBay.Service.Core.Sdk.ApiContext apiContext            = this.ApiContext;
            eBay.Service.Call.GetClientAlertsAuthTokenCall apiCall = new eBay.Service.Call.GetClientAlertsAuthTokenCall(apiContext);

            apiCall.Execute();
            this.ClientAlertsAuthToken = apiCall.ApiResponse.ClientAlertsAuthToken;
        }
        protected override void ExecuteInternal()
        {
            eBay.Service.Core.Sdk.ApiContext apiContext = this.ApiContext;
            eBay.Service.Call.GetNotificationPreferencesCall apiCall = new eBay.Service.Call.GetNotificationPreferencesCall(apiContext);

            apiCall.GetNotificationPreferences(this.NotificationRoleCode);

            apiCall.PreferenceLevel = NotificationRoleCodeType.User;

            apiCall.Execute();

            if (apiCall.ApiResponse.ApplicationDeliveryPreferences != null)
            {
                Console.WriteLine(apiCall.ApplicationDeliveryPreferences.ApplicationEnable.ToString());
                Console.WriteLine(apiCall.ApplicationDeliveryPreferences.ApplicationURL);
            }

            this.NotificationPreferences = new List <NotificationPreference>();

            for (int i = 0; i <= 96; i++)
            {
                NotificationEventTypeCodeType code = (NotificationEventTypeCodeType)i;

                if (code == NotificationEventTypeCodeType.None ||
                    code == NotificationEventTypeCodeType.CustomCode)
                {
                    continue;
                }
                if (code == NotificationEventTypeCodeType.MyMessagesAlert ||
                    code == NotificationEventTypeCodeType.MyMessagesAlertHeader)
                {
                    continue;                     // Depreciated
                }
                // FeedbackForSeller == When we recieve feedback.
                //
                NotificationPreference item = new NotificationPreference(code);
                this.NotificationPreferences.Add(item);
            }

            this.NotificationPreferences.Sort
            (
                delegate(NotificationPreference x1, NotificationPreference x2)
            {
                return(x1.EventType.ToString().CompareTo(x2.EventType.ToString()));
            }
            );

            foreach (NotificationEnableType item in apiCall.ApiResponse.UserDeliveryPreferenceArray)
            {
                var preference = this.NotificationPreferences.Single(x => x.EventType == item.EventType);

                preference.Enabled = (item.EventEnable == EnableCodeType.Enable);
                preference.Dirty   = false;
            }
        }
Exemplo n.º 3
0
        protected override void ExecuteInternal()
        {
            eBay.Service.Core.Sdk.ApiContext apiContext = this.ApiContext;
            eBay.Service.Call.GetUserCall    apiCall    = new eBay.Service.Call.GetUserCall(apiContext);

            apiCall.Execute();

            this.SiteCode = Enum.GetName(typeof(SiteCodeType), apiCall.Site);

            this.UserId = apiCall.ApiResponse.User.UserID;
        }
Exemplo n.º 4
0
        protected override void ExecuteInternal()
        {
            eBay.Service.Core.Sdk.ApiContext     apiContext = this.ApiContext;
            eBay.Service.Call.GeteBayDetailsCall apiCall    = new eBay.Service.Call.GeteBayDetailsCall(apiContext);

            SiteCodeType siteCodeType = (SiteCodeType)Enum.Parse(typeof(SiteCodeType), this.SiteCode);

            apiCall.Site = siteCodeType;

            apiCall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll);

            apiCall.DetailNameList = new DetailNameCodeTypeCollection();
            apiCall.DetailNameList.Add(DetailNameCodeType.URLDetails);

            apiCall.Execute();

            this.UrlDetails = apiCall.URLDetailList;
        }