Class: BunqRb::DeviceServer

Inherits:
Object
  • Object
show all
Includes:
Shared
Defined in:
lib/bunq_rb/objects/device_server.rb

Overview

DeviceServer

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {}) ⇒ DeviceServer

Returns a new instance of DeviceServer.



10
11
12
# File 'lib/bunq_rb/objects/device_server.rb', line 10

def initialize(hsh = {})
  @id = hsh["id"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/bunq_rb/objects/device_server.rb', line 8

def id
  @id
end

Class Method Details

.create(hash = {}) ⇒ Object



18
19
20
21
# File 'lib/bunq_rb/objects/device_server.rb', line 18

def self.create(hash = {})
  response = Client.send_method(:post, url, hash)
  new(response[0]["Id"])
end

.urlObject



14
15
16
# File 'lib/bunq_rb/objects/device_server.rb', line 14

def self.url
  "/v1/device-server"
end