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

Serialize() public method

public Serialize ( ) : string
return string
        public override string Serialize()
        {
            string xml = "\r\n<deactivateReversal";
            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</deactivateReversal>";
            return xml;
        }

Usage Example

コード例 #1
0
        public void testDeactivateReversal_Full()
        {
            deactivateReversal deactivateReversal = new deactivateReversal();
            deactivateReversal.id = "theId";
            deactivateReversal.reportGroup = "theReportGroup";
            deactivateReversal.customerId = "theCustomerId";
            deactivateReversal.litleTxnId = "123";

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