/lib/stripe-php/lib/Stripe/Transfer.php

  1. <?php 
  2.  
  3. class M2_Stripe_Transfer extends M2_Stripe_ApiResource 
  4. /** 
  5. * @param string $id The ID of the transfer to retrieve. 
  6. * @param string|null $apiKey 
  7. * 
  8. * @return Stripe_Transfer 
  9. */ 
  10. public static function retrieve($id, $apiKey=null) 
  11. $class = get_class(); 
  12. return self::_scopedRetrieve($class, $id, $apiKey); 
  13.  
  14. /** 
  15. * @param array|null $params 
  16. * @param string|null $apiKey 
  17. * 
  18. * @return array An array of Stripe_Transfers. 
  19. */ 
  20. public static function all($params=null, $apiKey=null) 
  21. $class = get_class(); 
  22. return self::_scopedAll($class, $params, $apiKey); 
  23.  
  24. /** 
  25. * @param array|null $params 
  26. * @param string|null $apiKey 
  27. * 
  28. * @return Stripe_Transfer The created transfer. 
  29. */ 
  30. public static function create($params=null, $apiKey=null) 
  31. $class = get_class(); 
  32. return self::_scopedCreate($class, $params, $apiKey); 
  33.  
  34. /** 
  35. * @return Stripe_Transfer The canceled transfer. 
  36. */ 
  37. public function cancel() 
  38. $requestor = new M2_Stripe_ApiRequestor($this->_apiKey); 
  39. $url = $this->instanceUrl() . '/cancel'; 
  40. list($response, $apiKey) = $requestor->request('post', $url); 
  41. $this->refreshFrom($response, $apiKey); 
  42. return $this; 
  43.  
  44. /** 
  45. * @return Stripe_Transfer The saved transfer. 
  46. */ 
  47. public function save() 
  48. $class = get_class(); 
  49. return self::_scopedSave($class); 
  50.  
.