Skip to content

Commit

Permalink
Fix Object names for To/CC/BCC as pulled from API (#83)
Browse files Browse the repository at this point in the history
When creating a Thread (or any descendant) the AbstractThread base class was expect "toList", "ccList" and "bccList" items in the objects as pulled from the API. In practice, the "list" is just a construct within the API wrapper, and the fields in the API are called "to", "cc" and "bcc" respectively.
  • Loading branch information
IanSimpson authored and davidstanley01 committed Jan 15, 2019
1 parent bee2ac7 commit 0aec297
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HelpScout/model/thread/AbstractThread.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public function __construct($data=null) {
parent::__construct($data);
if ($data) {
$this->body = isset($data->body) ? $data->body : null;
$this->toList = isset($data->toList) ? $data->toList : null;
$this->ccList = isset($data->ccList) ? $data->ccList : null;
$this->bccList = isset($data->bccList) ? $data->bccList : null;
$this->toList = isset($data->to) ? $data->to : null;
$this->ccList = isset($data->cc) ? $data->cc : null;
$this->bccList = isset($data->bcc) ? $data->bcc : null;
$this->state = isset($data->state) ? $data->state : null;
$this->type = isset($data->type) ? $data->type : null;
$this->openedAt= isset($data->openedAt)? $data->openedAt: null;
Expand Down

0 comments on commit 0aec297

Please sign in to comment.