-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from turbo124/main
Documentation for SDK v5
- Loading branch information
Showing
16 changed files
with
289 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* Invoice Ninja (https://invoiceninja.com). | ||
* | ||
* @link https://github.com/invoiceninja/sdk-php source repository | ||
* | ||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com) | ||
* | ||
* @license https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
namespace InvoiceNinja\Sdk\Endpoints; | ||
|
||
use GuzzleHttp\Exception\GuzzleException; | ||
use InvoiceNinja\Sdk\InvoiceNinja; | ||
|
||
class BaseEntity | ||
{ | ||
|
||
public function bulk(string $action, array $ids) | ||
{ | ||
$query['form_params'] = ["action" => $action, "ids" => $ids]; | ||
|
||
return $this->ninja->send("POST", "{$this->uri}/bulk", $query); | ||
} | ||
|
||
public function archive(array $entity_array) | ||
{ | ||
return $this->bulk("archive", $entity_array); | ||
} | ||
|
||
public function delete(array $entity_array) | ||
{ | ||
return $this->bulk("delete", $entity_array); | ||
} | ||
|
||
public function restore(array $entity_array) | ||
{ | ||
return $this->bulk("restore", $entity_array); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.