class BunqRb::Installation

Installation

Attributes

id[R]

Public Class Methods

create(hash = {}) click to toggle source
# File lib/bunq_rb/objects/installation.rb, line 19
def self.create(hash = {})
  response = Client.send_method(:post, url, hash)
  [new(response[0]["Id"]), response[1]["Token"], response[2]["ServerPublicKey"]]
end
new(hsh = {}) click to toggle source
# File lib/bunq_rb/objects/installation.rb, line 10
def initialize(hsh = {})
  @id = hsh["id"]
end
url() click to toggle source
# File lib/bunq_rb/objects/installation.rb, line 24
def self.url
  "/v1/installation"
end

Public Instance Methods

server_public_key() click to toggle source
# File lib/bunq_rb/objects/installation.rb, line 14
def server_public_key
  @server_public_key ||= BunqRb::InstallationServerPublicKey.new(installation_id: @id)
  @server_public_key.all.first
end