Sha256: 3f1c3794375724853fff9c26e99c0196a88d8a4bd46343fd72a0d14ca29860c9

Contents?: true

Size: 573 Bytes

Versions: 11

Compression:

Stored size: 573 Bytes

Contents

module Bunq
  ##
  # https://doc.bunq.com/api/1/call/attachment-public-content
  class AttachmentPublicContent
    def initialize(client, id)
      @resource = Bunq::Resource.new(client, "/v1/attachment-public/#{id}/content")
    end

    ##
    # https://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.
    def show
      @resource.with_session do 
        @resource.get { |response| response.body }
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bunq-client-0.7.2 lib/bunq/attachment_public_content.rb
bunq-client-0.7.1 lib/bunq/attachment_public_content.rb
bunq-client-0.7.0 lib/bunq/attachment_public_content.rb
bunq-client-0.6.1 lib/bunq/attachment_public_content.rb
bunq-client-0.6.0 lib/bunq/attachment_public_content.rb
bunq-client-0.5.0 lib/bunq/attachment_public_content.rb
bunq-client-0.4.2 lib/bunq/attachment_public_content.rb
bunq-client-0.4.1 lib/bunq/attachment_public_content.rb
bunq-client-0.4.0 lib/bunq/attachment_public_content.rb
bunq-client-0.3.0 lib/bunq/attachment_public_content.rb
bunq-client-0.2.0 lib/bunq/attachment_public_content.rb