M2_Stripe_SingletonApiResource

The Membership 2 M2 Stripe SingletonApiResource class.

Defined (1)

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

/lib/stripe-php/lib/Stripe/SingletonApiResource.php  
  1. abstract class M2_Stripe_SingletonApiResource extends M2_Stripe_ApiResource 
  2. protected static function _scopedSingletonRetrieve($class, $apiKey=null) 
  3. if ( false === stripos( $class, 'M2_' ) ) { 
  4. $class = 'M2_' . $class; 
  5. $instance = new $class(null, $apiKey); 
  6. $instance->refresh(); 
  7. return $instance; 
  8.  
  9. /** 
  10. * @param Stripe_SingletonApiResource $class 
  11. * @return string The endpoint associated with this singleton class. 
  12. */ 
  13. public static function classUrl($class) 
  14. $base = self::className($class); 
  15. return "/v1/${base}"; 
  16.  
  17. /** 
  18. * @return string The endpoint associated with this singleton API resource. 
  19. */ 
  20. public function instanceUrl() 
  21. $class = get_class($this); 
  22. $base = self::classUrl($class); 
  23. return "$base";