Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact client: update method missing #123

Closed
PercyDwn opened this issue Nov 20, 2023 · 0 comments · Fixed by #124
Closed

Contact client: update method missing #123

PercyDwn opened this issue Nov 20, 2023 · 0 comments · Fixed by #124

Comments

@PercyDwn
Copy link

The lexoffice api supports an update method for contacts. Why is it missing from the client?

For now I copied following part from the voucher client to the contact client:

/**
* @param string $id
* @param array $data
* @return ResponseInterface
* @throws CacheException
* @throws LexOfficeApiException
*/
public function update(string $id, array $data)
{
    $api = $this->api->newRequest('PUT', $this->resource . '/' . $id);

    $api->request = $api->request->withBody($this->createStream($data));

    return $api->getResponse();
}

Works just fine, this way I can update the contacts in lexoffice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant