diff --git a/app/Ninja/Transformers/InvoiceTransformer.php b/app/Ninja/Transformers/InvoiceTransformer.php index 8108115b2f..f13b081260 100644 --- a/app/Ninja/Transformers/InvoiceTransformer.php +++ b/app/Ninja/Transformers/InvoiceTransformer.php @@ -25,12 +25,22 @@ class InvoiceTransformer extends EntityTransformer 'payments' ]; + protected $availableIncludes = [ + 'invitations', + ]; + public function includeInvoiceItems(Invoice $invoice) { $transformer = new InvoiceItemTransformer($this->account, $this->serializer); return $this->includeCollection($invoice->invoice_items, $transformer, ENTITY_INVOICE_ITEMS); } + public function includeInvitations(Invoice $invoice) + { + $transformer = new InvoiceItemTransformer($this->account, $this->serializer); + return $this->includeCollection($invoice->invitations, $transformer, ENTITY_INVITATION); + } + public function includePayments(Invoice $invoice) { $transformer = new PaymentTransformer($this->account, $this->serializer);