Sha256: 4003d6bcb237a48bb7a51402a3698b2db8783643950eda5af0c4751b98f4961c
Contents?: true
Size: 499 Bytes
Versions: 22
Compression:
Stored size: 499 Bytes
Contents
module Stripe class SingletonAPIResource < APIResource def self.url() if self == SingletonAPIResource raise NotImplementedError.new('SingletonAPIResource is an abstract class. You should perform actions on its subclasses (Account, etc.)') end "/v1/#{CGI.escape(class_name.downcase)}" end def url self.class.url end def self.retrieve(api_key=nil) instance = self.new(nil, api_key) instance.refresh instance end end end
Version data entries
22 entries across 22 versions & 1 rubygems