Skip to content

Commit

Permalink
Reopen order
Browse files Browse the repository at this point in the history
  • Loading branch information
kg-bot committed Jun 13, 2019
1 parent 73d85d3 commit 750f3a4
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/Models/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,23 @@ class Order extends Model
{
protected $entity = 'orders';
protected $primaryKey = 'number';

public function getPDF() {

public function getPDF()
{
return $this->request->handleWithExceptions( function () {
return $this->request->client->get( "{$this->entity}/{$this->{$this->primaryKey}}.pdf")->getBody()->getContents();
return $this->request->client->get( "{$this->entity}/{$this->{$this->primaryKey}}.pdf" )->getBody()
->getContents();
} );
}

public function reopen()
{

return $this->request->handleWithExceptions( function () {

return $this->request->client->post( "{$this->entity}/{$this->{$this->primaryKey}}/reopen" )
->getBody()
->getContents();
} );
}
}

0 comments on commit 750f3a4

Please sign in to comment.