M2_Stripe_ApplicationFee

The Membership 2 M2 Stripe ApplicationFee class.

Defined (1)

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

/lib/stripe-php/lib/Stripe/ApplicationFee.php  
  1. class M2_Stripe_ApplicationFee extends M2_Stripe_ApiResource 
  2. /** 
  3. * This is a special case because the application fee endpoint has an 
  4. * underscore in it. The parent `className` function strips underscores. 
  5. * @return string The name of the class. 
  6. */ 
  7. public static function className($class) 
  8. return 'application_fee'; 
  9.  
  10. /** 
  11. * @param string $id The ID of the application fee to retrieve. 
  12. * @param string|null $apiKey 
  13. * @return Stripe_ApplicationFee 
  14. */ 
  15. public static function retrieve($id, $apiKey=null) 
  16. $class = get_class(); 
  17. return self::_scopedRetrieve($class, $id, $apiKey); 
  18.  
  19. /** 
  20. * @param string|null $params 
  21. * @param string|null $apiKey 
  22. * @return array An array of application fees. 
  23. */ 
  24. public static function all($params=null, $apiKey=null) 
  25. $class = get_class(); 
  26. return self::_scopedAll($class, $params, $apiKey); 
  27.  
  28. /** 
  29. * @param string|null $params 
  30. * @return Stripe_ApplicationFee The refunded application fee. 
  31. */ 
  32. public function refund($params=null) 
  33. $requestor = new M2_Stripe_ApiRequestor($this->_apiKey); 
  34. $url = $this->instanceUrl() . '/refund'; 
  35. list($response, $apiKey) = $requestor->request('post', $url, $params); 
  36. $this->refreshFrom($response, $apiKey); 
  37. return $this;