Skip to content

Commit

Permalink
data
Browse files Browse the repository at this point in the history
  • Loading branch information
TomK committed Sep 23, 2020
1 parent bbad713 commit 8a25323
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
},
Expand Down
5 changes: 5 additions & 0 deletions src/Exceptions/Client/ConflictException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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;
}
}

0 comments on commit 8a25323

Please sign in to comment.