internal void WriteOfflinePaymentXml(XmlTextWriter xmlWriter)
        {
            xmlWriter.WriteStartElement("transaction");

            xmlWriter.WriteStringIfValid("payment_method", PaymentMethod);
            xmlWriter.WriteElementString("collected_at", CollectedAt.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ"));
            xmlWriter.WriteElementString("amount_in_cents", AmountInCents.AsString());
            xmlWriter.WriteStringIfValid("description", Description);

            xmlWriter.WriteEndElement();
        }
示例#2
0
        internal override void WriteXml(XmlTextWriter xmlWriter)
        {
            xmlWriter.WriteStartElement("transaction");

            xmlWriter.WriteElementString("amount_in_cents", AmountInCents.AsString());
            xmlWriter.WriteElementString("currency", Currency);

            if (Account != null)
            {
                Account.WriteXml(xmlWriter);
            }

            xmlWriter.WriteEndElement();
        }
示例#3
0
        internal override void WriteXml(XmlTextWriter xmlWriter)
        {
            xmlWriter.WriteStartElement("transaction");

            xmlWriter.WriteElementString("amount_in_cents", AmountInCents.AsString());
            xmlWriter.WriteElementString("currency", Currency);
            xmlWriter.WriteStringIfValid("description", Description);

            xmlWriter.WriteElementString("tax_exempt", TaxExempt.AsString().ToLower());
            xmlWriter.WriteStringIfValid("tax_code", TaxCode);
            xmlWriter.WriteStringIfValid("accounting_code", AccountingCode);

            if (Account != null)
            {
                Account.WriteXml(xmlWriter);
            }

            xmlWriter.WriteEndElement();
        }