/// <summary> /// /// </summary> /// <param name="element"></param> internal void UpdateFromXElement(XElement element) { if (element != null) { this.QuoteID = element.GetChildValueAsInt32("QuoteID"); this.Status = element.GetChildValue("Status"); this.AuthorizeURL = element.GetChildValue("AuthorizeURL"); this.RejectURL = element.GetChildValue("RejectURL"); this.PaymentURL = element.GetChildValue("PaymentURL"); this.Currency = element.GetChildValue("Currency"); this.TotalCost = element.GetChildValueAsDecimal("TotalCost"); this.PrepaidCredit = element.GetChildValueAsDecimal("PrepaidCredit"); this.AmountDue = element.GetChildValueAsDecimal("AmountDue"); this.TotalTranslations = element.GetChildValueAsInt32("TotalTranslations"); this.TranslationCredit = element.GetChildValueAsInt32("TranslationCredit"); this.CreationDate = element.GetChildValueAsDateTime("CreationDate"); if (element.Element("Projects") != null) { this.Projects = Project.CreateEnumerable(element.Element("Projects"), this.Client); } if (element.Element("Payments") != null) { this.Payments = Payment.CreateEnumerable(element.Element("Payments")); } } }
/// <summary> /// /// </summary> /// <param name="element"></param> /// <param name="client"></param> public QuoteAuthorization(XElement element, IContentAPI client) { this.Status = element.GetChildValue("Status"); this.PaymentURL = element.GetChildValue("PaymentURL"); this.QuoteURL = element.GetChildValue("QuoteURL"); this.Projects = Project.CreateEnumerable(element.Element("Projects"), client).ToArray(); }