1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | |
6: | |
7: | |
8: | |
9: | |
10: | |
11: | namespace NxSys\Library\Clients\Brex\API\Transactions\Model; |
12: | |
13: | class CardTransaction extends \ArrayObject |
14: | { |
15: | |
16: | |
17: | |
18: | protected $initialized = []; |
19: | |
20: | public function isInitialized($property): bool |
21: | { |
22: | return array_key_exists($property, $this->initialized); |
23: | } |
24: | |
25: | |
26: | |
27: | protected $id; |
28: | |
29: | |
30: | |
31: | |
32: | |
33: | protected $cardId; |
34: | |
35: | |
36: | |
37: | |
38: | |
39: | protected $description; |
40: | |
41: | |
42: | |
43: | |
44: | |
45: | |
46: | |
47: | protected $amount; |
48: | |
49: | |
50: | |
51: | |
52: | |
53: | protected $initiatedAtDate; |
54: | |
55: | |
56: | |
57: | |
58: | |
59: | protected $postedAtDate; |
60: | |
61: | |
62: | |
63: | protected $type; |
64: | |
65: | |
66: | |
67: | protected $merchant; |
68: | |
69: | |
70: | |
71: | |
72: | |
73: | |
74: | |
75: | protected $cardMetadata; |
76: | |
77: | |
78: | |
79: | |
80: | |
81: | protected $expenseId; |
82: | |
83: | public function getId(): string |
84: | { |
85: | return $this->id; |
86: | } |
87: | |
88: | public function setId(string $id): self |
89: | { |
90: | $this->initialized['id'] = true; |
91: | $this->id = $id; |
92: | |
93: | return $this; |
94: | } |
95: | |
96: | |
97: | |
98: | |
99: | public function getCardId(): ?string |
100: | { |
101: | return $this->cardId; |
102: | } |
103: | |
104: | |
105: | |
106: | |
107: | public function setCardId(?string $cardId): self |
108: | { |
109: | $this->initialized['cardId'] = true; |
110: | $this->cardId = $cardId; |
111: | |
112: | return $this; |
113: | } |
114: | |
115: | |
116: | |
117: | |
118: | public function getDescription(): string |
119: | { |
120: | return $this->description; |
121: | } |
122: | |
123: | |
124: | |
125: | |
126: | public function setDescription(string $description): self |
127: | { |
128: | $this->initialized['description'] = true; |
129: | $this->description = $description; |
130: | |
131: | return $this; |
132: | } |
133: | |
134: | |
135: | |
136: | |
137: | |
138: | public function getAmount(): Money |
139: | { |
140: | return $this->amount; |
141: | } |
142: | |
143: | |
144: | |
145: | |
146: | |
147: | public function setAmount(Money $amount): self |
148: | { |
149: | $this->initialized['amount'] = true; |
150: | $this->amount = $amount; |
151: | |
152: | return $this; |
153: | } |
154: | |
155: | |
156: | |
157: | |
158: | public function getInitiatedAtDate(): \DateTime |
159: | { |
160: | return $this->initiatedAtDate; |
161: | } |
162: | |
163: | |
164: | |
165: | |
166: | public function setInitiatedAtDate(\DateTime $initiatedAtDate): self |
167: | { |
168: | $this->initialized['initiatedAtDate'] = true; |
169: | $this->initiatedAtDate = $initiatedAtDate; |
170: | |
171: | return $this; |
172: | } |
173: | |
174: | |
175: | |
176: | |
177: | public function getPostedAtDate(): \DateTime |
178: | { |
179: | return $this->postedAtDate; |
180: | } |
181: | |
182: | |
183: | |
184: | |
185: | public function setPostedAtDate(\DateTime $postedAtDate): self |
186: | { |
187: | $this->initialized['postedAtDate'] = true; |
188: | $this->postedAtDate = $postedAtDate; |
189: | |
190: | return $this; |
191: | } |
192: | |
193: | public function getType(): string |
194: | { |
195: | return $this->type; |
196: | } |
197: | |
198: | public function setType(string $type): self |
199: | { |
200: | $this->initialized['type'] = true; |
201: | $this->type = $type; |
202: | |
203: | return $this; |
204: | } |
205: | |
206: | public function getMerchant(): CardTransactionMerchant |
207: | { |
208: | return $this->merchant; |
209: | } |
210: | |
211: | public function setMerchant(CardTransactionMerchant $merchant): self |
212: | { |
213: | $this->initialized['merchant'] = true; |
214: | $this->merchant = $merchant; |
215: | |
216: | return $this; |
217: | } |
218: | |
219: | |
220: | |
221: | |
222: | |
223: | |
224: | |
225: | |
226: | public function getCardMetadata(): ?iterable |
227: | { |
228: | return $this->cardMetadata; |
229: | } |
230: | |
231: | |
232: | |
233: | |
234: | |
235: | |
236: | |
237: | |
238: | public function setCardMetadata(?iterable $cardMetadata): self |
239: | { |
240: | $this->initialized['cardMetadata'] = true; |
241: | $this->cardMetadata = $cardMetadata; |
242: | |
243: | return $this; |
244: | } |
245: | |
246: | |
247: | |
248: | |
249: | public function getExpenseId(): ?string |
250: | { |
251: | return $this->expenseId; |
252: | } |
253: | |
254: | |
255: | |
256: | |
257: | public function setExpenseId(?string $expenseId): self |
258: | { |
259: | $this->initialized['expenseId'] = true; |
260: | $this->expenseId = $expenseId; |
261: | |
262: | return $this; |
263: | } |
264: | } |
265: | |