Skip to content

Commit

Permalink
Added post single Invoice rest method
Browse files Browse the repository at this point in the history
  • Loading branch information
krizzdev committed Sep 15, 2021
1 parent feb1e26 commit 192554c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-scopevisio` will be documented in this file

## 1.2.1 - 2021-09-15

- Add postInvoice rest method to outgoinginvoice

## 1.2.0 - 2021-05-23

- Add PHP 8.0 Support
22 changes: 22 additions & 0 deletions src/Services/OutgoingInvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,28 @@ public function import(array $formParams, array $options = []): array
return json_decode($response->getBody(), true);
}

public function postInvoice($id, array $options = []): array
{
$response = \ScopeVisio::client($options)
->post("outgoinginvoice/{$id}/post", []);

return json_decode($response->getBody(), true);
}

/**
* @param array $formParams
* @return string
* @throws GuzzleException
*/
public function new(array $formParams, array $options = []): array
{
$response = \ScopeVisio::client($options)
->post('outgoinginvoice/new', [
RequestOptions::JSON => $formParams
]);
return json_decode($response->getBody(), true);
}

public function show($number, array $options = []): array
{
$response = \ScopeVisio::client($options)->get("outgoinginvoice/$number");
Expand Down

0 comments on commit 192554c

Please sign in to comment.