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.



5
6
7
# File 'lib/bunq/attachment_public_content.rb', line 5

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.



13
14
15
16
17
# File 'lib/bunq/attachment_public_content.rb', line 13

def show
  @resource.with_session do 
    @resource.get { |response| response.body }
  end
end