AchMandate.php 1.2 KB

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