lib/recurly.rb in recurly-2.1.8 vs lib/recurly.rb in recurly-2.1.9

- old
+ new

@@ -17,10 +17,12 @@ autoload :SubscriptionAddOn, 'recurly/subscription_add_on' autoload :Transaction, 'recurly/transaction' autoload :Version, 'recurly/version' autoload :XML, 'recurly/xml' + @subdomain = nil + # The exception class from which all Recurly exceptions inherit. class Error < StandardError def set_message message @message = message end @@ -34,9 +36,15 @@ # This exception is raised if Recurly has not been configured. class ConfigurationError < Error end class << self + # @return [String] A subdomain. + def subdomain + @subdomain || 'api' + end + attr_writer :subdomain + # @return [String] An API key. # @raise [ConfigurationError] If not configured. def api_key defined? @api_key and @api_key or raise( ConfigurationError, "Recurly.api_key not configured"