Skip to content

Commit

Permalink
Add getReportID
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Nov 20, 2024
1 parent ddfc082 commit 80a9bfa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Responses/Mailing.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function getStatistic($key)
if (!$this->statistics) {
$this->setStatistics();
}
return (int)$this->statistics->$key;
return (int) $this->statistics->$key;
}

/**
Expand All @@ -236,7 +236,7 @@ protected function setStatistics()
try {
$this->statistics = $silverPop->getAggregateTrackingForMailing(array(
'MailingId' => $this->getMailingIdentifier(),
'ReportId' => (string)$this->data->ReportId,
'ReportId' => $this->getReportID(),
));
} catch (SilverpopConnectorException $e) {
if (stristr($e->getMessage(), 'is not valid')) {
Expand All @@ -245,6 +245,11 @@ protected function setStatistics()
}
}

public function getReportID(): string
{
return (string) $this->data->ReportId;
}

/**
* Get Silverpop connector object.
*
Expand Down

0 comments on commit 80a9bfa

Please sign in to comment.