Sha256: 31bca01ee4a70f9ba59b38a119377025f8e804fc9552bc1e0ba53e9b04ccf885

Contents?: true

Size: 809 Bytes

Versions: 1

Compression:

Stored size: 809 Bytes

Contents

module BanksApi
  class BankNameResolver
    def initialize(bank_name)
      @bank_name = bank_name
    end

    def domain
    end
  end
end

module BanksApi
  module UserAccount
    def initialize(bank:, credentials:)
      @bank = bank
      @credentials = credentials
    end

    def accounts
      @accounts ||= api.fetch_accounts
    end

    private

      attr_reader :bank, :credentials

      def api
        bank_domain::Session
      end

      def bank_domain
        BankNameResolver.new(bank).domain
      end
  end
end

module BanksApi
  module Shinsei
    class UserAccount < UserAccount
      def initialize(bank:, credentials:)
        super
        @session = Session.new(credentials)
      end

      def accounts
      end

      private

        attr_reader :session
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
banks_api-shinsei-0.1.2 lib/banks_api/shinsei/user_account.rb