Class: BunqRb::SessionServer
- Inherits:
-
Object
- Object
- BunqRb::SessionServer
- Defined in:
- lib/bunq_rb/objects/session_server.rb
Overview
SessionServer
Constant Summary collapse
- URI =
"/v1/session-server".freeze
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hsh = {}) ⇒ SessionServer
constructor
A new instance of SessionServer.
Constructor Details
#initialize(hsh = {}) ⇒ SessionServer
Returns a new instance of SessionServer.
8 9 10 |
# File 'lib/bunq_rb/objects/session_server.rb', line 8 def initialize(hsh = {}) @id = hsh["id"] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/bunq_rb/objects/session_server.rb', line 6 def id @id end |
Class Method Details
.create(hash = {}) ⇒ Object
12 13 14 15 |
# File 'lib/bunq_rb/objects/session_server.rb', line 12 def self.create(hash = {}) response = Client.send_method(:post, URI, hash) [new(response[0]["Id"]), response[1]["Token"], response[1]["UserCompany"]] end |