Class: Yml

Inherits:
Object
  • Object
show all
Defined in:
lib/aspmarketplace/Yml.rb

Constant Summary collapse

@@yml_file =
"#{RAILS_ROOT}/config/amazon_marketplace.yml"
@@yml =
YAML::load(File.read(@@yml_file))

Class Method Summary collapse

Class Method Details

.loadObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/aspmarketplace/Yml.rb', line 9

def self.load
   aspmarketplace::Service.environment = @@yml['environment']
   aspmarketplace::Service.access_key =  @@yml['accessKey']
   aspmarketplace::Service.secret_key =   @@yml['secretKey']
   aspmarketplace::Service.signature_method =   @@yml['signatureMethod']
   aspmarketplace::Services::MarketplacePolicy.return_url =   @@yml['marketplace_policy']['returnUrl']
   aspmarketplace::Services::Marketplace.abandon_url =   @@yml['marketplace']['abandonUrl']
   aspmarketplace::Services::Marketplace.return_url =    @@yml['marketplace']['returnUrl']
   aspmarketplace::Services::Marketplace.immediate_return =   @@yml['marketplace']['immediateReturn']
   aspmarketplace::Services::Marketplace.process_immediate =   @@yml['marketplace']['processImmediate']
   aspmarketplace::Services::Marketplace.ipn_url =   @@yml['marketplace']['ipnUrl']
   aspmarketplace::Services::Marketplace.collect_shipping_address =   @@yml['marketplace']['collectShippingAddress']
end