Class: Pay::FakeProcessor::Merchant
- Inherits:
-
Object
- Object
- Pay::FakeProcessor::Merchant
- Defined in:
- lib/pay/fake_processor/merchant.rb
Instance Attribute Summary collapse
-
#pay_merchant ⇒ Object
readonly
Returns the value of attribute pay_merchant.
Instance Method Summary collapse
- #account_link(refresh_url:, return_url:, type: "account_onboarding", **options) ⇒ Object
- #create_account(**options) ⇒ Object
-
#initialize(pay_merchant) ⇒ Merchant
constructor
A new instance of Merchant.
- #login_link(**options) ⇒ Object
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_merchant ⇒ Object (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
#account_link(refresh_url:, return_url:, type: "account_onboarding", **options) ⇒ Object
17 18 19 |
# File 'lib/pay/fake_processor/merchant.rb', line 17 def account_link(refresh_url:, return_url:, type: "account_onboarding", **) 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 create_account(**) fake_account = Struct.new(:id).new("fake_account_id") pay_merchant.update(processor_id: fake_account.id) fake_account end |
#login_link(**options) ⇒ Object
21 22 23 |
# File 'lib/pay/fake_processor/merchant.rb', line 21 def login_link(**) Struct.new(:url).new("/fake_processor/login_link") end |