class Xeroizer::GenericApplication
Attributes
after_request[R]
around_request[R]
before_request[R]
client[R]
default_headers[R]
logger[R]
nonce_used_max_attempts[R]
rate_limit_max_attempts[R]
rate_limit_sleep[R]
unitdp[R]
xero_url[R]
Public Class Methods
new(consumer_key, consumer_secret, options = {})
click to toggle source
Never used directly. Use sub-classes instead. @see PublicApplication
@see PrivateApplication
@see PartnerApplication
# File lib/xeroizer/generic_application.rb, line 66 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 @nonce_used_max_attempts = options[:nonce_used_max_attempts] || 1 @default_headers = options[:default_headers] || {} @before_request = options.delete(:before_request) @after_request = options.delete(:after_request) @around_request = options.delete(:around_request) @client = OAuth.new(consumer_key, consumer_secret, options.merge({default_headers: default_headers})) @logger = options[:logger] || false @unitdp = options[:unitdp] || 2 end
Public Instance Methods
payroll(options = {})
click to toggle source
# File lib/xeroizer/generic_application.rb, line 80 def payroll(options = {}) xero_client = self.clone xero_client.xero_url = options[:xero_url] || "https://api.xero.com/payroll.xro/1.0" @payroll ||= PayrollApplication.new(xero_client) end