public QuoteRequest(Currency currency, Language language) { Addresses = new List <Address>(); Attachments = new List <Attachment>(); Items = new List <QuoteItem>(); TaxDetails = new List <TaxDetail>(); DynamicProperties = new List <DynamicProperty>(); Language = language; Currency = currency; ManualShippingTotal = new Money(currency); Totals = new QuoteRequestTotals(currency); ManualSubTotal = new Money(currency); ManualRelDiscountAmount = new Money(currency); }
public QuoteRequest(Currency currency, Language language) { Addresses = new List<Address>(); Attachments = new List<Attachment>(); Items = new List<QuoteItem>(); TaxDetails = new List<TaxDetail>(); DynamicProperties = new List<DynamicProperty>(); Language = language; Currency = currency; ManualShippingTotal = new Money(currency); Totals = new QuoteRequestTotals(currency); ManualSubTotal = new Money(currency); ManualRelDiscountAmount = new Money(currency); }
public static QuoteRequestTotals ToWebModel(this VirtoCommerceQuoteModuleWebModelQuoteRequestTotals serviceModel, Currency currency) { var webModel = new QuoteRequestTotals(currency); webModel.AdjustmentQuoteExlTax = new Money(serviceModel.AdjustmentQuoteExlTax ?? 0, currency); webModel.DiscountTotal = new Money(serviceModel.DiscountTotal ?? 0, currency); webModel.GrandTotalExlTax = new Money(serviceModel.GrandTotalExlTax ?? 0, currency); webModel.GrandTotalInclTax = new Money(serviceModel.GrandTotalInclTax ?? 0, currency); webModel.OriginalSubTotalExlTax = new Money(serviceModel.OriginalSubTotalExlTax ?? 0, currency); webModel.ShippingTotal = new Money(serviceModel.ShippingTotal ?? 0, currency); webModel.SubTotalExlTax = new Money(serviceModel.SubTotalExlTax ?? 0, currency); webModel.TaxTotal = new Money(serviceModel.TaxTotal ?? 0, currency); return webModel; }