src/Domain/PaymentGateway/Model/UserPaymentInfo.php line 9

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Domain\PaymentGateway\Model;
  4. use App\Domain\Payment\Model\Payment;
  5. class UserPaymentInfo
  6. {
  7.      private ?int $id null;
  8.     private Payment $payment;
  9.     private string $ipAddress;
  10.     private ?string $name;
  11.     private \DateTimeImmutable $createdAt;
  12.     private \DateTimeImmutable $updatedAt;
  13.     public function __construct(
  14.         Payment $payment,
  15.         string $ipAddress,
  16.         string $name
  17.     ) {
  18.         $this->payment $payment;
  19.         $this->ipAddress $ipAddress;
  20.         $this->name $name;
  21.         $this->createdAt = new \DateTimeImmutable();
  22.         $this->updatedAt = new \DateTimeImmutable();
  23.     }
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getPayment(): Payment
  29.     {
  30.         return $this->payment;
  31.     }
  32.     public function setPayment(Payment $payment): void
  33.     {
  34.         $this->payment $payment;
  35.     }
  36.     public function getIpAddress(): string
  37.     {
  38.         return $this->ipAddress;
  39.     }
  40.     public function setIpAddress(string $ipAddress): void
  41.     {
  42.         $this->ipAddress $ipAddress;
  43.     }
  44.     public function getName(): ?string
  45.     {
  46.         return $this->name;
  47.     }
  48.     public function setName(?string $name): void
  49.     {
  50.         $this->name $name;
  51.     }
  52.     public function getCreatedAt(): \DateTimeImmutable
  53.     {
  54.         return $this->createdAt;
  55.     }
  56.     public function getUpdatedAt(): \DateTimeImmutable
  57.     {
  58.         return $this->updatedAt;
  59.     }
  60.     public function touch(): void
  61.     {
  62.         $this->updatedAt = new \DateTimeImmutable();
  63.     }
  64. }