Class: Bunq::AttachmentPublicContent

Inherits:
Object
  • Object
show all
Defined in:
lib/bunq/attachment_public_content.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(client, id) ⇒ AttachmentPublicContent

Returns a new instance of AttachmentPublicContent.



7
8
9
# File 'lib/bunq/attachment_public_content.rb', line 7

def initialize(client, id)
  @resource = Bunq::Resource.new(client, "/v1/attachment-public/#{id}/content")
end

Instance Method Details

#showObject

doc.bunq.com/api/1/call/attachment-public-content/method/list Returns the raw content of a public attachment with given ID. The raw content is the binary representation of a file.



15
16
17
18
19
# File 'lib/bunq/attachment_public_content.rb', line 15

def show
  @resource.with_session do
    @resource.get(&:body)
  end
end