M2_Stripe_Recipient

The Membership 2 M2 Stripe Recipient class.

Defined (1)

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

/lib/stripe-php/lib/Stripe/Recipient.php  
  1. class M2_Stripe_Recipient extends M2_Stripe_ApiResource 
  2. /** 
  3. * @param string $id The ID of the recipient to retrieve. 
  4. * @param string|null $apiKey 
  5. * @return Stripe_Recipient 
  6. */ 
  7. public static function retrieve($id, $apiKey=null) 
  8. $class = get_class(); 
  9. return self::_scopedRetrieve($class, $id, $apiKey); 
  10.  
  11. /** 
  12. * @param array|null $params 
  13. * @param string|null $apiKey 
  14. * @return array An array of Stripe_Recipients. 
  15. */ 
  16. public static function all($params=null, $apiKey=null) 
  17. $class = get_class(); 
  18. return self::_scopedAll($class, $params, $apiKey); 
  19.  
  20. /** 
  21. * @param array|null $params 
  22. * @param string|null $apiKey 
  23. * @return Stripe_Recipient The created recipient. 
  24. */ 
  25. public static function create($params=null, $apiKey=null) 
  26. $class = get_class(); 
  27. return self::_scopedCreate($class, $params, $apiKey); 
  28.  
  29. /** 
  30. * @return Stripe_Recipient The saved recipient. 
  31. */ 
  32. public function save() 
  33. $class = get_class(); 
  34. return self::_scopedSave($class); 
  35.  
  36. /** 
  37. * @param array|null $params 
  38. * @return Stripe_Recipient The deleted recipient. 
  39. */ 
  40. public function delete($params=null) 
  41. $class = get_class(); 
  42. return self::_scopedDelete($class, $params); 
  43.  
  44.  
  45. /** 
  46. * @param array|null $params 
  47. * @return array An array of the recipient's Stripe_Transfers. 
  48. */ 
  49. public function transfers($params=null) 
  50. if (!$params) 
  51. $params = array(); 
  52. $params['recipient'] = $this->id; 
  53. $transfers = M2_Stripe_Transfer::all($params, $this->_apiKey); 
  54. return $transfers;