1: <?php
2: namespace Hyperwallet\Model;
3:
4: /**
5: * Represents a V4 Prepaid Card
6: *
7: * @property string $token The prepaid card token
8: * @property string $type The transfer method type
9: *
10: * @property string $status The prepaid card status
11: * @property \DateTime $createdOn The prepaid card creation date
12: *
13: * @property string $transferMethodCountry The transfer method country
14: * @property string $transferMethodCurrency The transfer method currency
15: *
16: * @property string $cardType The prepaid card type
17: *
18: * @property String $replacementOf The token of prepaid card to be replaced
19: * @property String $replacementReason The prepaid card replacement reason
20: * @property string $cardPackage The prepaid card package
21: * @property string $cardNumber The prepaid card number
22: * @property string $cardBrand The prepaid card brand
23: * @property \DateTime $dateOfExpiry The prepaid card expiry date
24: * @property bool $isDefaultTransferMethod The flag to denote default account
25: *
26: * @package Hyperwallet\Model
27: */
28: class PrepaidCard extends BaseModel {
29:
30: /**
31: * @internal
32: *
33: * Read only fields
34: *
35: * @var string[]
36: */
37: private static $READ_ONLY_FIELDS = array('token', 'status', 'createdOn', 'transferMethodCountry', 'transferMethodCurrency', 'cardType', 'cardNumber', 'cardBrand', 'dateOfExpiry');
38:
39: const TYPE_PREPAID_CARD = 'PREPAID_CARD';
40:
41: const STATUS_QUEUED = 'QUEUED';
42: const STATUS_PRE_ACTIVATED = 'PRE_ACTIVATED';
43: const STATUS_ACTIVATED = 'ACTIVATED';
44: const STATUS_DECLINED = 'DECLINED';
45: const STATUS_LOCKED = 'LOCKED';
46: const STATUS_SUSPENDED = 'SUSPENDED';
47: const STATUS_LOST_OR_STOLEN = 'LOST_OR_STOLEN';
48: const STATUS_DE_ACTIVATED = 'DE_ACTIVATED';
49: const STATUS_COMPLIANCE_HOLD = 'COMPLIANCE_HOLD';
50: const STATUS_KYC_HOLD = 'KYC_HOLD';
51:
52: const CARD_TYPE_PERSONALIZED = 'PERSONALIZED';
53: const CARD_TYPE_VIRTUAL = 'VIRTUAL';
54:
55: const CARD_BRAND_VISA = 'VISA';
56: const CARD_BRAND_MASTERCARD = 'MASTERCARD';
57:
58: const REPLACEMENT_REASON_LOST_STOLEN= 'LOST_STOLEN';
59: const REPLACEMENT_REASON_DAMAGED= 'DAMAGED';
60: const REPLACEMENT_REASON_COMPROMISED= 'COMPROMISED';
61: const REPLACEMENT_REASON_EXPIRED= 'EXPIRED';
62:
63: public static function FILTERS_ARRAY() {
64: return array('status', 'createdBefore', 'createdAfter', 'sortBy', 'limit');
65: }
66:
67: /**
68: * Creates a instance of PrepaidCard
69: *
70: * @param string[] $properties The default properties
71: */
72: public function __construct(array $properties = array()) {
73: parent::__construct(self::$READ_ONLY_FIELDS, $properties);
74: }
75:
76: /**
77: * Get the prepaid card package
78: *
79: * @return string
80: */
81: public function getCardPackage() {
82: return $this->cardPackage;
83: }
84:
85: /**
86: * Set the prepaid card package
87: *
88: * @param string $cardPackage
89: * @return PrepaidCard
90: */
91: public function setCardPackage($cardPackage) {
92: $this->cardPackage = $cardPackage;
93: return $this;
94: }
95:
96: /**
97: * Get the prepaid card token
98: *
99: * @return string
100: */
101: public function getToken() {
102: return $this->token;
103: }
104:
105: /**
106: * Get the prepaid card token
107: *
108: * @param string $token
109: * @return PrepaidCard
110: */
111: public function setToken($token) {
112: $this->token = $token;
113: return $this;
114: }
115:
116: /**
117: * Get the transfer method type
118: *
119: * @return string
120: */
121: public function getType() {
122: return $this->type;
123: }
124:
125: /**
126: * Set the transfer method type
127: *
128: * @param string $type
129: * @return PrepaidCard
130: */
131: public function setType($type) {
132: $this->type = $type;
133: return $this;
134: }
135:
136: /**
137: * Get the prepaid card status
138: *
139: * @return string
140: */
141: public function getStatus() {
142: return $this->status;
143: }
144:
145: /**
146: * Get the prepaid card creation date
147: *
148: * @return \DateTime
149: */
150: public function getCreatedOn() {
151: return $this->createdOn ? new \DateTime($this->createdOn) : null;
152: }
153:
154: /**
155: * Get the transfer method country
156: *
157: * @return string
158: */
159: public function getTransferMethodCountry() {
160: return $this->transferMethodCountry;
161: }
162:
163: /**
164: * Get the transfer method currency
165: *
166: * @return string
167: */
168: public function getTransferMethodCurrency() {
169: return $this->transferMethodCurrency;
170: }
171:
172: /**
173: * Get the prepaid card type
174: *
175: * @return string
176: */
177: public function getCardType() {
178: return $this->cardType;
179: }
180:
181: /**
182: * Get the prepaid card number
183: *
184: * @return string
185: */
186: public function getCardNumber() {
187: return $this->cardNumber;
188: }
189:
190: /**
191: * Get the prepaid card brand
192: *
193: * @return string
194: */
195: public function getCardBrand() {
196: return $this->cardBrand;
197: }
198:
199: /**
200: * Get the prepaid card expiry date
201: *
202: * @return \DateTime
203: */
204: public function getDateOfExpiry() {
205: return $this->dateOfExpiry ? new \DateTime($this->dateOfExpiry) : null;
206: }
207:
208:
209: /**
210: * Get the prepaid card token to be replaced
211: *
212: * @return string
213: */
214: public function getReplacementOf() {
215: return $this->replacementOf;
216: }
217:
218: /**
219: * Set the prepaid card token to be replaced
220: *
221: * @param string $replacementOf
222: * @return PrepaidCard
223: */
224: public function setReplacementOf($replacementOf) {
225: $this->replacementOf = $replacementOf;
226: return $this;
227: }
228:
229: /**
230: * Get the prepaid card's replacement reason
231: *
232: * @return string
233: */
234: public function getReplacementReason() {
235: return $this->replacementReason;
236: }
237:
238: /**
239: * set the prepaid card's replacement reason
240: *
241: * @param string $replacementReason
242: * @return PrepaidCard
243: */
244: public function setReplacementReason($replacementReason) {
245: $this->replacementReason = $replacementReason;
246: return $this;
247: }
248:
249: /**
250: * Get the is default transfer method
251: *
252: * @return bool
253: */
254: public function getIsDefaultTransferMethod() {
255: return $this->isDefaultTransferMethod;
256: }
257:
258: /**
259: * Set the is default transfer method
260: *
261: * @param bool $isDefaultTransferMethod
262: * @return PrepaidCard
263: */
264: public function setIsDefaultTransferMethod($isDefaultTransferMethod) {
265: $this->isDefaultTransferMethod = $isDefaultTransferMethod;
266: return $this;
267: }
268: }
269: