Class: BunqRb::User

Inherits:
Object
  • Object
show all
Includes:
Shared
Defined in:
lib/bunq_rb/objects/user.rb

Overview

Installation

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {}) ⇒ User

Returns a new instance of User.



10
11
12
13
# File 'lib/bunq_rb/objects/user.rb', line 10

def initialize(hsh = {})
  @id = hsh["id"]
  @display_name = hsh["display_name"]
end

Instance Attribute Details

#display_nameObject (readonly)

Returns the value of attribute display_name.



8
9
10
# File 'lib/bunq_rb/objects/user.rb', line 8

def display_name
  @display_name
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/bunq_rb/objects/user.rb', line 8

def id
  @id
end

Class Method Details

.urlObject



15
16
17
# File 'lib/bunq_rb/objects/user.rb', line 15

def self.url
  "/v1/user"
end

Instance Method Details

#cardsObject



23
24
25
# File 'lib/bunq_rb/objects/user.rb', line 23

def cards
  BunqRb::Card.all(@id)
end

#monetary_accountsObject



19
20
21
# File 'lib/bunq_rb/objects/user.rb', line 19

def monetary_accounts
  BunqRb::MonetaryAccountBank.all(@id)
end