Class: IngRb::Account

Inherits:
Object
  • Object
show all
Includes:
Shared
Defined in:
lib/ing_rb/objects/account.rb

Overview

Account

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {}) ⇒ Account

Returns a new instance of Account.



10
11
12
13
14
15
# File 'lib/ing_rb/objects/account.rb', line 10

def initialize(hsh = {})
  @id = hsh["id"]
  @iban = hsh["iban"]
  @name = hsh["name"]
  @currency = hsh["currency"]
end

Instance Attribute Details

#currencyObject (readonly)

Returns the value of attribute currency.



8
9
10
# File 'lib/ing_rb/objects/account.rb', line 8

def currency
  @currency
end

#ibanObject (readonly)

Returns the value of attribute iban.



8
9
10
# File 'lib/ing_rb/objects/account.rb', line 8

def iban
  @iban
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/ing_rb/objects/account.rb', line 8

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/ing_rb/objects/account.rb', line 8

def name
  @name
end

Class Method Details

.containerObject



21
22
23
# File 'lib/ing_rb/objects/account.rb', line 21

def self.container
  "account-list"
end

.urlObject



17
18
19
# File 'lib/ing_rb/objects/account.rb', line 17

def self.url
  "/v1/accounts"
end

Instance Method Details

#transactionsObject



25
26
27
# File 'lib/ing_rb/objects/account.rb', line 25

def transactions
  IngRb::Transaction.all(@id)
end