module Rents
Constants
- MAJOR
- MINOR
- PATCH
- VERSION
Public Class Methods
app_id()
click to toggle source
# File lib/rents.rb, line 42 def self.app_id @@app_id end
app_id=(app_id)
click to toggle source
# File lib/rents.rb, line 38 def self.app_id=(app_id) @@app_id = app_id end
debug()
click to toggle source
# File lib/rents.rb, line 62 def self.debug @@debug end
debug=(debug)
click to toggle source
# File lib/rents.rb, line 66 def self.debug=(debug) @@debug = debug end
enum()
click to toggle source
# File lib/rents.rb, line 75 def self.enum return @@enum unless @@enum.nil? enum = {} enum = enum.merge load_yml('brands.yml') enum = enum.merge load_yml('currencies.yml') enum = enum.merge load_yml('payment_methods.yml') enum = enum.merge load_yml('recurrence_periods.yml') enum = enum.merge load_yml('transaction_codes.yml') enum = enum.it_keys_to_sym @@enum = enum end
get_proxy_from_yml()
click to toggle source
# File lib/rents.rb, line 70 def self.get_proxy_from_yml yml = YAML::load_file(File.join(File.dirname(File.expand_path(__FILE__)), 'rents/config/proxy.yml')) !yml.nil? || yml.is_a?(Hash) ? yml.it_keys_to_sym : {} if yml end
load_yml(file_name)
click to toggle source
# File lib/rents.rb, line 89 def self.load_yml(file_name) YAML::load_file(File.join(File.dirname(File.expand_path(__FILE__)), 'rents/config/enums/' + file_name)) end
proxy()
click to toggle source
# File lib/rents.rb, line 33 def self.proxy return nil if Rents.proxy_yml.nil? || Rents.proxy_yml.empty? "http://#{Rents.proxy_yml[:login]}:#{Rents.proxy_yml[:password]}@#{Rents.proxy_yml[:host]}:#{Rents.proxy_yml[:port]}/" end
proxy_yml()
click to toggle source
# File lib/rents.rb, line 28 def self.proxy_yml @@proxy_yml = Rents.get_proxy_from_yml if @@proxy_yml.nil? @@proxy_yml end
secret_key()
click to toggle source
# File lib/rents.rb, line 50 def self.secret_key @@secret_key end
secret_key=(secret_key)
click to toggle source
# File lib/rents.rb, line 46 def self.secret_key=(secret_key) @@secret_key = secret_key end
test_env()
click to toggle source
# File lib/rents.rb, line 54 def self.test_env @@test_env end
test_env=(test_env)
click to toggle source
# File lib/rents.rb, line 58 def self.test_env=(test_env) @@test_env = test_env end