Model
InvoiceService
Magento\Sales\Model\Service\InvoiceService
What it does
This service class handles invoice operations in Magento 2, including creating invoices from orders, capturing payments, managing invoice comments, sending invoice notifications, and voiding invoices.
Developers use this class when they need to programmatically generate invoices for orders, process invoice-related actions through the API, or customize invoice creation logic with specific item quantities.
Public Methods
- setCapture()
- getCommentsList()
- notify()
- setVoid()
- prepareInvoice()