Class: Wesabe::Model::Base

Inherits:
Resourceful::Model::Xml
  • Object
show all
Defined in:
lib/wesabe/model/base.rb

Direct Known Subclasses

Account, Institution, Merchant, Txaction

Class Method Summary collapse

Class Method Details

.configure(opts = {}) ⇒ Object



5
6
7
8
9
# File 'lib/wesabe/model/base.rb', line 5

def self.configure(opts={})
  raise Wesabe::NotConfigured, "No user provided to access the Wesabe API" if blank?(opts[:user]) 
  raise Wesabe::NotConfigured, "No password provided to access the Wesabe API" if blank?(opts[:password]) 
  agent RestClient::Resource.new('https://www.wesabe.com', :user => opts[:user], :password => opts[:password])
end