lib/etsy.rb in etsy-0.3.1 vs lib/etsy.rb in etsy-0.3.2
- old
+ new
@@ -26,10 +26,11 @@
require 'etsy/shipping_template'
require 'etsy/section'
require 'etsy/favorite_listing'
require 'etsy/receipt'
require 'etsy/variation/property_set'
+require 'etsy/about'
# = Etsy: A friendly Ruby interface to the Etsy API
#
# == Quick Start
#
@@ -81,11 +82,11 @@
end
def self.api_secret
Thread.current[:etsy_api_secret] || @api_secret
end
-
+
def self.api_secret=(secret)
@api_secret ||= secret
Thread.current[:etsy_api_secret] = secret
end
@@ -100,17 +101,17 @@
raise(ArgumentError, "environment must be set to either :sandbox or :production")
end
@environment = environment
@host = (environment == :sandbox) ? SANDBOX_HOST : PRODUCTION_HOST
end
-
+
def self.protocol=(protocol)
unless ["http", "https"].include?(protocol.to_s)
raise(ArgumentError, "protocol must be set to either 'http' or 'https'")
end
@protocol = protocol.to_s
end
-
+
# Allow throwing API errors
#
def self.silent_errors=(bool)
unless [TrueClass, FalseClass].include?(bool.class)
raise(ArgumentError, "Silent errors must be set to either true or false'")