get invoice in my site using invoice id from xero api?

Viewed 778

I am using xero for generate invoice, now I want get invoice using xero invoice id in php, my code is ...........

$nik = $xero->load('Accounting\\Invoice')
      ->where('InvoiceID', $outwardRecord->xero_invoice_id)
       or 
      ->where('InvoiceID', \XeroPHP\Models\Accounting\Invoice::InvoiceID)
      ->execute();

but it's given error

Fatal error: Undefined class constant 'InvoiceID' in /var/w

please guide me how to get invoice using invoiceId, how understand my problem.

thanks!

1 Answers
Related