protected internal String ToXMLFragment()
{
StringBuilder xml = new StringBuilder();
if (IsSetMerchantId()) {
xml.Append("<MerchantId>");
xml.Append(EscapeXML(this.MerchantId));
xml.Append("</MerchantId>");
}
if (IsSetOwningMerchantId()) {
xml.Append("<OwningMerchantId>");
xml.Append(EscapeXML(this.OwningMerchantId));
xml.Append("</OwningMerchantId>");
}
if (IsSetPromotionId()) {
xml.Append("<PromotionId>");
xml.Append(EscapeXML(this.PromotionId));
xml.Append("</PromotionId>");
}
if (IsSetPromotionCategory()) {
xml.Append("<PromotionCategory>");
xml.Append(EscapeXML(this.PromotionCategory));
xml.Append("</PromotionCategory>");
}
if (IsSetMerchantPromotionId()) {
xml.Append("<MerchantPromotionId>");
xml.Append(EscapeXML(this.MerchantPromotionId));
xml.Append("</MerchantPromotionId>");
}
if (IsSetGroupClaimCode()) {
xml.Append("<GroupClaimCode>");
xml.Append(EscapeXML(this.GroupClaimCode));
xml.Append("</GroupClaimCode>");
}
if (IsSetCouponCombinationType()) {
xml.Append("<CouponCombinationType>");
xml.Append(EscapeXML(this.CouponCombinationType));
xml.Append("</CouponCombinationType>");
}
if (IsSetStartDate()) {
xml.Append("<StartDate>");
xml.Append(EscapeXML(this.StartDate));
xml.Append("</StartDate>");
}
if (IsSetEndDate()) {
xml.Append("<EndDate>");
xml.Append(EscapeXML(this.EndDate));
xml.Append("</EndDate>");
}
if (IsSetTermsAndConditions()) {
xml.Append("<TermsAndConditions>");
xml.Append(EscapeXML(this.TermsAndConditions));
xml.Append("</TermsAndConditions>");
}
if (IsSetEligibilityRequirements()) {
PromotionEligibilityRequirements eligibilityRequirements = this.EligibilityRequirements;
xml.Append("<EligibilityRequirements>");
xml.Append(eligibilityRequirements.ToXMLFragment());
xml.Append("</EligibilityRequirements>");
}
if (IsSetBenefits()) {
PromotionBenefits benefits = this.Benefits;
xml.Append("<Benefits>");
xml.Append(benefits.ToXMLFragment());
xml.Append("</Benefits>");
}
if (IsSetItemApplicability()) {
PromotionItemApplicability itemApplicability = this.ItemApplicability;
xml.Append("<ItemApplicability>");
xml.Append(itemApplicability.ToXMLFragment());
xml.Append("</ItemApplicability>");
}
if (IsSetMerchandisingMessage()) {
xml.Append("<MerchandisingMessage>");
xml.Append(EscapeXML(this.MerchandisingMessage));
xml.Append("</MerchandisingMessage>");
}
return xml.ToString();
}