Class: BunqRb::Avatar

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

Overview

Avatar

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {}) ⇒ Avatar

Returns a new instance of Avatar.



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

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

Instance Attribute Details

#uuidObject (readonly)

Returns the value of attribute uuid.



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

def uuid
  @uuid
end

Class Method Details

.create(hash = {}) ⇒ Object



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

def self.create(hash = {})
  response = Client.send_method(:post, url, hash)
  new(response[0]["Uuid"])
end

.urlObject



14
15
16
# File 'lib/bunq_rb/objects/avatar.rb', line 14

def self.url
  "/v1/avatar"
end