Sha256: 49bb2a34997423b4536cdec1599d90ca229a2e32c139a31bc511db733cb5bb0c

Contents?: true

Size: 381 Bytes

Versions: 3

Compression:

Stored size: 381 Bytes

Contents

module Bunq
  class Installations
    def initialize(client)
      @resource = Bunq::Resource.new(client, "/v1/installation")
    end

    def create(public_key)
      fail ArgumentError.new('public_key is required') unless public_key

      @resource.post({client_public_key: public_key}, true)['Response']
    end

    def index
      @resource.get['Response']
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bunq-client-0.1.2 lib/bunq/installations.rb
bunq-client-0.1.1 lib/bunq/installations.rb
bunq-client-0.1.0 lib/bunq/installations.rb