Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagof committed Jun 24, 2023
1 parent 90db840 commit 8336df2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ $item->delete();
#### Invoice lifecycle:

```php
use Squarebit\InvoiceXpress\API\Data\PdfData;$invoice = (new IxInvoice())
use Squarebit\InvoiceXpress\API\Data\PdfData;

$invoice = (new IxInvoice())
->setClient(IxClient::findOrFail(1234)) // set the invoice's client
->addItem(IxItem::find(2345)) // add an IxItem model
->addItem(ItemData::from([....])) // you can also add from an ItemData
Expand Down Expand Up @@ -183,7 +185,7 @@ $invoiceEndpoint->sendByEmail(
EmailData::from([
'client_data' => EmailClientData::from([
'email' => 'someone@somewhere.com'
])
]),
'subject' => '...',
'body' => '...',
'cc' => '...',
Expand Down

0 comments on commit 8336df2

Please sign in to comment.