Class: BunqRb::DeviceServer
- Inherits:
-
Object
- Object
- BunqRb::DeviceServer
- Includes:
- Shared
- Defined in:
- lib/bunq_rb/objects/device_server.rb
Overview
DeviceServer
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hsh = {}) ⇒ DeviceServer
constructor
A new instance of DeviceServer.
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
#id ⇒ Object (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 |
.url ⇒ Object
14 15 16 |
# File 'lib/bunq_rb/objects/device_server.rb', line 14 def self.url "/v1/device-server" end |