Skip to content

Commit

Permalink
Added missing createReceipt method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Pashkevich committed Jul 15, 2021
1 parent 604e383 commit 3adbd71
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Actions/ManagesReceipts.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ public function receipt(string $receiptNumber): Receipt
return new Receipt($this->get("receipts/$receiptNumber"), $this);
}

/**
* Create a sales receipt.
*
* @param array $data
* @return Receipt
*/
public function createReceipt(array $data): Receipt
{
$item = $this->post('receipts', $data);

return new Receipt($item, $this);
}

/**
* Create a refund receipt.
*
Expand Down

0 comments on commit 3adbd71

Please sign in to comment.