Class: PaylineSDK::Configuration

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

Constant Summary collapse

API =
YAML.load(File.read([(File.expand_path '../../..', __FILE__), 'files', 'settings.yml'].join('/'))).freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
# File 'lib/payline_sdk/configuration.rb', line 8

def initialize
  @file = [PaylineSDK.root, 'files', 'payline.wsdl'].join('/')
end

Instance Attribute Details

#access_keyObject

Returns the value of attribute access_key.



6
7
8
# File 'lib/payline_sdk/configuration.rb', line 6

def access_key
  @access_key
end

#environmentObject

Returns the value of attribute environment.



6
7
8
# File 'lib/payline_sdk/configuration.rb', line 6

def environment
  @environment
end

#fileObject

Returns the value of attribute file.



6
7
8
# File 'lib/payline_sdk/configuration.rb', line 6

def file
  @file
end

#merchant_idObject

Returns the value of attribute merchant_id.



6
7
8
# File 'lib/payline_sdk/configuration.rb', line 6

def merchant_id
  @merchant_id
end

Class Method Details

.api_methodsObject



12
13
14
15
16
17
# File 'lib/payline_sdk/configuration.rb', line 12

def self.api_methods
  API[:apis].keys.each do |api|
    return API[:apis][api][:methods].map {|method| method[:name]}
  end
  return []
end