1: | <?php |
2: | namespace Hyperwallet\Model; |
3: | |
4: | |
5: | |
6: | |
7: | |
8: | |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | |
15: | |
16: | |
17: | |
18: | |
19: | |
20: | |
21: | |
22: | |
23: | |
24: | |
25: | |
26: | |
27: | |
28: | class PrepaidCard extends BaseModel { |
29: | |
30: | |
31: | |
32: | |
33: | |
34: | |
35: | |
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: | |
69: | |
70: | |
71: | |
72: | public function __construct(array $properties = array()) { |
73: | parent::__construct(self::$READ_ONLY_FIELDS, $properties); |
74: | } |
75: | |
76: | |
77: | |
78: | |
79: | |
80: | |
81: | public function getCardPackage() { |
82: | return $this->cardPackage; |
83: | } |
84: | |
85: | |
86: | |
87: | |
88: | |
89: | |
90: | |
91: | public function setCardPackage($cardPackage) { |
92: | $this->cardPackage = $cardPackage; |
93: | return $this; |
94: | } |
95: | |
96: | |
97: | |
98: | |
99: | |
100: | |
101: | public function getToken() { |
102: | return $this->token; |
103: | } |
104: | |
105: | |
106: | |
107: | |
108: | |
109: | |
110: | |
111: | public function setToken($token) { |
112: | $this->token = $token; |
113: | return $this; |
114: | } |
115: | |
116: | |
117: | |
118: | |
119: | |
120: | |
121: | public function getType() { |
122: | return $this->type; |
123: | } |
124: | |
125: | |
126: | |
127: | |
128: | |
129: | |
130: | |
131: | public function setType($type) { |
132: | $this->type = $type; |
133: | return $this; |
134: | } |
135: | |
136: | |
137: | |
138: | |
139: | |
140: | |
141: | public function getStatus() { |
142: | return $this->status; |
143: | } |
144: | |
145: | |
146: | |
147: | |
148: | |
149: | |
150: | public function getCreatedOn() { |
151: | return $this->createdOn ? new \DateTime($this->createdOn) : null; |
152: | } |
153: | |
154: | |
155: | |
156: | |
157: | |
158: | |
159: | public function getTransferMethodCountry() { |
160: | return $this->transferMethodCountry; |
161: | } |
162: | |
163: | |
164: | |
165: | |
166: | |
167: | |
168: | public function getTransferMethodCurrency() { |
169: | return $this->transferMethodCurrency; |
170: | } |
171: | |
172: | |
173: | |
174: | |
175: | |
176: | |
177: | public function getCardType() { |
178: | return $this->cardType; |
179: | } |
180: | |
181: | |
182: | |
183: | |
184: | |
185: | |
186: | public function getCardNumber() { |
187: | return $this->cardNumber; |
188: | } |
189: | |
190: | |
191: | |
192: | |
193: | |
194: | |
195: | public function getCardBrand() { |
196: | return $this->cardBrand; |
197: | } |
198: | |
199: | |
200: | |
201: | |
202: | |
203: | |
204: | public function getDateOfExpiry() { |
205: | return $this->dateOfExpiry ? new \DateTime($this->dateOfExpiry) : null; |
206: | } |
207: | |
208: | |
209: | |
210: | |
211: | |
212: | |
213: | |
214: | public function getReplacementOf() { |
215: | return $this->replacementOf; |
216: | } |
217: | |
218: | |
219: | |
220: | |
221: | |
222: | |
223: | |
224: | public function setReplacementOf($replacementOf) { |
225: | $this->replacementOf = $replacementOf; |
226: | return $this; |
227: | } |
228: | |
229: | |
230: | |
231: | |
232: | |
233: | |
234: | public function getReplacementReason() { |
235: | return $this->replacementReason; |
236: | } |
237: | |
238: | |
239: | |
240: | |
241: | |
242: | |
243: | |
244: | public function setReplacementReason($replacementReason) { |
245: | $this->replacementReason = $replacementReason; |
246: | return $this; |
247: | } |
248: | |
249: | |
250: | |
251: | |
252: | |
253: | |
254: | public function getIsDefaultTransferMethod() { |
255: | return $this->isDefaultTransferMethod; |
256: | } |
257: | |
258: | |
259: | |
260: | |
261: | |
262: | |
263: | |
264: | public function setIsDefaultTransferMethod($isDefaultTransferMethod) { |
265: | $this->isDefaultTransferMethod = $isDefaultTransferMethod; |
266: | return $this; |
267: | } |
268: | } |
269: | |