1<?php
2/**
3 * Copyright since 2007 PrestaShop SA and Contributors
4 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
5 *
6 * NOTICE OF LICENSE
7 *
8 * This source file is subject to the Open Software License (OSL 3.0)
9 * that is bundled with this package in the file LICENSE.md.
10 * It is also available through the world-wide-web at this URL:
11 * https://opensource.org/licenses/OSL-3.0
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@prestashop.com so we can send you a copy immediately.
15 *
16 * DISCLAIMER
17 *
18 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
19 * versions in the future. If you wish to customize PrestaShop for your
20 * needs please refer to https://devdocs.prestashop.com/ for more information.
21 *
22 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
23 * @copyright Since 2007 PrestaShop SA and Contributors
24 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25 */
26
27namespace PrestaShop\PrestaShop\Core\Domain\Order\QueryResult;
28
29use DateTimeImmutable;
30
31class OrderPaymentForViewing
32{
33    /**
34     * @var int
35     */
36    private $paymentId;
37
38    /**
39     * @var DateTimeImmutable
40     */
41    private $date;
42
43    /**
44     * @var string
45     */
46    private $paymentMethod;
47
48    /**
49     * @var string
50     */
51    private $transactionId;
52
53    /**
54     * @var string
55     */
56    private $amount;
57
58    /**
59     * @var string|null
60     */
61    private $invoiceNumber;
62
63    /**
64     * @var string
65     */
66    private $cardNumber;
67
68    /**
69     * @var string
70     */
71    private $cardBrand;
72
73    /**
74     * @var string
75     */
76    private $cardExpiration;
77
78    /**
79     * @var string
80     */
81    private $cardHolder;
82
83    /**
84     * @param int $paymentId
85     * @param DateTimeImmutable $date
86     * @param string $paymentMethod
87     * @param string $transactionId
88     * @param string $amount
89     * @param string|null $invoiceNumber
90     * @param string $cardNumber
91     * @param string $cardBrand
92     * @param string $cardExpiration
93     * @param string $cardHolder
94     */
95    public function __construct(
96        int $paymentId,
97        DateTimeImmutable $date,
98        string $paymentMethod,
99        string $transactionId,
100        string $amount,
101        ?string $invoiceNumber,
102        string $cardNumber,
103        string $cardBrand,
104        string $cardExpiration,
105        string $cardHolder
106    ) {
107        $this->paymentId = $paymentId;
108        $this->date = $date;
109        $this->paymentMethod = $paymentMethod;
110        $this->transactionId = $transactionId;
111        $this->amount = $amount;
112        $this->invoiceNumber = $invoiceNumber;
113        $this->cardNumber = $cardNumber;
114        $this->cardBrand = $cardBrand;
115        $this->cardExpiration = $cardExpiration;
116        $this->cardHolder = $cardHolder;
117    }
118
119    /**
120     * @return int
121     */
122    public function getPaymentId(): int
123    {
124        return $this->paymentId;
125    }
126
127    /**
128     * @return DateTimeImmutable
129     */
130    public function getDate(): DateTimeImmutable
131    {
132        return $this->date;
133    }
134
135    /**
136     * @return string
137     */
138    public function getPaymentMethod(): string
139    {
140        return $this->paymentMethod;
141    }
142
143    /**
144     * @return string
145     */
146    public function getTransactionId(): string
147    {
148        return $this->transactionId;
149    }
150
151    /**
152     * @return string
153     */
154    public function getAmount(): string
155    {
156        return $this->amount;
157    }
158
159    /**
160     * @return string|null
161     */
162    public function getInvoiceNumber(): ?string
163    {
164        return $this->invoiceNumber;
165    }
166
167    /**
168     * @return string
169     */
170    public function getCardNumber(): string
171    {
172        return $this->cardNumber;
173    }
174
175    /**
176     * @return string
177     */
178    public function getCardBrand(): string
179    {
180        return $this->cardBrand;
181    }
182
183    /**
184     * @return string
185     */
186    public function getCardExpiration(): string
187    {
188        return $this->cardExpiration;
189    }
190
191    /**
192     * @return string
193     */
194    public function getCardHolder(): string
195    {
196        return $this->cardHolder;
197    }
198}
199