Class: Bunq::Installations
- Inherits:
-
Object
- Object
- Bunq::Installations
- Defined in:
- lib/bunq/installations.rb
Instance Method Summary collapse
- #create(public_key) ⇒ Object
- #index ⇒ Object
-
#initialize(client) ⇒ Installations
constructor
A new instance of Installations.
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 |
#index ⇒ Object
15 16 17 |
# File 'lib/bunq/installations.rb', line 15 def index @resource.get['Response'] end |