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(); }
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(); }
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(); }