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



36
37
38
39
40
41
42
43
# File 'lib/laundry.rb', line 36

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



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

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

.sandboxed?Boolean

Returns:

  • (Boolean)


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

def self.sandboxed?
  @@sandboxed
end

.stub!Object



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

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

.stubbed?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/laundry.rb', line 32

def self.stubbed?
  false
end