Module: Nordea

Defined in:
lib/nordea.rb,
lib/nordea/request.rb,
lib/nordea/session.rb,
lib/nordea/version.rb,
lib/nordea/transaction.rb,
lib/nordea/resources/card.rb,
lib/nordea/resources/fund.rb,
lib/nordea/resources/loan.rb,
lib/nordea/resources/account.rb,
lib/nordea/resources/resource.rb

Defined Under Namespace

Modules: Commands, Version Classes: Account, Card, Fund, InvalidLogin, Loan, Request, Resource, Session, Transaction

Constant Summary collapse

VERSION =
Nordea::Version::STRING

Class Method Summary collapse

Class Method Details

.new(pnr_or_hash, pin_or_options = {}, &block) ⇒ Object

Raises:

  • (ArgumentError)


35
36
37
38
39
# File 'lib/nordea.rb', line 35

def Nordea.new(pnr_or_hash, pin_or_options = {}, &block)
  pnr, pin = (pnr_or_hash, pin_or_options)
  raise ArgumentError unless pnr.length == 10 && pin.length == 4
  Session.new(pnr.to_s, pin.to_s, &block)
end