示例#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);
        }
示例#2
0
        public static ItemType BuildItemForBusinessPoliciesAPI()
        {
            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;

            // Picture details
            PictureDetailsType pictureDetails = new PictureDetailsType();

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

            item.PictureDetails = pictureDetails;

            // Seller Profiles
            SellerProfilesType sellerProfilesType = new SellerProfilesType();

            sellerProfilesType.SellerPaymentProfile  = GetSellerPaymentProfile();
            sellerProfilesType.SellerReturnProfile   = GetSellerReturnProfile();
            sellerProfilesType.SellerShippingProfile = GetSellerShippingProfile();

            item.SellerProfiles = sellerProfilesType;

            return(item);
        }
示例#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;
        }
示例#4
0
        public static ItemType BuildItemForBusinessPoliciesAPI()
        {
            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;

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

            // Seller Profiles
            SellerProfilesType sellerProfilesType = new SellerProfilesType();
            sellerProfilesType.SellerPaymentProfile = GetSellerPaymentProfile();
            sellerProfilesType.SellerReturnProfile = GetSellerReturnProfile();
            sellerProfilesType.SellerShippingProfile = GetSellerShippingProfile();

            item.SellerProfiles = sellerProfilesType;

            return item;
        }