1: <?php
2:
3: declare(strict_types=1);
4:
5: /*
6: * This file has been auto generated by Jane,
7: *
8: * Do no edit it directly.
9: */
10:
11: namespace NxSys\Library\Clients\Brex\API\Transactions\Model;
12:
13: class CardTransaction extends \ArrayObject
14: {
15: /**
16: * @var array
17: */
18: protected $initialized = [];
19:
20: public function isInitialized($property): bool
21: {
22: return array_key_exists($property, $this->initialized);
23: }
24: /**
25: * @var string
26: */
27: protected $id;
28: /**
29: * ID of the card used for the transaction. Null when type is REWARDS_CREDIT or COLLECTION.
30: *
31: * @var string|null
32: */
33: protected $cardId;
34: /**
35: * Description of the transaction.
36: *
37: * @var string
38: */
39: protected $description;
40: /**
41: Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination
42: of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
43:
44: *
45: * @var Money
46: */
47: protected $amount;
48: /**
49: * ISO 8601 date string.
50: *
51: * @var \DateTime
52: */
53: protected $initiatedAtDate;
54: /**
55: * ISO 8601 date string.
56: *
57: * @var \DateTime
58: */
59: protected $postedAtDate;
60: /**
61: * @var string
62: */
63: protected $type;
64: /**
65: * @var CardTransactionMerchant
66: */
67: protected $merchant;
68: /**
69: Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.
70: Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
71:
72: *
73: * @var string[]|null
74: */
75: protected $cardMetadata;
76: /**
77: * The expense ID related to the card transaction.
78: *
79: * @var string|null
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: * ID of the card used for the transaction. Null when type is REWARDS_CREDIT or COLLECTION.
98: */
99: public function getCardId(): ?string
100: {
101: return $this->cardId;
102: }
103:
104: /**
105: * ID of the card used for the transaction. Null when type is REWARDS_CREDIT or COLLECTION.
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: * Description of the transaction.
117: */
118: public function getDescription(): string
119: {
120: return $this->description;
121: }
122:
123: /**
124: * Description of the transaction.
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: Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination
136: of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
137: */
138: public function getAmount(): Money
139: {
140: return $this->amount;
141: }
142:
143: /**
144: Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination
145: of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.
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: * ISO 8601 date string.
157: */
158: public function getInitiatedAtDate(): \DateTime
159: {
160: return $this->initiatedAtDate;
161: }
162:
163: /**
164: * ISO 8601 date string.
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: * ISO 8601 date string.
176: */
177: public function getPostedAtDate(): \DateTime
178: {
179: return $this->postedAtDate;
180: }
181:
182: /**
183: * ISO 8601 date string.
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: Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.
221: Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
222:
223: *
224: * @return string[]|null
225: */
226: public function getCardMetadata(): ?iterable
227: {
228: return $this->cardMetadata;
229: }
230:
231: /**
232: Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.
233: Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.
234:
235: *
236: * @param string[]|null $cardMetadata
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: * The expense ID related to the card transaction.
248: */
249: public function getExpenseId(): ?string
250: {
251: return $this->expenseId;
252: }
253:
254: /**
255: * The expense ID related to the card transaction.
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: