22 lines
583 B
PHP
22 lines
583 B
PHP
<?php
|
|
|
|
namespace App\Repositories\Api\Invoice;
|
|
|
|
use App\Models\Invoice;
|
|
use App\Models\Order;
|
|
use App\Repositories\BaseRepositoryInterface;
|
|
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
|
|
|
interface InvoiceRepositoryInterface extends BaseRepositoryInterface
|
|
{
|
|
/**
|
|
* Paginated invoice list for a customer.
|
|
*/
|
|
public function getInvoice(int $limit, int $customerId): LengthAwarePaginator;
|
|
|
|
/**
|
|
* Create an invoice (+ invoice_items) from a completed Order.
|
|
*/
|
|
public function createFromOrder(Order $order, ?int $dueDays = null): Invoice;
|
|
}
|