Skip to content

Commit

Permalink
Added void code to Invoice class
Browse files Browse the repository at this point in the history
  • Loading branch information
awalls authored Sep 12, 2017
1 parent 096b134 commit 7c09c9f
Showing 1 changed file with 14 additions and 0 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()};
}
}

0 comments on commit 7c09c9f

Please sign in to comment.