klicktipp-php-client/src/Entities/Subscription.php

63 lignes
1.5 KiB
PHP
Brut Vue normale Historique

2024-12-22 13:52:28 +01:00
<?php
2024-12-29 00:47:30 +01:00
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
2024-12-22 13:52:28 +01:00
namespace D3\KlicktippPhpClient\Entities;
2025-01-03 09:33:08 +01:00
use D3\KlicktippPhpClient\Resources\SubscriptionProcess;
2024-12-22 13:52:28 +01:00
use Doctrine\Common\Collections\ArrayCollection;
class Subscription extends ArrayCollection
{
2024-12-22 23:38:41 +01:00
public function getListId(): string
2024-12-22 13:52:28 +01:00
{
2025-01-03 09:33:08 +01:00
return $this->get(SubscriptionProcess::LISTID) ?? '';
2024-12-22 23:38:41 +01:00
}
public function getName(): string
{
2025-01-03 09:33:08 +01:00
return $this->get(SubscriptionProcess::NAME) ?? '';
2024-12-22 23:38:41 +01:00
}
public function getPendingUrl(): string
{
2025-01-03 09:33:08 +01:00
return $this->get(SubscriptionProcess::PENDINGURL) ?? '';
2024-12-22 23:38:41 +01:00
}
public function getThankyouUrl(): string
{
2025-01-03 09:33:08 +01:00
return $this->get(SubscriptionProcess::THANKYOUURL) ?? '';
2024-12-22 23:38:41 +01:00
}
public function useSingleOptin(): bool
{
2025-01-03 09:33:08 +01:00
return $this->get(SubscriptionProcess::USE_SINGLE_OPTIN);
2024-12-22 23:38:41 +01:00
}
public function useDoubleOptin(): bool
{
return !$this->useSingleOptin();
}
public function resendConfirmationEmail(): bool
{
2025-01-03 09:33:08 +01:00
return $this->get(SubscriptionProcess::RESEND_CONFIRMATION_EMAIL);
2024-12-22 23:38:41 +01:00
}
public function useChangeEmail(): bool
{
2025-01-03 09:33:08 +01:00
return $this->get(SubscriptionProcess::USE_CHANGE_EMAIL);
2024-12-22 13:52:28 +01:00
}
2024-12-29 00:47:30 +01:00
}