1: | <?php |
2: | |
3: | |
4: | namespace Hyperwallet\Model; |
5: | /** |
6: | * Represents a V4 Venmo Account |
7: | * |
8: | * @property string $token The Venmo account token |
9: | * @property string $status The Venmo account status |
10: | * @property \DateTime $createdOn The Venmo account creation date |
11: | * @property string $type The transfer method type |
12: | * @property string $transferMethodCountry The transfer method country |
13: | * @property string $transferMethodCurrency The transfer method currency |
14: | * @property bool $isDefaultTransferMethod The flag to denote default account |
15: | * @property string $accountId The Venmo account |
16: | * |
17: | * @package Hyperwallet\Model |
18: | */ |
19: | class VenmoAccount extends BaseModel { |
20: | /** |
21: | * @internal |
22: | * |
23: | * Read only fields |
24: | * |
25: | * @var string[] |
26: | */ |
27: | private static $READ_ONLY_FIELDS = array('token', 'status', 'createdOn'); |
28: | |
29: | public static function FILTERS_ARRAY() { |
30: | return array('status', 'type', 'createdBefore', 'createdAfter', 'sortBy', 'limit'); |
31: | } |
32: | |
33: | /** |
34: | * Creates a instance of VenmoAccount |
35: | * |
36: | * @param string[] $properties The default properties |
37: | */ |
38: | public function __construct(array $properties = array()) { |
39: | parent::__construct(self::$READ_ONLY_FIELDS, $properties); |
40: | } |
41: | |
42: | /** |
43: | * Get the Venmo account token |
44: | * |
45: | * @return string |
46: | */ |
47: | public function getToken() { |
48: | return $this->token; |
49: | } |
50: | |
51: | /** |
52: | * Set the Venmo account token |
53: | * |
54: | * @param string $token |
55: | * @return VenmoAccount |
56: | */ |
57: | public function setToken($token) { |
58: | $this->token = $token; |
59: | return $this; |
60: | } |
61: | |
62: | /** |
63: | * Get the Venmo account status |
64: | * |
65: | * @return string |
66: | */ |
67: | public function getStatus() { |
68: | return $this->status; |
69: | } |
70: | |
71: | /** |
72: | * Get the Venmo account creation date |
73: | * |
74: | * @return \DateTime |
75: | */ |
76: | public function getCreatedOn() { |
77: | return $this->createdOn ? new \DateTime($this->createdOn) : null; |
78: | } |
79: | |
80: | /** |
81: | * Get the transfer method type |
82: | * |
83: | * @return string |
84: | */ |
85: | public function getType() { |
86: | return $this->type; |
87: | } |
88: | |
89: | /** |
90: | * Set the transfer method type |
91: | * |
92: | * @param string $type |
93: | * @return VenmoAccount |
94: | */ |
95: | public function setType($type) { |
96: | $this->type = $type; |
97: | return $this; |
98: | } |
99: | |
100: | /** |
101: | * Get the transfer method country |
102: | * |
103: | * @return string |
104: | */ |
105: | public function getTransferMethodCountry() { |
106: | return $this->transferMethodCountry; |
107: | } |
108: | |
109: | /** |
110: | * Set the transfer method country |
111: | * |
112: | * @param string $transferMethodCountry |
113: | * @return VenmoAccount |
114: | */ |
115: | public function setTransferMethodCountry($transferMethodCountry) { |
116: | $this->transferMethodCountry = $transferMethodCountry; |
117: | return $this; |
118: | } |
119: | |
120: | /** |
121: | * Get the transfer method currency |
122: | * |
123: | * @return string |
124: | */ |
125: | public function getTransferMethodCurrency() { |
126: | return $this->transferMethodCurrency; |
127: | } |
128: | |
129: | /** |
130: | * Set the transfer method currency |
131: | * |
132: | * @param string $transferMethodCurrency |
133: | * @return VenmoAccount |
134: | */ |
135: | public function setTransferMethodCurrency($transferMethodCurrency) { |
136: | $this->transferMethodCurrency = $transferMethodCurrency; |
137: | return $this; |
138: | } |
139: | |
140: | /** |
141: | * Get the is default transfer method |
142: | * |
143: | * @return bool |
144: | */ |
145: | public function getIsDefaultTransferMethod() { |
146: | return $this->isDefaultTransferMethod; |
147: | } |
148: | |
149: | /** |
150: | * Set the is default transfer method |
151: | * |
152: | * @param bool $isDefaultTransferMethod |
153: | * @return VenmoAccount |
154: | */ |
155: | public function setIsDefaultTransferMethod($isDefaultTransferMethod) { |
156: | $this->isDefaultTransferMethod = $isDefaultTransferMethod; |
157: | return $this; |
158: | } |
159: | |
160: | /** |
161: | * Get the Venmo account |
162: | * |
163: | * @return string |
164: | */ |
165: | public function getAccountId() { |
166: | return $this->accountId; |
167: | } |
168: | |
169: | /** |
170: | * Set the Venmo account |
171: | * |
172: | * @param string $accountId |
173: | * @return VenmoAccount |
174: | */ |
175: | public function setAccountId($accountId) { |
176: | $this->accountId = $accountId; |
177: | return $this; |
178: | } |
179: | |
180: | |
181: | } |
182: |