PayPal.PayPalAPIInterfaceService.Model.BillOutstandingAmountReq.ToXMLString C# (CSharp) Method

ToXMLString() public method

public ToXMLString ( string prefix, string name ) : string
prefix string
name string
return string
        public string ToXMLString(string prefix, string name)
        {
            StringBuilder sb = new StringBuilder();
            if(name != null)
            {
                if(prefix != null)
                {
                    sb.Append("<").Append(prefix).Append(":").Append(name).Append(">");
                }
                else
                {
                    sb.Append("<").Append(PreferredPrefix).Append(":").Append(name).Append(">");
                }
            }
            if(BillOutstandingAmountRequest != null)
            {
                sb.Append(BillOutstandingAmountRequest.ToXMLString(null,"BillOutstandingAmountRequest"));
            }
            if (name != null)
            {
                if (prefix != null)
                {
                    sb.Append("</").Append(prefix).Append(":").Append(name).Append(">");
                }
                else
                {
                    sb.Append("</").Append(PreferredPrefix).Append(":").Append(name).Append(">");
                }
            }
            return sb.ToString();
        }

Usage Example

 /**
   *AUTO_GENERATED
  	  */
 public BillOutstandingAmountResponseType BillOutstandingAmount(BillOutstandingAmountReq billOutstandingAmountReq, string apiUserName)
 {
     setStandardParams(billOutstandingAmountReq.BillOutstandingAmountRequest);
     string response = Call("BillOutstandingAmount", billOutstandingAmountReq.ToXMLString(), apiUserName);
     XmlDocument xmlDocument = new XmlDocument();
     xmlDocument.LoadXml(response);
     XmlNode xmlNode = xmlDocument.SelectSingleNode("*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='BillOutstandingAmountResponse']");
     return new BillOutstandingAmountResponseType(xmlNode);
 }
All Usage Examples Of PayPal.PayPalAPIInterfaceService.Model.BillOutstandingAmountReq::ToXMLString