PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Entity / Payment / Order.php

Order.php in The Innovative Form Builder – IvyForms 1.5, at backend/src/Entity/Payment/Order.php

82 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Entity\Payment;
4
5 use IvyForms\ValueObjects\Payment\Order as OrderValueObject;
6
7 /**
8 * Order entity wrapping the value object.
9 */
10 class Order
11 {
12 private OrderValueObject $order;
13
14 public function __construct(OrderValueObject $order)
15 {
16 $this->order = $order;
17 }
18
19 public function getId(): int
20 {
21 return $this->order->id;
22 }
23
24 public function setId(int $id): void
25 {
26 $this->order->id = $id;
27 }
28
29 public function getEntryId(): int
30 {
31 return $this->order->entryId;
32 }
33
34 public function getSquareOrderId(): string
35 {
36 return $this->order->squareOrderId;
37 }
38
39 public function getStatus(): string
40 {
41 return $this->order->status;
42 }
43
44 public function setStatus(string $status): void
45 {
46 $this->order->status = $status;
47 }
48
49 public function getSquareCustomerId(): ?string
50 {
51 return $this->order->squareCustomerId;
52 }
53
54 public function getAmount(): int
55 {
56 return $this->order->amount;
57 }
58
59 public function getCurrency(): string
60 {
61 return $this->order->currency;
62 }
63
64 public function getDateCreated(): ?string
65 {
66 return $this->order->dateCreated;
67 }
68
69 public function setDateCreated(string $dateCreated): void
70 {
71 $this->order->dateCreated = $dateCreated;
72 }
73
74 /**
75 * @return mixed[]
76 */
77 public function toArray(): array
78 {
79 return $this->order->toArray();
80 }
81 }
82