Esempio n. 1
0
 public override void ReadFragmentFrom(IMwsReader reader)
 {
     _identifiers         = reader.Read <IdentifierType>("Identifiers");
     _attributeSets       = reader.Read <AttributeSetList>("AttributeSets");
     _relationships       = reader.Read <RelationshipList>("Relationships");
     _competitivePricing  = reader.Read <CompetitivePricingType>("CompetitivePricing");
     _salesRankings       = reader.Read <SalesRankList>("SalesRankings");
     _lowestOfferListings = reader.Read <LowestOfferListingList>("LowestOfferListings");
     _offers = reader.Read <OffersList>("Offers");
 }
        /// <summary>
        /// XML fragment representation of this object
        /// </summary>
        /// <returns>XML fragment for this object.</returns>
        /// <remarks>
        /// Name for outer tag expected to be set by calling method.
        /// This fragment returns inner properties representation only
        /// </remarks>


        public String ToXMLFragment()
        {
            StringBuilder xml = new StringBuilder();

            if (IsSetIdentifiers())
            {
                IdentifierType identifiersObj = this.Identifiers;
                xml.Append("<Identifiers>");
                xml.Append(identifiersObj.ToXMLFragment());
                xml.Append("</Identifiers>");
            }
            if (IsSetAttributeSets())
            {
                AttributeSetList attributeSetsObj = this.AttributeSets;
                xml.Append("<AttributeSets>");
                xml.Append(attributeSetsObj.ToXMLFragment());
                xml.Append("</AttributeSets>");
            }
            if (IsSetRelationships())
            {
                RelationshipList relationshipsObj = this.Relationships;
                xml.Append("<Relationships>");
                xml.Append(relationshipsObj.ToXMLFragment());
                xml.Append("</Relationships>");
            }
            if (IsSetCompetitivePricing())
            {
                CompetitivePricingType competitivePricingObj = this.CompetitivePricing;
                xml.Append("<CompetitivePricing>");
                xml.Append(competitivePricingObj.ToXMLFragment());
                xml.Append("</CompetitivePricing>");
            }
            if (IsSetSalesRankings())
            {
                SalesRankList salesRankingsObj = this.SalesRankings;
                xml.Append("<SalesRankings>");
                xml.Append(salesRankingsObj.ToXMLFragment());
                xml.Append("</SalesRankings>");
            }
            if (IsSetLowestOfferListings())
            {
                LowestOfferListingList lowestOfferListingsObj = this.LowestOfferListings;
                xml.Append("<LowestOfferListings>");
                xml.Append(lowestOfferListingsObj.ToXMLFragment());
                xml.Append("</LowestOfferListings>");
            }
            if (IsSetOffers())
            {
                OffersList offersObj = this.Offers;
                xml.Append("<Offers>");
                xml.Append(offersObj.ToXMLFragment());
                xml.Append("</Offers>");
            }
            return(xml.ToString());
        }
Esempio n. 3
0
 /// <summary>
 /// Sets the CompetitivePricing property.
 /// </summary>
 /// <param name="competitivePricing">CompetitivePricing property.</param>
 /// <returns>this instance.</returns>
 public Product WithCompetitivePricing(CompetitivePricingType competitivePricing)
 {
     this._competitivePricing = competitivePricing;
     return(this);
 }
Esempio n. 4
0
 /// <summary>
 /// Sets the CompetitivePricing property
 /// </summary>
 /// <param name="competitivePricing">CompetitivePricing property</param>
 /// <returns>this instance</returns>
 public Product WithCompetitivePricing(CompetitivePricingType competitivePricing)
 {
     this.competitivePricingField = competitivePricing;
     return this;
 }
Esempio n. 5
0
 public override void ReadFragmentFrom(IMwsReader reader)
 {
     _identifiers = reader.Read<IdentifierType>("Identifiers");
     _attributeSets = reader.Read<AttributeSetList>("AttributeSets");
     _relationships = reader.Read<RelationshipList>("Relationships");
     _competitivePricing = reader.Read<CompetitivePricingType>("CompetitivePricing");
     _salesRankings = reader.Read<SalesRankList>("SalesRankings");
     _lowestOfferListings = reader.Read<LowestOfferListingList>("LowestOfferListings");
     _offers = reader.Read<OffersList>("Offers");
 }