UsBankAccountVerification.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. namespace Braintree;
  3. /**
  4. * Braintree UsBankAccountVerification module
  5. *
  6. * @package Braintree
  7. * @category Resources
  8. */
  9. /**
  10. * Manages Braintree UsBankAccountVerifications
  11. *
  12. * <b>== More information ==</b>
  13. *
  14. *
  15. * @package Braintree
  16. * @category Resources
  17. *
  18. */
  19. class UsBankAccountVerification extends Result\UsBankAccountVerification
  20. {
  21. /**
  22. * factory method: returns an instance of UsBankAccountVerification
  23. * to the requesting method, with populated properties
  24. *
  25. * @ignore
  26. * @return UsBankAccountVerification
  27. */
  28. public static function factory($attributes)
  29. {
  30. $instance = new self($attributes);
  31. $instance->_initialize($attributes);
  32. return $instance;
  33. }
  34. /* instance methods */
  35. /**
  36. * sets instance properties from an array of values
  37. *
  38. * @access protected
  39. * @param array $usBankAccountVerificationAttribs array of usBankAccountVerification data
  40. * @return void
  41. */
  42. protected function _initialize($usBankAccountVerificationAttribs)
  43. {
  44. // set the attributes
  45. $this->_attributes = $usBankAccountVerificationAttribs;
  46. }
  47. /**
  48. * create a printable representation of the object as:
  49. * ClassName[property=value, property=value]
  50. * @return string
  51. */
  52. public function __toString()
  53. {
  54. return __CLASS__ . '[' . Util::attributesToString($this->_attributes) . ']';
  55. }
  56. // static methods redirecting to gateway
  57. /**
  58. * finds a US bank account verification
  59. *
  60. * @access public
  61. * @param string $token unique id
  62. * @return UsBankAccountVerification
  63. */
  64. public static function find($token)
  65. {
  66. return Configuration::gateway()->usBankAccountVerification()->find($token);
  67. }
  68. /**
  69. * Returns a ResourceCollection of US bank account verifications matching the search query.
  70. *
  71. * @access public
  72. * @param mixed $query search query
  73. * @return ResourceCollection
  74. */
  75. public static function search($query)
  76. {
  77. return Configuration::gateway()->usBankAccountVerification()->search($query);
  78. }
  79. /**
  80. * Returns a ResourceCollection of US bank account verifications matching the search query.
  81. *
  82. * @access public
  83. * @param string $token unique id
  84. * @param array $amounts micro transfer amounts
  85. * @return ResourceCollection
  86. */
  87. public static function confirmMicroTransferAmounts($token, $amounts)
  88. {
  89. return Configuration::gateway()->usBankAccountVerification()->confirmMicroTransferAmounts($token, $amounts);
  90. }
  91. }
  92. class_alias('Braintree\UsBankAccountVerification', 'Braintree_UsBankAccountVerification');