Example #1
0
        private static void EndFixedPriceItem(string itemID)
        {
            //create the context
            ApiContext context = new ApiContext();

            //set the User token
            string token = AppSettingsHelper.Token;

            context.ApiCredential.eBayToken = token;

            //set the server url
            string endpoint = AppSettingsHelper.Endpoint;

            context.SoapApiServerUrl = endpoint;

            //enable logging
            context.ApiLogManager = new ApiLogManager();
            context.ApiLogManager.ApiLoggerList.Add(new FileLogger("log.txt", true, true, true));
            context.ApiLogManager.EnableLogging = true;

            //set the version
            context.Version = "817";
            context.Site    = SiteCodeType.US;

            EndFixedPriceItemCall endFP = new EndFixedPriceItemCall(context);

            endFP.ItemID       = itemID;
            endFP.EndingReason = EndReasonCodeType.NotAvailable;

            endFP.Execute();
            Console.WriteLine(endFP.ApiResponse.Ack + " Ended ItemID " + endFP.ItemID);
        }
        public void EndFixedPriceItem()
        {
            Assert.IsNotNull(TestData.NewFixedPriceItem, "Failed because no item available -- requires successful AddFixedPriceItem test");

            ItemType item             = TestData.NewFixedPriceItem;
            EndFixedPriceItemCall api = new EndFixedPriceItemCall(this.apiContext);

            // Set the item to be ended.
            api.ItemID       = item.ItemID;
            api.EndingReason = EndReasonCodeType.NotAvailable;
            api.Execute();

            //check whether the call is success.
            Assert.IsTrue(api.ApiResponse.Ack == AckCodeType.Success || api.ApiResponse.Ack == AckCodeType.Warning, "do not success!");
            TestData.EndedFixedPriceItem = TestData.NewFixedPriceItem;

            Assert.IsNotNull(TestData.EndedFixedPriceItem);
        }
Example #3
0
        // http://developer.ebay.com/devzone/xml/docs/reference/ebay/EndFixedPriceItem.html
        public void EndFixedPriceItem(string itemid, EndReasonCodeType reason)
        {
            var call = new EndFixedPriceItemCall(api);

            call.EndFixedPriceItem(itemid, reason, "");
        }
Example #4
0
        private void removeItem(string itemId, string SKU)
        {
            EndFixedPriceItemCall apiCall = new EndFixedPriceItemCall(context);

            apiCall.EndFixedPriceItem(itemId, EndReasonCodeType.OtherListingError, SKU);
        }