diff --git a/composer.json b/composer.json index 9e3dab2..6234020 100755 --- a/composer.json +++ b/composer.json @@ -3,7 +3,8 @@ "description": "Fortifi Business Platform", "homepage": "http://fortifi.co", "require": { - "packaged/helpers": "~1.1|~2.2" + "packaged/helpers": "~1.1|~2.2", + "ext-json": "*" }, "require-dev": { }, diff --git a/src/Exceptions/Client/ConflictException.php b/src/Exceptions/Client/ConflictException.php index 341e0ed..715973b 100644 --- a/src/Exceptions/Client/ConflictException.php +++ b/src/Exceptions/Client/ConflictException.php @@ -9,10 +9,14 @@ class ConflictException extends ClientApiException const VALUE = 'x-fortifi-conflict-value'; const OWNER = 'x-fortifi-conflict-owner'; + const DATA = 'x-fortifi-conflict'; + public $field; public $value; public $owner; + public $data; + /** * @inheritDoc */ @@ -26,5 +30,6 @@ public function handleHeaders(array $headers) $this->field = !empty($headers[static::FIELD]) ? $headers[static::FIELD][0] : null; $this->value = !empty($headers[static::VALUE]) ? $headers[static::VALUE][0] : null; $this->owner = !empty($headers[static::OWNER]) ? $headers[static::OWNER][0] : null; + $this->data = !empty($headers[static::DATA]) ? json_decode($headers[static::DATA][0]) : null; } }