Class: BunqRb::AttachmentPublic

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

Overview

AttachmentPublic

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {}) ⇒ AttachmentPublic

Returns a new instance of AttachmentPublic.



10
11
12
# File 'lib/bunq_rb/objects/attachment_public.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/attachment_public.rb', line 8

def uuid
  @uuid
end

Class Method Details

.create(hash = {}) ⇒ Object



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

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

.urlObject



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

def self.url
  "/v1/attachment-public"
end