M2_Stripe_Refund

The Membership 2 M2 Stripe Refund class.

Defined (1)

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

/lib/stripe-php/lib/Stripe/Refund.php  
  1. class M2_Stripe_Refund extends M2_Stripe_ApiResource 
  2. /** 
  3. * @return string The API URL for this Stripe refund. 
  4. */ 
  5. public function instanceUrl() 
  6. $id = $this['id']; 
  7. $charge = $this['charge']; 
  8. if (!$id) { 
  9. throw new M2_Stripe_InvalidRequestError( 
  10. "Could not determine which URL to request: " . 
  11. "class instance has invalid ID: $id",  
  12. null 
  13. ); 
  14. $id = M2_Stripe_ApiRequestor::utf8($id); 
  15. $charge = M2_Stripe_ApiRequestor::utf8($charge); 
  16.  
  17. $base = self::classUrl('M2_Stripe_Charge'); 
  18. $chargeExtn = urlencode($charge); 
  19. $extn = urlencode($id); 
  20. return "$base/$chargeExtn/refunds/$extn"; 
  21.  
  22. /** 
  23. * @return Stripe_Refund The saved refund. 
  24. */ 
  25. public function save() 
  26. $class = get_class(); 
  27. return self::_scopedSave($class);