M2_Stripe_Transfer

The Membership 2 M2 Stripe Transfer class.

Defined (1)

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

/lib/stripe-php/lib/Stripe/Transfer.php  
  1. class M2_Stripe_Transfer extends M2_Stripe_ApiResource 
  2. /** 
  3. * @param string $id The ID of the transfer to retrieve. 
  4. * @param string|null $apiKey 
  5. * @return Stripe_Transfer 
  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_Transfers. 
  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_Transfer The created transfer. 
  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_Transfer The canceled transfer. 
  31. */ 
  32. public function cancel() 
  33. $requestor = new M2_Stripe_ApiRequestor($this->_apiKey); 
  34. $url = $this->instanceUrl() . '/cancel'; 
  35. list($response, $apiKey) = $requestor->request('post', $url); 
  36. $this->refreshFrom($response, $apiKey); 
  37. return $this; 
  38.  
  39. /** 
  40. * @return Stripe_Transfer The saved transfer. 
  41. */ 
  42. public function save() 
  43. $class = get_class(); 
  44. return self::_scopedSave($class); 
  45.