-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Appelmann
committed
Dec 5, 2021
1 parent
4dda14a
commit 56fc0fc
Showing
6 changed files
with
313 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,20 +39,77 @@ return [ | |
]; | ||
``` | ||
|
||
## Instantiation | ||
## Usage | ||
|
||
First Instantiate a sevdesk instance. | ||
```php | ||
$sevdeskApi = SevdeskApi::make(); | ||
``` | ||
|
||
### Create Contact | ||
|
||
### Testing | ||
Create sevdesk contacts. | ||
There are 4 different default contact types in sevdesk. | ||
- supplier | ||
- customer | ||
- partner | ||
- prospect customer | ||
|
||
``` bash | ||
composer test | ||
The optional `$parameter` is for additional information like description, vatNumber or bankNumber. | ||
|
||
```php | ||
$sevdeskApi->contact()->createSupplier('Supplier Organisation', $parameter); | ||
$sevdeskApi->contact()->createCustomer('Customer Organisation', $parameter); | ||
$sevdeskApi->contact()->createPartner('Partner Organisation', $parameter); | ||
$sevdeskApi->contact()->createProspectCustomer('Prospect Customer Organisation', $parameter); | ||
``` | ||
For custom contact types. | ||
|
||
```php | ||
$sevdeskApi->contact()->createCustom('Custom Organisation', $categoryId, $parameter); | ||
``` | ||
|
||
Check [Create Contact](https://my.sevdesk.de/api/ContactAPI/doc.html#operation/createContact) for more information. | ||
|
||
### Retrieve Contact | ||
|
||
To get all contacts. | ||
|
||
```php | ||
$sevdeskApi->contact()->all(); | ||
$sevdeskApi->contact()->allSupplier(); | ||
$sevdeskApi->contact()->allCustomer(); | ||
$sevdeskApi->contact()->allPartner(); | ||
$sevdeskApi->contact()->allProspectCustomer(); | ||
``` | ||
To get all contacts from a custom type. | ||
|
||
```php | ||
$sevdeskApi->contact()->allCustom($categoryId); | ||
``` | ||
To get a single contact. | ||
|
||
```php | ||
$sevdeskApi->contact()->get($contactId); | ||
``` | ||
|
||
### Update Contact | ||
|
||
To update a single contact. `$contactId` is required. | ||
|
||
```php | ||
$sevdeskApi->contact()->update($contactId, $parameter); | ||
``` | ||
|
||
### Delete Contact | ||
|
||
To delete a single contact. `$contactId` is required. | ||
|
||
```php | ||
$sevdeskApi->contact()->delete($contactId); | ||
``` | ||
|
||
### Changelog | ||
## Changelog | ||
|
||
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. | ||
|
||
|
@@ -62,7 +119,9 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details. | |
|
||
### Security | ||
|
||
If you discover any security related issues, please email [email protected] instead of using the issue tracker. | ||
If you discover any security related issues, please email | ||
[[email protected]](mailto:[email protected]?subject=Laravel%20Sevdesk%20Issue) | ||
instead of using the issue tracker. | ||
|
||
## Credits | ||
|
||
|
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.