1: <?php
2: namespace Hyperwallet\Model;
3:
4: /**
5: * Represents a V4 Program Account
6: *
7: * @property string $token The program account token
8: * @property string $type The program account type
9: * @property \DateTime $createdOn The program account creation date
10: * @property string $email The program account email
11: *
12: * @package Hyperwallet\Model
13: */
14: class ProgramAccount extends BaseModel {
15:
16: /**
17: * @internal
18: *
19: * Read only fields
20: *
21: * @var string[]
22: */
23: private static $READ_ONLY_FIELDS = array('token', 'type', 'createdOn', 'email');
24:
25: const TYPE_FUNDING = 'FUNDING';
26: const TYPE_MERCHANT = 'MERCHANT';
27: const TYPE_REVENUE = 'REVENUE';
28: const TYPE_COLLECTIONS = 'COLLECTIONS';
29: const TYPE_VIRTUAL_INCENTIVES = 'VIRTUAL_INCENTIVES';
30: const TYPE_POST_FUNDING = 'POST_FUNDING';
31:
32: /**
33: * Creates a instance of ProgramAccount
34: *
35: * @param string[] $properties The default properties
36: */
37: public function __construct(array $properties = array()) {
38: parent::__construct(self::$READ_ONLY_FIELDS, $properties);
39: }
40:
41: /**
42: * Get the program account token
43: *
44: * @return string
45: */
46: public function getToken() {
47: return $this->token;
48: }
49:
50: /**
51: * Get the program account type
52: *
53: * @return string
54: */
55: public function getType() {
56: return $this->type;
57: }
58:
59: /**
60: * Get the program account creation date
61: *
62: * @return \DateTime
63: */
64: public function getCreatedOn() {
65: return $this->createdOn ? new \DateTime($this->createdOn) : null;
66: }
67:
68: /**
69: * Get the program account email
70: *
71: * @return string
72: */
73: public function getEmail() {
74: return $this->email;
75: }
76:
77: }
78: