Skip to content

Commit

Permalink
Merge pull request #629 from RemcoA4r/all4running/upload-params
Browse files Browse the repository at this point in the history
Optional parameters when uploading XML
  • Loading branch information
stephangroen authored Jan 16, 2024
2 parents 2c66c28 + d7fac3c commit e95a292
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Picqer/Financials/Exact/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,17 +265,18 @@ public function post($url, $body)
/**
* @param string $topic
* @param mixed $body
* @param array $params
*
* @throws ApiException
*
* @return mixed
*/
public function upload($topic, $body)
public function upload($topic, $body, $params = [])
{
$url = $this->getBaseUrl() . '/docs/XMLUpload.aspx?Topic=' . $topic . '&_Division_=' . $this->getDivision();

try {
$request = $this->createRequest('POST', $url, $body);
$request = $this->createRequest('POST', $url, $body, $params);
$response = $this->client()->send($request);

return $this->parseResponseXml($response);
Expand Down

0 comments on commit e95a292

Please sign in to comment.