Skip to content

Commit

Permalink
Fixed getSuppressions return type (#126)
Browse files Browse the repository at this point in the history
Fixed getSuppressions to return PostmarkSuppressionList instead of
PostmarkSuppressionResultList
  • Loading branch information
ashgibson authored Jan 4, 2024
1 parent ecacd3c commit 4192e94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Postmark/PostmarkClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use Postmark\Models\Stats\PostmarkOutboundSentStats;
use Postmark\Models\Stats\PostmarkOutboundSpamComplaintStats;
use Postmark\Models\Stats\PostmarkOutboundTrackedStats;
use Postmark\Models\Suppressions\PostmarkSuppressionList;
use Postmark\Models\Suppressions\PostmarkSuppressionResultList;
use Postmark\Models\TemplatedPostmarkMessage;
use Postmark\Models\TemplateValidationResponse;
Expand Down Expand Up @@ -1473,7 +1474,7 @@ public function getSuppressions(
?string $fromDate = null,
?string $toDate = null,
?string $emailAddress = null
): PostmarkSuppressionResultList {
): PostmarkSuppressionList {
$query = [];
$query['SuppressionReason'] = $suppressionReason;
$query['Origin'] = $origin;
Expand All @@ -1485,7 +1486,7 @@ public function getSuppressions(
$messageStream = 'outbound';
}

return new PostmarkSuppressionResultList((array) $this->processRestRequest('GET', "/message-streams/{$messageStream}/suppressions/dump", $query));
return new PostmarkSuppressionList((array) $this->processRestRequest('GET', "/message-streams/{$messageStream}/suppressions/dump", $query));
}

/**
Expand Down

1 comment on commit 4192e94

@ashgibson
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please tag a new release with this fix in it

Please sign in to comment.