Class: Bunq::Installations

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

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Installations

Returns a new instance of Installations.



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

def initialize(client)
  @resource = Bunq::Resource.new(client, '/v1/installation')
end

Instance Method Details

#create(public_key) ⇒ Object



9
10
11
12
13
# File 'lib/bunq/installations.rb', line 9

def create(public_key)
  fail ArgumentError, 'public_key is required' unless public_key

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

#indexObject



15
16
17
# File 'lib/bunq/installations.rb', line 15

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