Ejemplo n.º 1
0
        /// <summary>
        /// return an item
        /// </summary>
        /// <returns></returns>
        public static ItemType BuildItem()
        {
            ItemType item = new ItemType();

            item.Site        = SiteCodeType.US;
            item.Currency    = CurrencyCodeType.USD;
            item.ListingType = ListingTypeCodeType.Chinese;
            String t = "eBay SDK SanityTest " + DateTime.Now + " DO NOT BID!";

            item.ApplicationData       = "this is an application data";
            item.Title                 = t;
            item.Description           = "This is a test item created by eBay SDK SanityTest.";
            item.StartPrice            = new AmountType();
            item.StartPrice.Value      = 1.01;
            item.StartPrice.currencyID = item.Currency;
            item.ListingDuration       = "Days_7";
            item.Location              = "San Jose, CA";
            item.Country               = CountryCodeType.US;
            BestOfferDetailsType bo = new BestOfferDetailsType();

            bo.BestOfferEnabled   = false;
            item.BestOfferDetails = bo;
            CategoryType cat = new CategoryType();

            cat.CategoryID         = "14111";
            item.PrimaryCategory   = cat;
            item.Quantity          = 1;
            item.QuantitySpecified = true;
            //handling time
            item.DispatchTimeMax = 1;

            //item condition
            item.ConditionID = 1000;



            // Payment
            BuyerPaymentMethodCodeTypeCollection arrPaymentMethods =
                new BuyerPaymentMethodCodeTypeCollection();

            arrPaymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
            item.PaymentMethods     = arrPaymentMethods;
            item.PayPalEmailAddress = "*****@*****.**";
            //shipping service
            item.ShippingDetails = getShippingDetails();
            // Set item picture
            PictureDetailsType pictureDetails = new PictureDetailsType();

            pictureDetails.PictureURL = new StringCollection();
            pictureDetails.PictureURL.Add("http://pics.ebaystatic.com/aw/pics/navbar/eBayLogoTM.gif");

            item.ReturnPolicy = GetPolicyForUS();

            item.PictureDetails = pictureDetails;
            return(item);
        }
Ejemplo n.º 2
0
        public static ItemType BuildItem()
        {
            ItemType item = new ItemType();

            item.AutoPay                  = false;
            item.BuyItNowPrice            = new AmountType();
            item.BuyItNowPrice.Value      = Convert.ToDouble("10.0");
            item.BuyItNowPrice.currencyID = CurrencyCodeType.USD;
            item.Country                  = CountryCodeType.US;
            item.Currency                 = CurrencyCodeType.USD;
            item.Description              = "SDK item description";
            item.ListingDuration          = "Days_7";
            item.ListingType              = ListingTypeCodeType.Chinese;
            item.Location                 = "San Jose, CA";
            item.PaymentMethods           = new BuyerPaymentMethodCodeTypeCollection();
            item.PaymentMethods.Add(BuyerPaymentMethodCodeType.PaymentSeeDescription);
            item.PrimaryCategory            = new CategoryType();
            item.PrimaryCategory.CategoryID = "2312";
            item.Quantity                = 1;
            item.RegionID                = "0";
            item.ReservePrice            = new AmountType();
            item.ReservePrice.Value      = Convert.ToDouble("5.0");
            item.ReservePrice.currencyID = CurrencyCodeType.USD;
            item.ShippingDetails         = new ShippingDetailsType();
            item.StartPrice              = new AmountType();
            item.StartPrice.Value        = Convert.ToDouble("1.0");
            item.StartPrice.currencyID   = CurrencyCodeType.USD;
            item.SubTitle                = "sub title";
            item.Title                        = "SDK item title";
            item.SecondaryCategory            = new CategoryType();
            item.SecondaryCategory.CategoryID = "2369";
            //set shipping details
            item.ShippingDetails = getShippingDetails();
            //handling time
            item.DispatchTimeMax = 1;
            // Payment
            BuyerPaymentMethodCodeTypeCollection arrPaymentMethods =
                new BuyerPaymentMethodCodeTypeCollection();

            arrPaymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
            item.PaymentMethods     = arrPaymentMethods;
            item.PayPalEmailAddress = "*****@*****.**";
            //set return policy
            item.ReturnPolicy = GetPolicyForUS();

            return(item);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// return an item
        /// </summary>
        /// <returns></returns>
        public static ItemType BuildItem()
        {
            ItemType item = new ItemType();
            item.Site = SiteCodeType.US;
            item.Currency = CurrencyCodeType.USD;
            item.ListingType = ListingTypeCodeType.Chinese;
            String t = "eBay SDK SanityTest " + DateTime.Now + " DO NOT BID!";

            item.ApplicationData="this is an application data";
            item.Title = t;
            item.Description = "This is a test item created by eBay SDK SanityTest.";
            item.StartPrice = new AmountType();
            item.StartPrice.Value = 1.01;
            item.StartPrice.currencyID = item.Currency;
            item.ListingDuration = "Days_7";
            item.Location = "San Jose, CA";
            item.Country = CountryCodeType.US;
            BestOfferDetailsType bo = new BestOfferDetailsType();
            bo.BestOfferEnabled = false;
            item.BestOfferDetails = bo;
            CategoryType cat = new CategoryType();
            cat.CategoryID = "14111";
            item.PrimaryCategory = cat;
            item.Quantity = 1;
            item.QuantitySpecified = true;
            //handling time
            item.DispatchTimeMax =1;
            // Payment
            BuyerPaymentMethodCodeTypeCollection arrPaymentMethods =
                new BuyerPaymentMethodCodeTypeCollection();
            arrPaymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
            item.PaymentMethods = arrPaymentMethods;
            item.PayPalEmailAddress = "*****@*****.**";
            //shipping service
            item.ShippingDetails = getShippingDetails();
            // Set item picture
            PictureDetailsType pictureDetails = new PictureDetailsType();
            pictureDetails.PictureURL = new StringCollection();
            pictureDetails.PictureURL.Add( "http://pics.ebaystatic.com/aw/pics/navbar/eBayLogoTM.gif");

            item.ReturnPolicy=GetPolicyForUS();

            item.PictureDetails = pictureDetails;
            return item;
        }
Ejemplo n.º 4
0
		public static ItemType BuildItem()
		{
			ItemType item =new ItemType();
			item.AutoPay = false;
			item.BuyItNowPrice = new AmountType();
			item.BuyItNowPrice.Value = Convert.ToDouble("10.0");
			item.BuyItNowPrice.currencyID = CurrencyCodeType.USD;
			item.Country = CountryCodeType.US;
			item.Currency = CurrencyCodeType.USD;
			item.Description = "SDK item description";
			item.ListingDuration = "Days_7";
			item.ListingType = ListingTypeCodeType.Chinese;
			item.Location = "San Jose, CA";
			item.PaymentMethods = new BuyerPaymentMethodCodeTypeCollection();
			item.PaymentMethods.Add(BuyerPaymentMethodCodeType.PaymentSeeDescription);
			item.PrimaryCategory = new CategoryType();
			item.PrimaryCategory.CategoryID = "2312";
			item.Quantity = 1;
			item.RegionID = "0";
			item.ReservePrice = new AmountType();
			item.ReservePrice.Value = Convert.ToDouble("5.0");
			item.ReservePrice.currencyID = CurrencyCodeType.USD;
			item.ShippingDetails = new ShippingDetailsType();
			item.StartPrice = new AmountType();
			item.StartPrice.Value = Convert.ToDouble("1.0");
			item.StartPrice.currencyID = CurrencyCodeType.USD;
			item.SubTitle = "sub title";
			item.Title = "SDK item title";
			item.SecondaryCategory = new CategoryType();
			item.SecondaryCategory.CategoryID = "2369";
			//set shipping details
			item.ShippingDetails=getShippingDetails();
			//handling time
			item.DispatchTimeMax =1;
			// Payment
			BuyerPaymentMethodCodeTypeCollection arrPaymentMethods =
				new BuyerPaymentMethodCodeTypeCollection();
			arrPaymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
			item.PaymentMethods = arrPaymentMethods;
			item.PayPalEmailAddress = "*****@*****.**";
			//set return policy
			item.ReturnPolicy=GetPolicyForUS();

			return item;
		}
Ejemplo n.º 5
0
        //set PaymentMethods
        private void setPaymentMethods(ItemType item)
        {
            BuyerPaymentMethodCodeTypeCollection paymentCol = new BuyerPaymentMethodCodeTypeCollection();

            foreach (CheckBox cb in this.paymentMethodTableLayoutPanel.Controls)
            {
                if (cb.Checked)
                {
                    BuyerPaymentMethodCodeType paymentCodeType = (BuyerPaymentMethodCodeType)Enum.Parse(typeof(BuyerPaymentMethodCodeType), cb.Name, false);
                    paymentCol.Add(paymentCodeType);
                    if (paymentCodeType == BuyerPaymentMethodCodeType.PayPal && this.paypalEmailTextBox.Text != string.Empty)
                    {
                        item.PayPalEmailAddress = this.paypalEmailTextBox.Text;
                    }
                }
            }

            item.PaymentMethods = paymentCol;
        }
Ejemplo n.º 6
0
        //set PaymentMethods
        private void setPaymentMethods(ItemType item)
        {
            BuyerPaymentMethodCodeTypeCollection paymentCol=new BuyerPaymentMethodCodeTypeCollection();
            foreach(ListItem li in cblPaymentMethod.Items)
            {
                if (li.Selected)
                {
                    BuyerPaymentMethodCodeType paymentCodeType = (BuyerPaymentMethodCodeType)Enum.Parse(typeof(BuyerPaymentMethodCodeType),li.Value,false);
                    paymentCol.Add(paymentCodeType);
                    if (paymentCodeType==BuyerPaymentMethodCodeType.PayPal && txtPaypalAccount.Text!=string.Empty)
                    {
                        item.PayPalEmailAddress=txtPaypalAccount.Text;
                    }
                }
            }

            item.PaymentMethods=paymentCol;
        }
Ejemplo n.º 7
0
        //hard code some payment methods
        private void setPaymentMethods(ItemType item)
        {
            BuyerPaymentMethodCodeTypeCollection paymentMethods=new BuyerPaymentMethodCodeTypeCollection();

            if(defaultPayMethods.Contains(BuyerPaymentMethodCodeType.PayPal))
            {
                paymentMethods.Add(BuyerPaymentMethodCodeType.PayPal);
                item.PayPalEmailAddress="*****@*****.**";
            }

            if(defaultPayMethods.Contains(BuyerPaymentMethodCodeType.VisaMC))
            {
                paymentMethods.Add(BuyerPaymentMethodCodeType.VisaMC);
            }

            if(defaultPayMethods.Contains(BuyerPaymentMethodCodeType.CashOnPickup))
            {
                paymentMethods.Add(BuyerPaymentMethodCodeType.CashOnPickup);
            }

            item.PaymentMethods=paymentMethods;
        }
Ejemplo n.º 8
0
        //set PaymentMethods
        private void setPaymentMethods(ItemType item)
        {
            BuyerPaymentMethodCodeTypeCollection paymentCol = new BuyerPaymentMethodCodeTypeCollection();
            foreach (CheckBox cb in this.paymentMethodTableLayoutPanel.Controls)
            {
                if (cb.Checked)
                {
                    BuyerPaymentMethodCodeType paymentCodeType = (BuyerPaymentMethodCodeType)Enum.Parse(typeof(BuyerPaymentMethodCodeType), cb.Name, false);
                    paymentCol.Add(paymentCodeType);
                    if (paymentCodeType == BuyerPaymentMethodCodeType.PayPal && this.paypalEmailTextBox.Text != string.Empty)
                    {
                        item.PayPalEmailAddress = this.paypalEmailTextBox.Text;
                    }
                }
            }

            item.PaymentMethods = paymentCol ;
        }