| 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 Transfer extends BaseModel { |
| 29: | |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | |
| 35: | |
| 36: | |
| 37: | private static $READ_ONLY_FIELDS = array('token', 'status', 'createdOn', 'sourceFeeAmount', 'destinationFeeAmount', 'foreignExchanges', 'expiresOn'); |
| 38: | |
| 39: | const STATUS_QUOTED = 'QUOTED'; |
| 40: | const STATUS_SCHEDULED = 'SCHEDULED'; |
| 41: | const STATUS_IN_PROGRESS = 'IN_PROGRESS'; |
| 42: | const STATUS_VERIFICATION_REQUIRED = 'VERIFICATION_REQUIRED'; |
| 43: | const STATUS_COMPLETED = 'COMPLETED'; |
| 44: | const STATUS_CANCELLED = 'CANCELLED'; |
| 45: | const STATUS_RETURNED = 'RETURNED'; |
| 46: | const STATUS_FAILED = 'FAILED'; |
| 47: | const STATUS_EXPIRED = 'EXPIRED'; |
| 48: | |
| 49: | public static function FILTERS_ARRAY() { |
| 50: | return array('clientTransferId','sourceToken','destinationToken', 'createdBefore', 'createdAfter', 'limit'); |
| 51: | } |
| 52: | |
| 53: | |
| 54: | |
| 55: | |
| 56: | |
| 57: | |
| 58: | public function __construct(array $properties = array()) { |
| 59: | parent::__construct(self::$READ_ONLY_FIELDS, $properties); |
| 60: | } |
| 61: | |
| 62: | |
| 63: | |
| 64: | |
| 65: | |
| 66: | |
| 67: | public function getToken() { |
| 68: | return $this->token; |
| 69: | } |
| 70: | |
| 71: | |
| 72: | |
| 73: | |
| 74: | |
| 75: | |
| 76: | |
| 77: | public function setToken($token) { |
| 78: | $this->token = $token; |
| 79: | return $this; |
| 80: | } |
| 81: | |
| 82: | |
| 83: | |
| 84: | |
| 85: | |
| 86: | |
| 87: | public function getStatus() { |
| 88: | return $this->status; |
| 89: | } |
| 90: | |
| 91: | |
| 92: | |
| 93: | |
| 94: | |
| 95: | |
| 96: | public function getCreatedOn() { |
| 97: | return $this->createdOn ? new \DateTime($this->createdOn) : null; |
| 98: | } |
| 99: | |
| 100: | |
| 101: | |
| 102: | |
| 103: | |
| 104: | |
| 105: | public function getClientTransferId() { |
| 106: | return $this->clientTransferId; |
| 107: | } |
| 108: | |
| 109: | |
| 110: | |
| 111: | |
| 112: | |
| 113: | |
| 114: | |
| 115: | public function setClientTransferId($clientTransferId) { |
| 116: | $this->clientTransferId = $clientTransferId; |
| 117: | return $this; |
| 118: | } |
| 119: | |
| 120: | |
| 121: | |
| 122: | |
| 123: | |
| 124: | |
| 125: | public function getSourceToken() { |
| 126: | return $this->sourceToken; |
| 127: | } |
| 128: | |
| 129: | |
| 130: | |
| 131: | |
| 132: | |
| 133: | |
| 134: | |
| 135: | public function setSourceToken($sourceToken) { |
| 136: | $this->sourceToken = $sourceToken; |
| 137: | return $this; |
| 138: | } |
| 139: | |
| 140: | |
| 141: | |
| 142: | |
| 143: | |
| 144: | |
| 145: | public function getSourceAmount() { |
| 146: | return $this->sourceAmount; |
| 147: | } |
| 148: | |
| 149: | |
| 150: | |
| 151: | |
| 152: | |
| 153: | |
| 154: | |
| 155: | public function setSourceAmount($sourceAmount) { |
| 156: | $this->sourceAmount = $sourceAmount; |
| 157: | return $this; |
| 158: | } |
| 159: | |
| 160: | |
| 161: | |
| 162: | |
| 163: | |
| 164: | |
| 165: | public function getSourceFeeAmount() { |
| 166: | return $this->sourceFeeAmount; |
| 167: | } |
| 168: | |
| 169: | |
| 170: | |
| 171: | |
| 172: | |
| 173: | |
| 174: | public function getSourceCurrency() { |
| 175: | return $this->sourceCurrency; |
| 176: | } |
| 177: | |
| 178: | |
| 179: | |
| 180: | |
| 181: | |
| 182: | |
| 183: | |
| 184: | public function setSourceCurrency($sourceCurrency) { |
| 185: | $this->sourceCurrency = $sourceCurrency; |
| 186: | return $this; |
| 187: | } |
| 188: | |
| 189: | |
| 190: | |
| 191: | |
| 192: | |
| 193: | |
| 194: | public function getDestinationToken() { |
| 195: | return $this->destinationToken; |
| 196: | } |
| 197: | |
| 198: | |
| 199: | |
| 200: | |
| 201: | |
| 202: | |
| 203: | |
| 204: | public function setDestinationToken($destinationToken) { |
| 205: | $this->destinationToken = $destinationToken; |
| 206: | return $this; |
| 207: | } |
| 208: | |
| 209: | |
| 210: | |
| 211: | |
| 212: | |
| 213: | |
| 214: | public function getDestinationAmount() { |
| 215: | return $this->destinationAmount; |
| 216: | } |
| 217: | |
| 218: | |
| 219: | |
| 220: | |
| 221: | |
| 222: | |
| 223: | |
| 224: | public function setDestinationAmount($destinationAmount) { |
| 225: | $this->destinationAmount = $destinationAmount; |
| 226: | return $this; |
| 227: | } |
| 228: | |
| 229: | |
| 230: | |
| 231: | |
| 232: | |
| 233: | |
| 234: | public function getDestinationFeeAmount() { |
| 235: | return $this->destinationFeeAmount; |
| 236: | } |
| 237: | |
| 238: | |
| 239: | |
| 240: | |
| 241: | |
| 242: | |
| 243: | public function getDestinationCurrency() { |
| 244: | return $this->destinationCurrency; |
| 245: | } |
| 246: | |
| 247: | |
| 248: | |
| 249: | |
| 250: | |
| 251: | |
| 252: | |
| 253: | public function setDestinationCurrency($destinationCurrency) { |
| 254: | $this->destinationCurrency = $destinationCurrency; |
| 255: | return $this; |
| 256: | } |
| 257: | |
| 258: | |
| 259: | |
| 260: | |
| 261: | |
| 262: | |
| 263: | public function getForeignExchanges() { |
| 264: | return $this->foreignExchanges; |
| 265: | } |
| 266: | |
| 267: | |
| 268: | |
| 269: | |
| 270: | |
| 271: | |
| 272: | public function getNotes() { |
| 273: | return $this->notes; |
| 274: | } |
| 275: | |
| 276: | |
| 277: | |
| 278: | |
| 279: | |
| 280: | |
| 281: | |
| 282: | public function setNotes($notes) { |
| 283: | $this->notes = $notes; |
| 284: | return $this; |
| 285: | } |
| 286: | |
| 287: | |
| 288: | |
| 289: | |
| 290: | |
| 291: | |
| 292: | public function getMemo() { |
| 293: | return $this->memo; |
| 294: | } |
| 295: | |
| 296: | |
| 297: | |
| 298: | |
| 299: | |
| 300: | |
| 301: | |
| 302: | public function setMemo($memo) { |
| 303: | $this->memo = $memo; |
| 304: | return $this; |
| 305: | } |
| 306: | |
| 307: | |
| 308: | |
| 309: | |
| 310: | |
| 311: | |
| 312: | public function getExpiresOn() { |
| 313: | return $this->expiresOn ? new \DateTime($this->expiresOn) : null; |
| 314: | } |
| 315: | } |
| 316: | |