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

Serialize() public method

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

Usage Example

コード例 #1
0
        public void testDeactivate_OnlyRequired()
        {
            deactivate deactivate = new deactivate();
            deactivate.orderId = "12345";
            deactivate.orderSource = orderSourceType.ecommerce;
            deactivate.card = new cardType();
            deactivate.id = "theId";
            deactivate.reportGroup = "theReportGroup";

            String actual = deactivate.Serialize();
            String expected = @"
            <deactivate id=""theId"" reportGroup=""theReportGroup"">
            <orderId>12345</orderId>
            <orderSource>ecommerce</orderSource>
            <card>
            <type>MC</type>
            </card>
            </deactivate>";
            Assert.AreEqual(expected, actual);
        }
All Usage Examples Of Litle.Sdk.deactivate::Serialize
deactivate