Class: Pay::FakeProcessor::Merchant

Inherits:
Object
  • Object
show all
Defined in:
lib/pay/fake_processor/merchant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pay_merchant) ⇒ Merchant

Returns a new instance of Merchant.



7
8
9
# File 'lib/pay/fake_processor/merchant.rb', line 7

def initialize(pay_merchant)
  @pay_merchant = pay_merchant
end

Instance Attribute Details

#pay_merchantObject (readonly)

Returns the value of attribute pay_merchant.



4
5
6
# File 'lib/pay/fake_processor/merchant.rb', line 4

def pay_merchant
  @pay_merchant
end

Instance Method Details



17
18
19
# File 'lib/pay/fake_processor/merchant.rb', line 17

def (refresh_url:, return_url:, type: "account_onboarding", **options)
  Struct.new(:url).new("/fake_processor/account_link")
end

#create_account(**options) ⇒ Object



11
12
13
14
15
# File 'lib/pay/fake_processor/merchant.rb', line 11

def (**options)
   = Struct.new(:id).new("fake_account_id")
  pay_merchant.update(processor_id: .id)
  
end


21
22
23
# File 'lib/pay/fake_processor/merchant.rb', line 21

def (**options)
  Struct.new(:url).new("/fake_processor/login_link")
end