3 Commits
1.0.2 ... 1.1.0

Author SHA1 Message Date
16bb8e2508 can request OptIn status 2025-05-20 14:35:00 +02:00
c635bbfe91 update changelog 2025-03-06 11:46:28 +01:00
732ad550e2 handle different cases in subscribed status 2025-03-06 11:28:29 +01:00
2 changed files with 17 additions and 3 deletions

View File

@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased](https://git.d3data.de/D3Public/klicktipp-php-client/compare/1.0.2...rel_1.x)
## [Unreleased](https://git.d3data.de/D3Public/klicktipp-php-client/compare/1.1.0...rel_1.x)
## [1.1.0](https://git.d3data.de/D3Public/klicktipp-php-client/compare/1.0.3...1.1.0) - 2025-05-20
### Added
- can request optin pending status
## [1.0.3](https://git.d3data.de/D3Public/klicktipp-php-client/compare/1.0.2...1.0.3) - 2025-03-06
### Fixed
- handle different cases in subscribed status
## [1.0.2](https://git.d3data.de/D3Public/klicktipp-php-client/compare/1.0.1...1.0.2) - 2025-02-05
### Added

View File

@ -28,6 +28,7 @@ class Subscriber extends Entity
use EndpointTrait;
public const STATUS_SUBSCRIBED = 'subscribed';
public const STATUS_OPTIN_PENDING = 'Opt-In Pending';
public const BOUNCE_NOTBOUNCED = 'Not Bounced';
private ?SubscriberEndpoint $endpoint;
@ -84,7 +85,12 @@ class Subscriber extends Entity
public function isSubscribed(): bool
{
return $this->getStatus() === self::STATUS_SUBSCRIBED;
return strtolower($this->getStatus()) === strtolower(self::STATUS_SUBSCRIBED);
}
public function isOptInPending(): bool
{
return strtolower($this->getStatus()) === strtolower(self::STATUS_OPTIN_PENDING);
}
public function getBounce(): ?string
@ -94,7 +100,7 @@ class Subscriber extends Entity
public function isBounced(): bool
{
return $this->getBounce() !== self::BOUNCE_NOTBOUNCED;
return strtolower($this->getBounce()) !== strtolower(self::BOUNCE_NOTBOUNCED);
}
public function getDate(): ?DateTime