Sha256: 5ae69d3ec701e9a13dd544910cb7b93a097ce8bafafdc96dbdbabe26de9f700b
Contents?: true
Size: 538 Bytes
Versions: 55
Compression:
Stored size: 538 Bytes
Contents
module Stripe class SingletonAPIResource < APIResource def self.resource_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 resource_url self.class.resource_url end def self.retrieve(opts={}) instance = self.new(nil, Util.normalize_opts(opts)) instance.refresh instance end end end
Version data entries
55 entries across 55 versions & 1 rubygems