<?phpdeclare(strict_types=1);namespace App\Module\Checkout\Model;use Commercetools\Core\Model\Common\Address;use Denios\Data\Sap\BusinessPartner;use Denios\SharedConstant\CustomerGroup\GroupKey;/** * Class AnonymousCustomer * * @author André Varelmann <andre.varelmann@bestit-online.de> * @package App\Module\Checkout\Model */class AnonymousCustomer implements DeniosCustomerInterface{ private string $anonymousId; private string $currency; private ?Address $billingAddress; private ?Address $shippingAddress; private ?string $customerGroup; private ?string $email; private ?string $salutation; private ?string $firstName; private ?string $lastName; private ?string $vatId; /** * AnonymousCustomer constructor. * * @param string $anonymousId * @param string $currency * @param Address|null $billingAddress * @param Address|null $shippingAddress * @param string|null $customerGroup * @param string|null $email * @param string|null $salutation * @param string|null $firstName * @param string|null $lastName * @param string|null $vatId */ public function __construct( string $anonymousId, string $currency, ?Address $billingAddress, ?Address $shippingAddress, ?string $customerGroup, ?string $email, ?string $salutation, ?string $firstName, ?string $lastName, ?string $vatId ) { $this->anonymousId = $anonymousId; $this->currency = $currency; $this->billingAddress = $billingAddress; $this->shippingAddress = $shippingAddress; $this->customerGroup = $customerGroup; $this->email = $email; $this->salutation = $salutation; $this->firstName = $firstName; $this->lastName = $lastName; $this->vatId = $vatId; } /** * @return string */ public function getId(): string { return $this->anonymousId; } /** * @return Address|null */ public function getDefaultBillingAddress(): ?Address { return $this->billingAddress; } /** * @return Address|null */ public function getDefaultShippingAddress(): ?Address { return $this->shippingAddress; } /** * @return array */ public function getShippingAddresses(): array { return $this->shippingAddress !== null ? [$this->shippingAddress] : []; } /** * @return array */ public function getBillingAddresses(): array { return $this->billingAddress !== null ? [$this->billingAddress] : []; } /** * @return string */ public function getCurrency(): string { return $this->currency; } /** * @return string|null */ public function getCustomerGroup(): ?string { return $this->customerGroup; } /** * @return string|null */ public function getEmail(): ?string { return $this->email; } /** * @return string|null */ public function getSalutation(): ?string { return $this->salutation; } /** * @return string|null */ public function getFirstName(): ?string { return $this->firstName; } /** * @return string|null */ public function getLastName(): ?string { return $this->lastName; } /** * @return string|null */ public function getVatId(): ?string { return $this->vatId; } /** * @return string|null */ public function getCompanyNumber(): ?string { return null; } /** * @return BusinessPartner|null */ public function getBusinessPartner(): ?BusinessPartner { return null; } /** * @return string|null */ public function getPreferredPaymentType(): ?string { return null; }}