Skip to content

Commit

Permalink
fixed merge conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Bortz <e.bortz@netstack.de>
  • Loading branch information
Eric Bortz committed Feb 10, 2023
2 parents 2736d8f + ca683ef commit 9e65ae0
Showing 1 changed file with 1 addition and 180 deletions.
181 changes: 1 addition & 180 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,186 +41,7 @@ return [

## Usage

First Instantiate a sevdesk instance.

```php
$sevdeskApi = SevdeskApi::make();
```

### Create Contact

Create sevdesk contacts. There are 4 different default contact types in sevdesk.

- supplier
- customer
- partner
- prospect customer

The optional `$parameters` is for additional information like description, vatNumber or bankNumber.

```php
$sevdeskApi->contact()->createSupplier('Supplier Organisation', $parameters);
$sevdeskApi->contact()->createCustomer('Customer Organisation', $parameters);
$sevdeskApi->contact()->createPartner('Partner Organisation', $parameters);
$sevdeskApi->contact()->createProspectCustomer('Prospect Customer Organisation', $parameters);
```

For accounting contact you have to create a contact first. You create a accounting contact using the created contact id.

```php
$sevdeskApi->contact()->createAccountingContact($contactId);
```

For custom contact types use your custom category id.

```php
$sevdeskApi->contact()->createCustom('Custom Organisation', $categoryId, $parameters);
```

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, $parameters);
```

### Delete Contact

To delete a single contact. `$contactId` is required.

```php
$sevdeskApi->contact()->delete($contactId);
```

### Create Contact Address

```php
$sevdeskApi->contactAddress()->create($contactId, $parameters);
```

### Create Communication Way

Create phone number.

```php
$sevdeskApi->communicationWay()->createPhone($contactId, $phoneNumber);
```

Create email.

```php
$sevdeskApi->communicationWay()->createEmail($contactId, $email);
```

Create website.

```php
$sevdeskApi->communicationWay()->createWebsite($contactId, $website);
```

### Retrieve Communication Way

Retrieve all communication ways.

```php
$sevdeskApi->communicationWay()->all();
```

Retrieve communication ways of a specific contact.

```php
$sevdeskApi->communicationWay()->get($contactId);
```

### Delete Communication Way

To delete a single communication way.

```php
$sevdeskApi->communicationWay()->delete($communicationWayId);
```

### Retrieve Invoice

To get all invoices.

```php
$sevdeskApi->invoice()->all();
```

To get all invoices filtered by status `draft`, `open` or `payed`.

```php
$sevdeskApi->invoice()->allDraft();
$sevdeskApi->invoice()->allOpen();
$sevdeskApi->invoice()->allPayed();
```

To get all invoices filtered by a giving `$contactId`.

```php
$sevdeskApi->invoice()->allByContact($contactId);
```

To get all invoices filtered by giving `$timestamp`.

```php
$sevdeskApi->invoice()->allAfter($timestamp);
$sevdeskApi->invoice()->allBefore($timestamp);
```

To download pdf file of the giving `$invoiceId`.

```php
$sevdeskApi->invoice()->download($invoiceId);
```

To send invoice to giving `$email`. Use `$subject` and `$text` to edit the mail. `$text` can contain html.

```php
$sevdeskApi->invoice()->sendPerMail($invoiceId, $email, $subject, $text);
```

### Retrieve Country

To retrieve all countries use:

```php
$sevdeskApi->staticCountry()->all();
```

To retrieve a single country use:

```php
$sevdeskApi->staticCountry()->get($countryId);
```
For usage instructions see the [Wiki](https://github.com/NetstackDE/laravel-sevdesk-api/wiki)

## Changelog

Expand Down

0 comments on commit 9e65ae0

Please sign in to comment.