PPPStripeAccount

Class Account.

Defined (1)

The class is defined in the following location(s).

/includes/api/stripe-php/lib/Account.php  
  1. class Account extends ApiResource 
  2. public function instanceUrl() 
  3. if ($this['id'] === null) { 
  4. return '/v1/account'; 
  5. } else { 
  6. return parent::instanceUrl(); 
  7.  
  8. /** 
  9. * @param string|null $id 
  10. * @param array|string|null $opts 
  11. * @return Account 
  12. */ 
  13. public static function retrieve($id = null, $opts = null) 
  14. if (!$opts && is_string($id) && substr($id, 0, 3) === 'sk_') { 
  15. $opts = $id; 
  16. $id = null; 
  17. return self::_retrieve($id, $opts); 
  18.  
  19. /** 
  20. * @param array|null $params 
  21. * @param array|string|null $opts 
  22. * @return Account 
  23. */ 
  24. public static function create($params = null, $opts = null) 
  25. return self::_create($params, $opts); 
  26.  
  27. /** 
  28. * @param string $id The ID of the account to update. 
  29. * @param array|null $params 
  30. * @param array|string|null $options 
  31. * @return Account The updated account. 
  32. */ 
  33. public static function update($id, $params = null, $options = null) 
  34. return self::_update($id, $params, $options); 
  35.  
  36. /** 
  37. * @param array|string|null $opts 
  38. * @return Account 
  39. */ 
  40. public function save($opts = null) 
  41. return $this->_save($opts); 
  42.  
  43. /** 
  44. * @param array|null $params 
  45. * @param array|string|null $opts 
  46. * @return Account The deleted account. 
  47. */ 
  48. public function delete($params = null, $opts = null) 
  49. return $this->_delete($params, $opts); 
  50.  
  51. /** 
  52. * @param array|null $params 
  53. * @param array|string|null $opts 
  54. * @return Account The rejected account. 
  55. */ 
  56. public function reject($params = null, $opts = null) 
  57. $url = $this->instanceUrl() . '/reject'; 
  58. list($response, $opts) = $this->_request('post', $url, $params, $opts); 
  59. $this->refreshFrom($response, $opts); 
  60. return $this; 
  61.  
  62. /** 
  63. * @param array|null $params 
  64. * @param array|string|null $opts 
  65. * @return Collection of Accounts 
  66. */ 
  67. public static function all($params = null, $opts = null) 
  68. return self::_all($params, $opts);