InvoiceService
The Invoice service allows you to manage invoices.
The InvoiceService is exposed through the MerchelloContext
var invoiceService = MerchelloContext.Current.Services.InvoiceService;
Class
public class InvoiceService : PageCachedServiceBase<IInvoice>,
IInvoiceService, IStaticCollectionService<IInvoice>, IPageCachedService<IInvoice>,
IService
Constructors
Name | Description |
---|---|
InvoiceService() | Initializes a new instance of the InvoiceService class. |
InvoiceService(ILogger) | Initializes a new instance of the InvoiceService class. |
Public Methods
Name | Description |
---|---|
AddToCollection(Guid, Guid) | Add an invoice to a collection. |
AddToCollection(IInvoice, IEntityCollection) | Add an invoice to a collection. |
AddToCollection(IInvoice, Guid) | Add an invoice to a collection. |
CountInvoices | Gets the total count of all IInvoice |
CreateInvoice(Guid, Boolean) | Creates a IInvoice without saving it to the database |
CreateInvoice(Guid, Int32, Boolean) | Creates a IInvoice with an assigned invoice number without saving it to the database |
Delete(IInvoice, Boolean) | Deletes a single IInvoice |
Delete(IEnumerable(IInvoice), Boolean) | Deletes a collection IInvoice |
ExistsInCollection | Determines if an invoice exists in a collection. |
GetAllInvoiceStatuses | Returns a collection of all IInvoiceStatus |
GetByInvoiceNumber | Gets a IInvoice given it's unique 'InvoiceNumber' |
GetByKey | Gets a IInvoice given it's unique 'key' (GUID) |
GetByKeys | Gets list of IInvoice objects given a list of Keys |
GetDistinctCurrencyCodes | Gets distinct currency codes used in invoices |
GetFromCollection(Guid, Int64, Int64, String, SortDirection) | Gets invoices from a collection |
GetFromCollection(Guid, String, Int64, Int64, String, SortDirection) | Gets invoices from a collection |
GetInvoicesByCustomerKey | GetInvoicesByDateRange |
GetInvoicesByDateRange | GetInvoicesByDateRange |
GetInvoicesByPaymentKey | Gets a collection of IInvoice objects that are associated with a IPayment by the payments 'key' |
GetPage | Gets a page of invoices |
RemoveFromCollection(Guid, Guid) | Removes an invoice from a collection |
RemoveFromCollection(IInvoice, IEntityCollection) | Removes an invoice from a collection |
RemoveFromCollection(IInvoice, Guid) | Removes an invoice from a collection |
Save(IInvoice, Boolean) | Saves a single IInvoice |
Save(IEnumerable(IInvoice), Boolean) | Saves a collection of IInvoice |
SumInvoiceTotals | Gets the totals of invoices in a date range for a specific currency code. |
SumLineItemTotalsBySku | Gets the total of line items for a give SKU invoiced in a specific currency across the date range. |
Events
Name | Description |
---|---|
Creating | Occurs before create |
Created | Occurs after create |
Deleting | Occurs before deleting |
Deleted | Occurs after deleted |
Saving | Occurs before saving |
Saved | Occurs after saved |
StatusChanging | Occurs before invoice status change |
StatusChanged | Occurs after invoice status change |
Interface on GitHub
Updated less than a minute ago