Module: Easybill

Defined in:
lib/easybill.rb,
lib/easybill/error.rb,
lib/easybill/client.rb,
lib/easybill/payment.rb,
lib/easybill/railtie.rb,
lib/easybill/version.rb,
lib/easybill/customer.rb,
lib/easybill/document.rb,
lib/easybill/configuration.rb

Defined Under Namespace

Classes: Client, Configuration, Customer, Document, Error, Payment, Railtie

Constant Summary collapse

VERSION =
'0.2.23'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Public: The configuration object.

Returns Easybill configuration



37
38
39
# File 'lib/easybill.rb', line 37

def configuration
  @configuration ||= Configuration.new
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Public: Call this method to modify defaults in your initializers.

Examples:

Easybill.configure do |config|
  config.api_key = '1234678...'
end

Yields Easybill configuration

Yields:



30
31
32
# File 'lib/easybill.rb', line 30

def configure
  yield(configuration)
end

.root_pathObject



48
49
50
# File 'lib/easybill.rb', line 48

def root_path
  File.expand_path(File.join(__FILE__, '../..'))
end

.wsdlObject



41
42
43
44
45
46
# File 'lib/easybill.rb', line 41

def wsdl
  return @wsdl if @wsdl
  wsdl_path = File.join(root_path, 'wsdl')
  @wsdl = File.read(File.join(root_path, 'wsdl/soap.easybill.wsdl'))
    .gsub('WSDL_PATH', wsdl_path)
end