1 | <?php |
||
18 | class Payment implements PaymentInterface |
||
19 | { |
||
20 | /** |
||
21 | * @ORM\Id |
||
22 | * @ORM\GeneratedValue |
||
23 | * @ORM\Column(type="integer", name="id") |
||
24 | * |
||
25 | * @var int |
||
26 | */ |
||
27 | protected $id; |
||
28 | |||
29 | /** |
||
30 | * @ORM\ManyToOne(targetEntity="Order", inversedBy="payments") |
||
31 | * @ORM\JoinColumn(name="order_id", referencedColumnName="id", nullable=false) |
||
32 | * |
||
33 | * @var OrderInterface |
||
34 | */ |
||
35 | protected $order; |
||
36 | |||
37 | /** |
||
38 | * @ORM\Column(type="string", name="method") |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $method; |
||
43 | |||
44 | /** |
||
45 | * @ORM\Column(type="string", name="currency", length=3) |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $currency; |
||
50 | |||
51 | /** |
||
52 | * @ORM\Column(type="integer", name="total") |
||
53 | * |
||
54 | * @var int |
||
55 | */ |
||
56 | protected $amount = 0; |
||
57 | |||
58 | /** |
||
59 | * @ORM\Column(type="string", name="state") |
||
60 | * |
||
61 | * @var string |
||
62 | */ |
||
63 | protected $state = PaymentInterface::STATE_NEW; |
||
64 | |||
65 | /** |
||
66 | * @ORM\Column(type="datetime", name="created_at") |
||
67 | * |
||
68 | * @var \DateTime |
||
69 | */ |
||
70 | protected $createdAt; |
||
71 | |||
72 | /** |
||
73 | * @ORM\Column(type="datetime", name="updated_at") |
||
74 | * |
||
75 | * @var \DateTime |
||
76 | */ |
||
77 | protected $updatedAt; |
||
78 | |||
79 | /** |
||
80 | * @ORM\Column(type="json_array", name="details") |
||
81 | * |
||
82 | * @var array |
||
83 | */ |
||
84 | protected $details = array(); |
||
85 | |||
86 | /** |
||
87 | * Constructor. |
||
88 | */ |
||
89 | public function __construct() |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function getId() |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function getMethod() |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public function setMethod($method = null) |
||
118 | |||
119 | /** |
||
120 | * {@inheritdoc} |
||
121 | */ |
||
122 | public function getCurrency() |
||
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | public function setCurrency($currency) |
||
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | public function getAmount() |
||
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | public function setAmount($amount) |
||
150 | |||
151 | /** |
||
152 | * {@inheritdoc} |
||
153 | */ |
||
154 | public function getState() |
||
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | */ |
||
162 | public function setState($state) |
||
166 | |||
167 | /** |
||
168 | * {@inheritdoc} |
||
169 | */ |
||
170 | public function getCreatedAt() |
||
174 | |||
175 | /** |
||
176 | * {@inheritdoc} |
||
177 | */ |
||
178 | public function setCreatedAt(\DateTime $createdAt) |
||
182 | |||
183 | /** |
||
184 | * {@inheritdoc} |
||
185 | */ |
||
186 | public function getUpdatedAt() |
||
190 | |||
191 | /** |
||
192 | * {@inheritdoc} |
||
193 | */ |
||
194 | public function setUpdatedAt(\DateTime $updatedAt) |
||
198 | |||
199 | /** |
||
200 | * {@inheritdoc} |
||
201 | */ |
||
202 | public function setDetails($details) |
||
214 | |||
215 | /** |
||
216 | * {@inheritdoc} |
||
217 | */ |
||
218 | public function getDetails() |
||
222 | |||
223 | /** |
||
224 | * Gets the order. |
||
225 | * |
||
226 | * @return OrderInterface Order |
||
227 | */ |
||
228 | public function getOrder() |
||
232 | |||
233 | /** |
||
234 | * Sets the order. |
||
235 | * |
||
236 | * @param OrderInterface Order |
||
237 | */ |
||
238 | public function setOrder(OrderInterface $order) |
||
242 | } |
||
243 |