Sha256: a5ab05a33071e98d0f2f178828860593765259ef72c9d0e4befbdb6364987718

Contents?: true

Size: 686 Bytes

Versions: 31

Compression:

Stored size: 686 Bytes

Contents

module Pay
  module FakeProcessor
    class Merchant
      attr_reader :pay_merchant
      delegate :processor_id, to: :pay_merchant

      def initialize(pay_merchant)
        @pay_merchant = pay_merchant
      end

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

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

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

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
pay-6.2.3 lib/pay/fake_processor/merchant.rb
pay-6.2.2 lib/pay/fake_processor/merchant.rb
pay-6.2.1 lib/pay/fake_processor/merchant.rb
pay-6.2.0 lib/pay/fake_processor/merchant.rb
pay-6.1.2 lib/pay/fake_processor/merchant.rb
pay-6.1.1 lib/pay/fake_processor/merchant.rb
pay-6.1.0 lib/pay/fake_processor/merchant.rb
pay-6.0.3 lib/pay/fake_processor/merchant.rb
pay-6.0.2 lib/pay/fake_processor/merchant.rb
pay-6.0.1 lib/pay/fake_processor/merchant.rb
pay-6.0.0 lib/pay/fake_processor/merchant.rb