Module: Laundry

Defined in:
lib/laundry.rb,
lib/laundry/version.rb,
lib/laundry/lib/soap_model.rb,
lib/laundry/payments_gateway/models/client.rb,
lib/laundry/payments_gateway/models/account.rb,
lib/laundry/payments_gateway/models/merchant.rb,
lib/laundry/payments_gateway/models/transaction.rb,
lib/laundry/payments_gateway/drivers/client_driver.rb,
lib/laundry/payments_gateway/drivers/socket_driver.rb,
lib/laundry/payments_gateway/models/response_model.rb,
lib/laundry/payments_gateway/drivers/account_driver.rb,
lib/laundry/payments_gateway/drivers/transaction_driver.rb,
lib/laundry/payments_gateway/models/transaction_response.rb,
lib/laundry/payments_gateway/drivers/merchant_authenticatable_driver.rb

Defined Under Namespace

Modules: PaymentsGateway, SOAPModel

Constant Summary collapse

VERSION =
"0.0.8"
@@sandboxed =
true

Class Method Summary collapse

Class Method Details

.mock(type, merge = {}) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/laundry.rb', line 31

def self.mock(type, merge = {})
	o = YAML::load_file(File.expand_path(File.join(__FILE__, "..", "..", "spec", "fixtures", "#{type.to_s}.yml")))
	o.merchant = self.mock(:merchant) if o.respond_to?(:merchant=)
	if merge && !merge.empty?
		o.record = o.record.merge(merge)
	end
	o
end

.sandboxed=(yn) ⇒ Object



19
20
21
# File 'lib/laundry.rb', line 19

def self.sandboxed=(yn)
  @@sandboxed = yn
end

.sandboxed?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/laundry.rb', line 15

def self.sandboxed?
  @@sandboxed
end

.stub!Object



23
24
25
# File 'lib/laundry.rb', line 23

def self.stub!
  stub_all unless require "laundry/stubbed"
end

.stubbed?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/laundry.rb', line 27

def self.stubbed?
	false
end