Пример #1
0
 internal override void WriteXml(XmlTextWriter writer)
 {
     writer.WriteStartElement("invoice");
     writer.WriteElementString("refund_method", RefundMethod.ToString().ToLower());
     writer.WriteElementString("amount_in_cents", AmountInCents.AsString());
     writer.WriteEndElement();
 }
Пример #2
0
        internal void WriteXml(XmlTextWriter writer)
        {
            writer.WriteStartElement("invoice");
            writer.WriteElementString("refund_method", RefundMethod.ToString().EnumNameToTransportCase());
            writer.WriteStartElement("line_items");

            foreach (var refund in Refunds)
            {
                refund.WriteXml(writer);
            }

            writer.WriteEndElement(); // line_items
            writer.WriteEndElement(); // invoice
        }