lib/xeroizer/generic_application.rb in xeroizer-0.2.0 vs lib/xeroizer/generic_application.rb in xeroizer-0.2.1
- old
+ new
@@ -4,11 +4,11 @@
class GenericApplication
include Http
extend Record::ApplicationHelper
- attr_reader :client, :xero_url, :logger
+ attr_reader :client, :xero_url, :logger, :rate_limit_sleep, :rate_limit_max_attempts
extend Forwardable
def_delegators :client, :access_token
record :Account
@@ -41,10 +41,12 @@
# @see PublicApplication
# @see PrivateApplication
# @see PartnerApplication
def initialize(consumer_key, consumer_secret, options = {})
@xero_url = options[:xero_url] || "https://api.xero.com/api.xro/2.0"
+ @rate_limit_sleep = options[:rate_limit_sleep] || false
+ @rate_limit_max_attempts = options[:rate_limit_max_attempts] || 5
@client = OAuth.new(consumer_key, consumer_secret, options)
end
end
-end
\ No newline at end of file
+end