Path: blob/master/externals/stripe-php/lib/Stripe/ApplicationFee.php
12256 views
<?php12class Stripe_ApplicationFee extends Stripe_ApiResource3{4/**5* This is a special case because the application fee endpoint has an6* underscore in it. The parent `className` function strips underscores.7*8* @return string The name of the class.9*/10public static function className($class)11{12return 'application_fee';13}1415/**16* @param string $id The ID of the application fee to retrieve.17* @param string|null $apiKey18*19* @return Stripe_ApplicationFee20*/21public static function retrieve($id, $apiKey=null)22{23$class = get_class();24return self::_scopedRetrieve($class, $id, $apiKey);25}2627/**28* @param string|null $params29* @param string|null $apiKey30*31* @return array An array of application fees.32*/33public static function all($params=null, $apiKey=null)34{35$class = get_class();36return self::_scopedAll($class, $params, $apiKey);37}3839/**40* @param string|null $params41*42* @return Stripe_ApplicationFee The refunded application fee.43*/44public function refund($params=null)45{46$requestor = new Stripe_ApiRequestor($this->_apiKey);47$url = $this->instanceUrl() . '/refund';48list($response, $apiKey) = $requestor->request('post', $url, $params);49$this->refreshFrom($response, $apiKey);50return $this;51}52}535455