Class: Xero::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/xero/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Configuration

Returns a new instance of Configuration.



7
8
9
10
11
# File 'lib/xero/configuration.rb', line 7

def initialize(options = {})
  default_options = { invoice_due_days: 30 }.merge(options)
  default_options.each { |key, value| self.send("#{key}=", value) }
  self
end

Instance Attribute Details

#consumer_keyObject

Returns the value of attribute consumer_key.



4
5
6
# File 'lib/xero/configuration.rb', line 4

def consumer_key
  @consumer_key
end

#consumer_secretObject

Returns the value of attribute consumer_secret.



4
5
6
# File 'lib/xero/configuration.rb', line 4

def consumer_secret
  @consumer_secret
end

#invoice_due_daysObject

Returns the value of attribute invoice_due_days.



4
5
6
# File 'lib/xero/configuration.rb', line 4

def invoice_due_days
  @invoice_due_days
end

#loggerObject

Returns the value of attribute logger.



4
5
6
# File 'lib/xero/configuration.rb', line 4

def logger
  @logger
end

#private_key_pathObject

Returns the value of attribute private_key_path.



4
5
6
# File 'lib/xero/configuration.rb', line 4

def private_key_path
  @private_key_path
end

Instance Method Details

#xero_urlObject



17
18
19
# File 'lib/xero/configuration.rb', line 17

def xero_url
  'https://api.xero.com/api.xro/2.0'
end