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