IbanBankAccount.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Braintree;
  3. /**
  4. * Braintree IbanBankAccount module
  5. * PHP Version 5
  6. *
  7. * @package Braintree
  8. *
  9. * @property-read string $maskedIban
  10. * @property-read string $bic
  11. * @property-read string $ibanCountry
  12. * @property-read string $description
  13. * @property-read string $ibanAccountNumberLast4
  14. */
  15. class IbanBankAccount extends Base
  16. {
  17. /**
  18. * create a printable representation of the object as:
  19. * ClassName[property=value, property=value]
  20. * @ignore
  21. * @return string
  22. */
  23. public function __toString()
  24. {
  25. return __CLASS__ . '[' .
  26. Util::attributesToString($this->_attributes) . ']';
  27. }
  28. /**
  29. * sets instance properties from an array of values
  30. *
  31. * @ignore
  32. * @access protected
  33. * @param array $ibanAttribs array of ibanBankAccount data
  34. * @return void
  35. */
  36. protected function _initialize($ibanAttribs)
  37. {
  38. // set the attributes
  39. $this->_attributes = $ibanAttribs;
  40. }
  41. /**
  42. * factory method: returns an instance of IbanBankAccount
  43. * to the requesting method, with populated properties
  44. * @ignore
  45. * @return IbanBankAccount
  46. */
  47. public static function factory($attributes)
  48. {
  49. $instance = new self();
  50. $instance->_initialize($attributes);
  51. return $instance;
  52. }
  53. }
  54. class_alias('Braintree\IbanBankAccount', 'Braintree_IbanBankAccount');