Skip to content

Commit

Permalink
Merge pull request #6 from renedekat/void-invoice
Browse files Browse the repository at this point in the history
Move void to Invoice
  • Loading branch information
awalls authored Sep 12, 2017
2 parents bf9713f + 16ea288 commit 8ce6ec1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 14 additions & 0 deletions src/Services/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,18 @@ public function send($id, $email = null)
'Content-Type' => 'application/octet-stream',
]);
}

/**
* Void an entity.
*
* @param string $id Invoice ID.
* @param int $syncToken
*/
public function void($id, $syncToken = 0)
{
return parent::post($this->getResourceName().'?operation=void', [
'Id' => $id,
'SyncToken' => $syncToken,
])->{$this->getEntityName()};
}
}
14 changes: 0 additions & 14 deletions src/Services/SalesReceipt.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,4 @@
class SalesReceipt extends Service
{
use Attachable;

/**
* Void an entity.
*
* @param string $id Item information.
* @param int $syncToken
*/
public function void($id, $syncToken = 0)
{
return parent::post($this->getResourceName().'?operation=void', [
'Id' => $id,
'SyncToken' => $syncToken,
])->{$this->getEntityName()};
}
}

0 comments on commit 8ce6ec1

Please sign in to comment.