Litle.Sdk.activateReversal.Serialize C# (CSharp) Method

Serialize() public method

public Serialize ( ) : string
return string
        public override string Serialize()
        {
            string xml = "\r\n<activateReversal";
            xml += " id=\"" + SecurityElement.Escape(id) + "\"";
            if (customerId != null)
            {
                xml += " customerId=\"" + SecurityElement.Escape(customerId) + "\"";
            }
            xml += " reportGroup=\"" + SecurityElement.Escape(reportGroup) + "\">";
            xml += "\r\n<litleTxnId>" + SecurityElement.Escape(litleTxnId) + "</litleTxnId>";
            xml += "\r\n</activateReversal>";
            return xml;
        }

Usage Example

        public void testActivateReversal_Full()
        {
            activateReversal activateReversal = new activateReversal();
            activateReversal.id = "theId";
            activateReversal.reportGroup = "theReportGroup";
            activateReversal.customerId = "theCustomerId";
            activateReversal.litleTxnId = "123";

            String actual = activateReversal.Serialize();
            String expected = @"
            <activateReversal id=""theId"" customerId=""theCustomerId"" reportGroup=""theReportGroup"">
            <litleTxnId>123</litleTxnId>
            </activateReversal>";
            Assert.AreEqual(expected, actual);
        }
activateReversal