/// <summary> /// Itemizes the invoice. /// </summary> /// <returns> /// The <see cref="InvoiceItemItemization"/>. /// </returns> protected override InvoiceItemItemization ItemizeInvoice() { var visitor = new ProductBasedTaxationVisitor(); Invoice.Accept(visitor); return(new InvoiceItemItemization { Products = visitor.ProductLineItems, Tax = visitor.TaxLineItems, Adjustments = GetLineItemCollection(LineItemType.Adjustment), Shipping = GetLineItemCollection(LineItemType.Shipping), Custom = GetLineItemCollection(LineItemType.Custom), Discounts = GetLineItemCollection(LineItemType.Discount) }); }