Skip to content

Commit

Permalink
Add Attachment documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amochohan committed Jun 22, 2015
1 parent 8df03a0 commit 001c28b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,13 @@ IoC Container
// Repeat for all lines...

$xero->save($invoice);

### Creating Attachments

$xero = $this->app->make('XeroPrivate');

$attachment = $this->app->make('XeroAttachment')
->createFromLocalFile(storage_path('your_file.pdf'));
$invoice = $xero->loadByGUID('Accounting\\Invoice', 'AMO-00002');
$invoice->addAttachment($attachment);

0 comments on commit 001c28b

Please sign in to comment.