public NameValueListTypeCollection GetItemSpecifics(IWheel wheel) { var result = new NameValueListTypeCollection(); result.Add(GetSingleItemSpecific("Reifenhersteller", wheel.Manufactorer)); result.Add(GetSingleItemSpecific("Hersteller-Artikelnummer", wheel.ArticleId)); result.Add(GetSingleItemSpecific("Reifenspezifikation", GetWheelSpecification(wheel))); result.Add(GetSingleItemSpecific("Reifenbreite", wheel.WheelWidth.ToString())); result.Add(GetSingleItemSpecific("Reifenquerschnitt", wheel.WheelHeight.ToString())); result.Add(GetSingleItemSpecific("Zollgröße", wheel.CrossSection.Replace('R', ' '))); result.Add(GetSingleItemSpecific("Tragfähigkeitsindex", wheel.WeightIndex.ToString())); result.Add(GetSingleItemSpecific("Geschwindigkeitsindex", wheel.SpeedIndex.ToString())); result.Add(GetSingleItemSpecific("Winterreifen (Ja/Nein)", wheel.IsWinter ? "Ja" : "Nein")); result.Add(GetSingleItemSpecific("Reifengröße", GetWheelSize(wheel))); return result; }
public NameValueListTypeCollection GetItemSpecifics(IWheel wheel) { var result = new NameValueListTypeCollection(); result.Add(GetSingleItemSpecific("Reifenhersteller", wheel.Manufactorer)); result.Add(GetSingleItemSpecific("Hersteller-Artikelnummer", wheel.ArticleId)); result.Add(GetSingleItemSpecific("Reifenspezifikation", GetWheelSpecification(wheel))); result.Add(GetSingleItemSpecific("Reifenbreite", wheel.WheelWidth.ToString())); result.Add(GetSingleItemSpecific("Reifenquerschnitt", wheel.WheelHeight.ToString())); result.Add(GetSingleItemSpecific("Zollgröße", wheel.CrossSection.Replace('R', ' '))); result.Add(GetSingleItemSpecific("Tragfähigkeitsindex", wheel.WeightIndex.ToString())); result.Add(GetSingleItemSpecific("Geschwindigkeitsindex", wheel.SpeedIndex.ToString())); result.Add(GetSingleItemSpecific("Winterreifen (Ja/Nein)", wheel.IsWinter ? "Ja" : "Nein")); result.Add(GetSingleItemSpecific("Reifengröße", GetWheelSize(wheel))); return(result); }
/// <summary> /// Build sample item specifics /// </summary> /// <returns>ItemSpecifics object</returns> private NameValueListTypeCollection buildItemSpecifics(string sneakerID) { //create the content of item specifics NameValueListTypeCollection nvCollection = new NameValueListTypeCollection(); NameValueListType nv0 = new NameValueListType(); nv0.Name = "Code"; StringCollection nv0Col = new StringCollection(); String[] strArr0 = new string[] { sneakerID }; nv0Col.AddRange(strArr0); nv0.Value = nv0Col; NameValueListType nv1 = new NameValueListType(); nv1.Name = "Name"; StringCollection nv1Col = new StringCollection(); String[] strArr1 = new string[] { SQLConnect.Select("Select ShoeName from Shoe where ShoeID = '" + sneakerID + "';") }; nv1Col.AddRange(strArr1); nv1.Value = nv1Col; NameValueListType nv2 = new NameValueListType(); nv2.Name = "Size"; StringCollection nv2Col = new StringCollection(); String[] strArr2 = new string[] { SQLConnect.Select("Select Size from Shoe where ShoeID = '" + sneakerID + "';") }; nv2Col.AddRange(strArr2); nv2.Value = nv2Col; NameValueListType nv3 = new NameValueListType(); nv3.Name = "Color"; StringCollection nv3Col = new StringCollection(); String[] strArr3 = new string[] { SQLConnect.Select("Select Color from Shoe where ShoeID = '" + sneakerID + "';") }; nv3Col.AddRange(strArr3); nv3.Value = nv3Col; nvCollection.Add(nv0); nvCollection.Add(nv1); nvCollection.Add(nv1); nvCollection.Add(nv3); return(nvCollection); }
private void Post(NameValueCollection request) { try { NameValueListTypeCollection nvCol = GetAllCustomItemSpecificsNameValue(request); this.controller.CategoryFacade.ItemSpecificsCache = nvCol; this.Hide(); ReturnPolicyForm returnPolicyForm = controller.FormTable[AttributesController.RETURN_POLICY_FORM] as ReturnPolicyForm; returnPolicyForm.InitializeReturnPolicy(); returnPolicyForm.Show(); returnPolicyForm.BringToFront(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void AddProductVariants(product p) { // only add if there's more than 1 variant if (p.product_variants.Count > 1) { foreach (var entry in p.product_variants) { var variant = new VariationType { SKU = entry.sku, Quantity = ebayProduct.quantity }; var variants = new NameValueListTypeCollection(); if (!string.IsNullOrEmpty(entry.color)) { variants.Add(new NameValueListType() { Name = "color", Value = new StringCollection(new[] { entry.color }) }); } if (!string.IsNullOrEmpty(entry.size)) { variants.Add(new NameValueListType() { Name = "size", Value = new StringCollection(new[] { entry.size }) }); } variant.VariationSpecifics = variants; service.AddProductVariant(variant); } } }
/// <summary> /// Specify custom item specify /// </summary> /// <returns></returns> private NameValueListTypeCollection getCIS() { NameValueListTypeCollection list = new NameValueListTypeCollection(); StringCollection tmp = new StringCollection(); NameValueListType nameValue1 = new NameValueListType(); nameValue1.Name = "test specifics(add name1)"; tmp.Add("test specifics(add value1)"); nameValue1.Value = tmp; NameValueListType nameValue2 = new NameValueListType(); nameValue2.Name = "test specifics(add name2)"; tmp.Clear(); tmp.Add("test specifics(add value2)"); nameValue2.Value = tmp; list.Add(nameValue1); list.Add(nameValue2); return(list); }
private NameValueListTypeCollection GetAllCustomItemSpecificsNameValue(NameValueCollection request) { NameValueListTypeCollection atts = new NameValueListTypeCollection(); NameValueListType nvList; foreach (string key in request.AllKeys) { int index; index = key.IndexOf(EBAY_CUSTOM_ITEM_SPECIFICS_NAME); if (index >= 0 && request[key] != string.Empty) { string suffix = key.Substring(index + EBAY_CUSTOM_ITEM_SPECIFICS_NAME.Length); nvList = new NameValueListType(); nvList.Name = request[EBAY_CUSTOM_ITEM_SPECIFICS_NAME_CACHE + suffix]; eBay.Service.Core.Soap.StringCollection strCol = new eBay.Service.Core.Soap.StringCollection(); strCol.Add(request[key]); nvList.Value = strCol; atts.Add(nvList); continue; } index = key.IndexOf(CUSTOME_ITEM_SPECIFICS_VALUE); if (index >= 0 && request[key] != string.Empty) { string suffix = key.Substring(index + CUSTOME_ITEM_SPECIFICS_VALUE.Length); nvList = new NameValueListType(); nvList.Name = request[CUSTOME_ITEM_SPECIFICS_NAME + suffix]; eBay.Service.Core.Soap.StringCollection strCol = new eBay.Service.Core.Soap.StringCollection(); strCol.Add(request[key]); nvList.Value = strCol; atts.Add(nvList); continue; } } return(atts); }
/// <summary> /// Build sample item specifics /// </summary> /// <returns>ItemSpecifics object</returns> static NameValueListTypeCollection buildItemSpecifics() { //create the content of item specifics NameValueListTypeCollection nvCollection = new NameValueListTypeCollection(); NameValueListType nv1 = new NameValueListType(); nv1.Name = "Platform"; StringCollection nv1Col = new StringCollection(); String[] strArr1 = new string[] { "Microsoft Xbox 360" }; nv1Col.AddRange(strArr1); nv1.Value = nv1Col; NameValueListType nv2 = new NameValueListType(); nv2.Name = "Genre"; StringCollection nv2Col = new StringCollection(); String[] strArr2 = new string[] { "Simulation" }; nv2Col.AddRange(strArr2); nv2.Value = nv2Col; nvCollection.Add(nv1); nvCollection.Add(nv2); return(nvCollection); }
/// <summary> /// Enables users to add, replace, and delete My eBay notes for /// items that are being tracked in the My eBay All Selling and /// All Buying areas. /// </summary> /// /// <param name="ItemID"> /// ID of the item to which the My eBay note will be /// attached. Notes can only be added to items that are /// currently being tracked in My eBay. /// </param> /// /// <param name="Action"> /// The seller must include this field and set it to 'AddOrUpdate' to add a new /// user note or update an existing user note, or set it to 'Delete' to delete a /// an existing user note. /// </param> /// /// <param name="NoteText"> /// Text of the note. Maximum 250 characters. Required only /// if the Action is <b>AddOrUpdate</b>. This note text will /// completely replace any existing My eBay note for the /// specified item. /// </param> /// /// <param name="TransactionID"> /// Unique identifier for the order line item (transaction) to which the My /// eBay note will be attached. Notes can only be added to order line items /// that are currently being tracked in My eBay. Buyers can /// view user notes made on order line items in the /// <b>PrivateNotes</b> field of the <b>WonList</b> container in <b>GetMyeBayBuying</b>, and /// sellers can view user notes made on order line items in /// the <b>PrivateNotes</b> field of the <b>SoldList</b> and <b>DeletedFromSoldList</b> /// containers in <b>GetMyeBaySellinging</b>. /// </param> /// /// <param name="VariationSpecificList"> /// Container consisting of name-value pairs that identify (match) one /// variation within a fixed-price, multi-variation listing. The specified /// name-value pair(s) must exist in the listing specified by either the /// <b>ItemID</b> or <b>SKU</b> values specified in the request. If a specific order line /// item is targeted in the request with an /// <b>ItemID</b>/<b>TransactionID</b> pair or an <b>OrderLineItemID</b> value, any specified /// <b>VariationSpecifics</b> container is ignored by the call. /// </param> /// /// <param name="SKU"> /// SKU value of the item variation to which the My eBay note will be /// attached. Notes can only be added to items that are currently being /// tracked in My eBay. A SKU (stock keeping unit) value is defined by and /// used by the seller to identify a variation within a fixed-price, multi- /// variation listing. The SKU value is assigned to a variation of an item /// through the <b>Variations.Variation.SKU</b> element. /// /// /// This field can only be used if the <b>Item.InventoryTrackingMethod</b> field /// (set with the <b>AddFixedPriceItem</b> or <b>RelistFixedPriceItem</b> calls) is set to /// SKU. /// /// /// If a specific order line item is targeted in the request /// with an <b>ItemID</b>/<b>TransactionID</b> pair or an <b>OrderLineItemID</b> value, any /// specified <b>SKU</b> is ignored by the call. /// </param> /// /// <param name="OrderLineItemID"> /// A unique identifier for an eBay order line item. This field is created as /// soon as there is a commitment to buy from the seller, and its value is /// based upon the concatenation of <b>ItemID</b> and <b>TransactionID</b>, with a hyphen in /// between these two IDs. <b>OrderLineItemID</b> can be used in the input instead of /// an <b>ItemID</b>/<b>TransactionID</b> pair to identify an order line item. /// /// /// Notes can only be added to order line items that are currently being /// tracked in My eBay. Buyers can view user notes made on order line items in /// the <b>PrivateNotes</b> field of the <b>WonList</b> container in <b>GetMyeBayBuying</b>, and /// sellers can view user notes made on order line items in the <b>PrivateNotes</b> /// field of the <b>SoldList</b> and <b>DeletedFromSoldList</b> containers in /// <b>GetMyeBaySellinging</b>. /// </param> /// public void SetUserNotes(string ItemID, SetUserNotesActionCodeType Action, string NoteText, string TransactionID, NameValueListTypeCollection VariationSpecificList, string SKU, string OrderLineItemID) { this.ItemID = ItemID; this.Action = Action; this.NoteText = NoteText; this.TransactionID = TransactionID; this.VariationSpecificList = VariationSpecificList; this.SKU = SKU; this.OrderLineItemID = OrderLineItemID; Execute(); }
/// <summary> /// Retrieves item data such as title, description, price information, seller information, and so on, for the specified <b>ItemID</b>. <b>Also for Half.com</b>. /// </summary> /// /// <param name="ItemID"> /// Specifies the <b>ItemID</b> that uniquely identifies the item listing for which /// to retrieve the data. /// /// <b>ItemID</b> is a required input in most cases. <b>SKU</b> can be used instead in certain /// cases (see the description of SKU). If both <b>ItemID</b> and <b>SKU</b> are specified for /// items where the inventory tracking method is <b>ItemID</b>, <b>ItemID</b> takes precedence. /// </param> /// /// <param name="IncludeWatchCount"> /// Indicates if the caller wants to include watch count for that item in the /// response. You must be the seller of the item to retrieve the watch count. /// </param> /// /// <param name="IncludeCrossPromotion"> /// This field is deprecated. /// </param> /// /// <param name="IncludeItemSpecifics"> /// If <code>true</code>, the response returns the <b>ItemSpecifics</b> node /// (if the listing has custom Item Specifics). /// /// Item Specifics are well-known aspects of items in a given /// category. For example, items in a washer and dryer category /// might have an aspect like Type=Top-Loading; whereas /// items in a jewelry category might have an aspect like /// Gemstone=Amber. /// /// Including this field set to <code>true</code> also returns the <strong>UnitInfo</strong> node, which enables European Union sellers to provide the required price-per-unit information so buyers can accurately compare prices for certain types of products. /// <br/><br/> /// (This does not cause the response to include ID-based /// attributes. To also retrieve ID-based attributes, /// pass <b>DetailLevel</b> in the request with the value /// <b>ItemReturnAttributes</b> or <b>ReturnAll</b>.) /// </param> /// /// <param name="IncludeTaxTable"> /// If true, an associated tax table is returned in the response. /// If no tax table is associated with the item, then no /// tax table is returned, even if <b>IncludeTaxTable</b> is set to true. /// </param> /// /// <param name="SKU"> /// Retrieves an item that was listed by the user identified /// in AuthToken and that is being tracked by this SKU. /// /// A SKU (stock keeping unit) is an identifier defined by a seller. /// Some sellers use SKUs to track complex flows of products /// and information on the client side. /// eBay preserves the SKU on the item, enabling you /// to obtain it before and after an order line item is created. /// (SKU is recommended as an alternative to /// ApplicationData.) /// /// In <b>GetItem</b>, <b>SKU</b> can only be used to retrieve one of your /// own items, where you listed the item by using <b>AddFixedPriceItem</b> /// or <b>RelistFixedPriceItem</b>, /// and you set <b>Item.InventoryTrackingMethod</b> to <b>SKU</b> at /// the time the item was listed. (These criteria are necessary to /// uniquely identify the listing by a SKU.) /// /// Either <b>ItemID</b> or <b>SKU</b> is required in the request. /// If both are passed, they must refer to the same item, /// and that item must have <b>InventoryTrackingMethod</b> set to <b>SKU</b>. /// </param> /// /// <param name="VariationSKU"> /// Variation-level SKU that uniquely identifies a Variation within /// the listing identified by <b>ItemID</b>. Only applicable when the /// seller listed the item with Variation-level SKU (<b>Variation.SKU</b>) /// values. Retrieves all the usual <b>Item</b> fields, but limits the /// <b>Variations</b> content to the specified Variation. /// If not specified, the response includes all Variations. /// </param> /// /// <param name="VariationSpecificList"> /// Name-value pairs that identify one or more Variations within the /// listing identified by <b>ItemID</b>. Only applicable when the seller /// listed the item with Variations. Retrieves all the usual <b>Item</b> /// fields, but limits the Variations content to the specified /// Variation(s). If the specified pairs do not match any Variation, /// eBay returns all Variations. /// /// To retrieve only one variation, specify the full set of /// name/value pairs that match all the name-value pairs of one /// Variation. /// /// To retrieve multiple variations (using a wildcard), /// specify one or more name/value pairs that partially match the /// desired variations. For example, if the listing contains /// Variations for shirts in different colors and sizes, specify /// Color as Red (and no other name/value pairs) to retrieve /// all the red shirts in all sizes (but no other colors). /// </param> /// /// <param name="TransactionID"> /// A unique identifier for an order line item (transaction). An order line item is created /// when a buyer commits to purchasing an item. /// /// Since you can change active multiple-quantity fixed-price listings even /// after one of the items has been purchased, the <b>TransactionID</b> is /// associated with a snapshot of the item data at the time of the purchase. /// /// After one item in a multi-quantity listing has been sold, sellers can not /// change the values in the Title, Primary Category, Secondary Category, /// Listing Duration, and Listing Type fields. However, all other fields are /// editable. /// /// Specifying a <b>TransactionID</b> in the <b>GetItem</b> request allows you to retrieve /// a snapshot of the listing as it was when the order line item was created. /// </param> /// /// <param name="IncludeItemCompatibilityList"> /// This field is used to specify whether to retrieve Parts Compatibility information. If <code>true</code>, any compatible applications associated with the item will be returned in the response (<b class="con"> Item.ItemCompatibilityList</b>). If no compatible applications have been specified for the item, no item compatibilities will be returned. /// /// If <code>false</code> or not specified, the response will return a compatibility count (<b>ItemCompatibilityCount</b>) when parts compatibilities have been specified for the item. /// /// Parts Compatibility is supported in limited Parts & Accessories categories, for the eBay US Motors (100), UK (3), AU (15) and DE (77) sites only. /// </param> /// public ItemType GetItem(string ItemID, bool IncludeWatchCount, bool IncludeCrossPromotion, bool IncludeItemSpecifics, bool IncludeTaxTable, string SKU, string VariationSKU, NameValueListTypeCollection VariationSpecificList, string TransactionID, bool IncludeItemCompatibilityList) { this.ItemID = ItemID; this.IncludeWatchCount = IncludeWatchCount; this.IncludeCrossPromotion = IncludeCrossPromotion; this.IncludeItemSpecifics = IncludeItemSpecifics; this.IncludeTaxTable = IncludeTaxTable; this.SKU = SKU; this.VariationSKU = VariationSKU; this.VariationSpecificList = VariationSpecificList; this.TransactionID = TransactionID; this.IncludeItemCompatibilityList = IncludeItemCompatibilityList; Execute(); return(ApiResponse.Item); }
/// <summary> /// Enables the authenticated user to make a bid, a Best Offer, or /// a purchase on the item specified by the ItemID input field. /// </summary> /// /// <param name="Offer"> /// Specifies the type of offer being made. If the item is a /// competitive-bidding listing, the offer is a bid. If the item is a /// fixed-price listing, then the offer purchases the item. If the item is a /// competitive-bidding listing and the offer is of type with an active, /// unexercised Buy It Now option, then the offer can either purchase the /// item or be a bid. See the schema documentation for OfferType for details /// on its properties and their meanings. /// </param> /// /// <param name="ItemID"> /// Unique item ID that identifies the item listing for which the action is being /// submitted. /// /// If the item was listed with Variations, you must also specify /// VariationSpecifics in the request to uniquely identify the /// variant being purchased. /// </param> /// /// <param name="BlockOnWarning"> /// If a warning message exists and BlockOnWarning is true, /// the warning message is returned and the bid is blocked. If no warning message /// exists and BlockOnWarning is true, the bid is placed. If BlockOnWarning /// is false, the bid is placed, regardless of warning. /// </param> /// /// <param name="AffiliateTrackingDetails"> /// Container for affiliate-related tags, which enable the tracking of user /// activity. If you include AffiliateTrackingDetails in your PlaceOffer call, then /// it is possible to receive affiliate commissions based on calls made by your /// application. (See the <a href= /// "http://www.ebaypartnernetwork.com/" target="_blank">eBay Partner Network</a> /// for information about commissions.) Please note that affiliate tracking is not /// available in the Sandbox environment, and that affiliate tracking is not /// available when you make a best offer. /// </param> /// /// <param name="VariationSpecificList"> /// Name-value pairs that identify a single variation within the /// listing identified by ItemID. Required when the seller /// listed the item with Item Variations. /// /// If you want to buy items from multiple variations in the same /// listing, use a separate PlaceOffer request for each variation. /// For example, if you want to buy 3 red shirts and 2 black shirts /// from the same listing, use one PlaceOffer request for the /// 3 red shirts, and another PlaceOffer request for the 2 /// black shirts. /// </param> /// public SellingStatusType PlaceOffer(OfferType Offer, string ItemID, bool BlockOnWarning, AffiliateTrackingDetailsType AffiliateTrackingDetails, NameValueListTypeCollection VariationSpecificList) { this.Offer = Offer; this.ItemID = ItemID; this.BlockOnWarning = BlockOnWarning; this.AffiliateTrackingDetails = AffiliateTrackingDetails; this.VariationSpecificList = VariationSpecificList; Execute(); return(ApiResponse.SellingStatus); }
/// <summary> /// Build sample item Variations /// </summary> /// <returns>Variations object</returns> static VariationsType buildVariationsType() { // listing variations VariationsType variations = new VariationsType(); // first variation VariationType variation1 = new VariationType(); // create the content of VariationSpecifics NameValueListTypeCollection nvcol1 = new NameValueListTypeCollection(); NameValueListType nv11 = new NameValueListType(); nv11.Name = "Color"; StringCollection nv1StrCol = new StringCollection(); String[] strArr1 = new string[] { "RED" }; nv1StrCol.AddRange(strArr1); nv11.Value = nv1StrCol; NameValueListType nv12 = new NameValueListType(); nv12.Name = "Size"; StringCollection nv2StrCol = new StringCollection(); String[] strArr2 = new string[] { "M" }; nv2StrCol.AddRange(strArr2); nv12.Value = nv2StrCol; nvcol1.Add(nv11); nvcol1.Add(nv12); // set variation-level specifics for first variation variation1.VariationSpecifics = nvcol1; // set start price AmountType amount1 = new AmountType(); amount1.Value = 100; amount1.currencyID = CurrencyCodeType.USD; variation1.StartPrice = amount1; // set quantity variation1.Quantity = 10; // set variation name variation1.VariationTitle = "RED,M"; // second variation VariationType variation2 = new VariationType(); // create the content of specifics for each variation NameValueListTypeCollection nvcol2 = new NameValueListTypeCollection(); NameValueListType nv21 = new NameValueListType(); nv21.Name = "Color"; StringCollection nv21StrCol = new StringCollection(); String[] strArr21 = new string[] { "BLACK" }; nv21StrCol.AddRange(strArr21); nv21.Value = nv21StrCol; NameValueListType nv22 = new NameValueListType(); nv22.Name = "Size"; StringCollection nv22StrCol = new StringCollection(); String[] strArr22 = new string[] { "L" }; nv22StrCol.AddRange(strArr22); nv22.Value = nv22StrCol; nvcol2.Add(nv21); nvcol2.Add(nv22); // set variation-level specifics for first variation variation2.VariationSpecifics = nvcol2; // set start price AmountType amount2 = new AmountType(); amount2.Value = 110; amount2.currencyID = CurrencyCodeType.USD; variation2.StartPrice = amount2; // set quantity variation2.Quantity = 20; // set variation name variation2.VariationTitle = "BLACK,L"; // set variation VariationTypeCollection varCol = new VariationTypeCollection(); varCol.Add(variation1); varCol.Add(variation2); variations.Variation = varCol; // create the content of specifics for variations NameValueListTypeCollection nvcol3 = new NameValueListTypeCollection(); NameValueListType nv31 = new NameValueListType(); nv31.Name = "Color"; StringCollection nv31StrCol = new StringCollection(); String[] strArr31 = new string[] { "BLACK", "RED" }; nv31StrCol.AddRange(strArr31); nv31.Value = nv31StrCol; NameValueListType nv32 = new NameValueListType(); nv32.Name = "Size"; StringCollection nv32StrCol = new StringCollection(); String[] strArr32 = new string[] { "M", "L" }; nv32StrCol.AddRange(strArr32); nv32.Value = nv32StrCol; nvcol3.Add(nv31); nvcol3.Add(nv32); // set variationSpecifics variations.VariationSpecificsSet = nvcol3; return(variations); }
/// <summary> /// Enables users to add, replace, and delete My eBay notes for /// items that are being tracked in the My eBay All Selling and /// All Buying areas. /// </summary> /// /// <param name="ItemID"> /// ID of the item to which the My eBay note will be /// attached. Notes can only be added to items that are /// currently being tracked in My eBay. /// </param> /// /// <param name="Action"> /// Specifies whether to add/update the note or delete. /// </param> /// /// <param name="NoteText"> /// Text of the note. Maximum 250 characters. Required only /// if the Action is AddOrUpdate. This note text will /// completely replace any existing My eBay note for the /// specified item. /// </param> /// /// <param name="TransactionID"> /// ID of the transaction to which the My eBay note will be /// attached. Notes can only be added to transactions that are /// currently being tracked in My eBay. /// You can see it in the Won list of GetMyeBayBuying if you are the buyer. /// You can see it from Sold list of GetMyeBaySelling if you are the seller. /// </param> /// /// <param name="VariationSpecificList"> /// Name-value pairs that identify (match) one variation within the /// listing identified by ItemID. Ignored if used in combination /// with TransactionID. /// </param> /// /// <param name="SKU"> /// Variation-level SKU that uniquely identifes a variation within /// the listing identified by ItemID. Only applicable when the /// seller listed the item with variation-level SKU (Variation.SKU) /// values. Retrieves all the usual Item fields, but limits the /// Variations content to the specified variation. /// /// As buyers should not know a variation's SKU, this field should /// only be used when the item's seller is setting a note on the /// variation. /// /// Ignored if used in combination with TransactionID. /// </param> /// public void SetUserNotes(string ItemID, SetUserNotesActionCodeType Action, string NoteText, string TransactionID, NameValueListTypeCollection VariationSpecificList, string SKU) { this.ItemID = ItemID; this.Action = Action; this.NoteText = NoteText; this.TransactionID = TransactionID; this.VariationSpecificList = VariationSpecificList; this.SKU = SKU; Execute(); }
private NameValueListTypeCollection GetAllCustomItemSpecificsNameValue(NameValueCollection request) { NameValueListTypeCollection atts = new NameValueListTypeCollection(); NameValueListType nvList; foreach (string key in request.AllKeys) { int index; index = key.IndexOf(EBAY_CUSTOM_ITEM_SPECIFICS_NAME); if (index >= 0 && request[key] != string.Empty) { string suffix = key.Substring(index + EBAY_CUSTOM_ITEM_SPECIFICS_NAME.Length); nvList = new NameValueListType(); nvList.Name = request[EBAY_CUSTOM_ITEM_SPECIFICS_NAME_CACHE + suffix]; eBay.Service.Core.Soap.StringCollection strCol = new eBay.Service.Core.Soap.StringCollection(); strCol.Add(request[key]); nvList.Value = strCol; atts.Add(nvList); continue; } index = key.IndexOf(CUSTOME_ITEM_SPECIFICS_VALUE); if (index >= 0 && request[key] != string.Empty) { string suffix = key.Substring(index + CUSTOME_ITEM_SPECIFICS_VALUE.Length); nvList = new NameValueListType(); nvList.Name = request[CUSTOME_ITEM_SPECIFICS_NAME + suffix]; eBay.Service.Core.Soap.StringCollection strCol = new eBay.Service.Core.Soap.StringCollection(); strCol.Add(request[key]); nvList.Value = strCol; atts.Add(nvList); continue; } } return atts; }
/// <summary> /// Build sample item specifics /// </summary> /// <returns>ItemSpecifics object</returns> static NameValueListTypeCollection buildItemSpecifics() { //create the content of item specifics NameValueListTypeCollection nvCollection = new NameValueListTypeCollection(); NameValueListType nv1 = new NameValueListType(); nv1.Name = "Platform"; StringCollection nv1Col = new StringCollection(); String[] strArr1 = new string[] { "Microsoft Xbox 360" }; nv1Col.AddRange(strArr1); nv1.Value = nv1Col; NameValueListType nv2 = new NameValueListType(); nv2.Name = "Genre"; StringCollection nv2Col = new StringCollection(); String[] strArr2 = new string[] { "Simulation" }; nv2Col.AddRange(strArr2); nv2.Value = nv2Col; nvCollection.Add(nv1); nvCollection.Add(nv2); return nvCollection; }
/// <summary> /// Specify custom item specify /// </summary> /// <returns></returns> private NameValueListTypeCollection getCIS() { NameValueListTypeCollection list = new NameValueListTypeCollection(); StringCollection tmp=new StringCollection(); NameValueListType nameValue1=new NameValueListType(); nameValue1.Name="test specifics(add name1)"; tmp.Add("test specifics(add value1)"); nameValue1.Value=tmp; NameValueListType nameValue2=new NameValueListType(); nameValue2.Name="test specifics(add name2)"; tmp.Clear(); tmp.Add("test specifics(add value2)"); nameValue2.Value=tmp; list.Add(nameValue1); list.Add(nameValue2); return list; }
/// <summary> /// Returns item data (title, description, price information, seller information, and so on) /// for the specified item ID. /// </summary> /// /// <param name="ItemID"> /// Specifies the item ID that uniquely identifies the item listing for which /// to retrieve the data. /// /// ItemID is a required input in most cases. SKU can be used instead in certain /// cases (see the description of SKU). If both ItemID and SKU are specified for /// items where the inventory tracking method is ItemID, ItemID takes precedence. /// </param> /// /// <param name="IncludeWatchCount"> /// Indicates if the caller wants to include watch count for that item in the /// response. You must be the seller of the item to retrieve the watch count. /// </param> /// /// <param name="IncludeCrossPromotion"> /// Specifies whether or not to include cross-promotion information for /// the item in the call response. /// /// With a request version of 485 or higher, the default is false (do not /// include cross-promotion details). Set to true to retrieve cross-promotion /// information for the item. Cross-promotion information is returned in /// Item.CrossPromotion.PromotedItem.PromotionDetails. /// A promoted item will now contain multiple PromotionDetails containers. /// /// With a request version lower than 485, the default is true (include /// cross-promotions). Set the value to false if you do not want to retrieve /// cross-promotion information. Cross-promotion information, PromotedPrice /// and PromotedPriceType, are returned in Item.CrossPromotion.PromotedItem. /// If a promoted item has multiple PromotedPriceType and PromotedPrice value /// pairs, only the last pair is returned. /// </param> /// /// <param name="IncludeItemSpecifics"> /// If true, the response returns the ItemSpecifics node /// (if the listing has custom Item Specifics). /// /// Item Specifics are well-known aspects of items in a given /// category. For example, items in a washer and dryer category /// might have an aspect like Type=Top-Loading; whereas /// items in a jewelry category might have an aspect like /// Gemstone=Amber. /// /// (This does not cause the response to include ID-based /// attributes. To also retrieve ID-based attributes, /// pass DetailLevel in the request with the value /// ItemReturnAttributes or ReturnAll.) /// </param> /// /// <param name="IncludeTaxTable"> /// If true, an associated tax table is returned in the response. /// If no tax table is associated with the item, then no /// tax table is returned, even if IncludeTaxTable is set to true. /// </param> /// /// <param name="SKU"> /// Retrieves an item that was listed by the user identified /// in AuthToken and that is being tracked by this SKU. /// /// A SKU (stock keeping unit) is an identifier defined by a seller. /// Some sellers use SKUs to track complex flows of products /// and information on the client side. /// eBay preserves the SKU on the item, enabling you /// to obtain it before and after a transaction is created. /// (SKU is recommended as an alternative to /// ApplicationData.) /// /// In GetItem, SKU can only be used to retrieve one of your /// own items, where you listed the item by using AddFixedPriceItem /// or RelistFixedPriceItem, /// and you set Item.InventoryTrackingMethod to SKU at /// the time the item was listed. (These criteria are necessary to /// uniquely identify the listing by a SKU.) /// /// Either ItemID or SKU is required in the request. /// If both are passed, they must refer to the same item, /// and that item must have InventoryTrackingMethod set to SKU. /// </param> /// /// <param name="VariationSKU"> /// Variation-level SKU that uniquely identifes a Variation within /// the listing identified by ItemID. Only applicable when the /// seller listed the item with Variation-level SKU (Variation.SKU) /// values. Retrieves all the usual Item fields, but limits the /// Variations content to the specified Variation. /// If not specified, the response includes all Variations. /// </param> /// /// <param name="VariationSpecificList"> /// Name-value pairs that identify one or more Variations within the /// listing identified by ItemID. Only applicable when the seller /// listed the item with Variations. Retrieves all the usual Item /// fields, but limits the Variations content to the specified /// Variation(s). If the specified pairs do not match any Variation, /// eBay returns all Variations. /// /// To retrieve only one variation, specify the full set of /// name/value pairs that match all the name-value pairs of one /// Variation. /// /// To retrieve multiple variations (using a wildcard), /// specify one or more name/value pairs that partially match the /// desired variations. For example, if the listing contains /// Variations for shirts in different colors and sizes, specify /// Color as Red (and no other name/value pairs) to retrieve /// all the red shirts in all sizes (but no other colors). /// </param> /// /// <param name="TransactionID"> /// Identifies a single transaction for a listing. A transaction begins when /// a winning bidder or buyer is determined, and ends when the buyer finishes /// the checkout process. /// /// Since you can change active multiple-quantity fixed price listings /// even after one of the items has been purchased, the transaction ID is associated /// with a snapshot of the item data at the time of the purchase. /// /// After one item in a multi-quantity listing has been sold, sellers can not change /// the values in the Title, Primary Category, Secondary Category, Listing Duration, /// and Listing Type fields. However, all other fields are editable. /// /// Specifying a TransactionID in the GetItemRequest allows you to retrieve /// a snapshot of the listing as it was when the transaction was created. /// </param> /// /// <param name="IncludeItemCompatibilityList"> /// This field is used for Parts Compatiblity, which is currently supported /// for limited categories in the Sandbox only. For more information, please /// see the <a /// href="http://developer.ebay.com/DevZone/XML/docs/WebHelp/ReleaseNotes.html#653PartsCompatibility" /// >release notes</a>. /// /// If true, any compatible applications associated with the item will be /// returned in the response (<b /// class="con">Item.ItemCompatibilityList</b>). If no compatible /// applications have been specified for the item, then no item /// compatibilities will be returned. /// /// If false or not specified, the response will return a compatibility count /// (ItemCompatibilityCount) when parts compatibilities have been specified /// for the item. /// </param> /// public ItemType GetItem(string ItemID, bool IncludeWatchCount, bool IncludeCrossPromotion, bool IncludeItemSpecifics, bool IncludeTaxTable, string SKU, string VariationSKU, NameValueListTypeCollection VariationSpecificList, string TransactionID, bool IncludeItemCompatibilityList) { this.ItemID = ItemID; this.IncludeWatchCount = IncludeWatchCount; this.IncludeCrossPromotion = IncludeCrossPromotion; this.IncludeItemSpecifics = IncludeItemSpecifics; this.IncludeTaxTable = IncludeTaxTable; this.SKU = SKU; this.VariationSKU = VariationSKU; this.VariationSpecificList = VariationSpecificList; this.TransactionID = TransactionID; this.IncludeItemCompatibilityList = IncludeItemCompatibilityList; Execute(); return ApiResponse.Item; }
/// <summary> /// Enables the authenticated user to to make a bid, a best offer, or /// a purchase on the item specified by the ItemID input field. /// </summary> /// /// <param name="Offer"> /// Specifies the type of offer being made. If the item is a /// competitive-bidding listing, the offer is a bid. If the item is a /// fixed-price listing, then the offer purchases the item. If the item is a /// competitive-bidding listing and the offer is of type with an active, /// unexercised Buy It Now option, then the offer can either purchase the /// item or be a bid. See the schema documentation for OfferType for details /// on its properties and their meanings. /// </param> /// /// <param name="ItemID"> /// Unique item ID that identifies the item listing for which the action is being /// submitted. /// /// If the item was listed with Variations, you must also specify /// VariationSpecifics in the request to uniquely identify the /// variant being purchased. /// </param> /// /// <param name="BlockOnWarning"> /// If a warning message exists and BlockOnWarning is true, /// the warning message is returned and the bid is blocked. If no warning message /// exists and BlockOnWarning is true, the bid is placed. If BlockOnWarning /// is false, the bid is placed, regardless of warning. /// </param> /// /// <param name="AffiliateTrackingDetails"> /// Container for affiliate-related tags, which enable the tracking of user /// activity. If you include AffiliateTrackingDetails in your PlaceOffer call, then /// it is possible to receive affiliate commissions based on calls made by your /// application. (See the <a href= /// "http://www.ebaypartnernetwork.com/" target="_blank">eBay Partner Network</a> /// for information about commissions.) Please note that affiliate tracking is not /// available in the Sandbox environment, and that affiliate tracking is not /// available when you make a best offer. /// </param> /// /// <param name="VariationSpecificList"> /// Name-value pairs that identify a single variation within the /// listing identified by ItemID. Required when the seller /// listed the item with Item Variations. /// /// If you want to buy items from multiple variations in the same /// listing, use a separate PlaceOffer request for each variation. /// For example, if you want to buy 3 red shirts and 2 black shirts /// from the same listing, use one PlaceOffer request for the /// 3 red shirts, and another PlaceOffer request for the 2 /// black shirts. /// </param> /// public SellingStatusType PlaceOffer(OfferType Offer, string ItemID, bool BlockOnWarning, AffiliateTrackingDetailsType AffiliateTrackingDetails, NameValueListTypeCollection VariationSpecificList) { this.Offer = Offer; this.ItemID = ItemID; this.BlockOnWarning = BlockOnWarning; this.AffiliateTrackingDetails = AffiliateTrackingDetails; this.VariationSpecificList = VariationSpecificList; Execute(); return ApiResponse.SellingStatus; }