Class: BunqRb::RequestInquiry

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

Overview

RequestInquiry

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {}) ⇒ RequestInquiry

Returns a new instance of RequestInquiry.



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

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Class Method Details

.create(hash = {}) ⇒ Object



19
20
21
22
# File 'lib/bunq_rb/objects/request_inquiry.rb', line 19

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

.url(user_id, monetary_account_id) ⇒ Object



15
16
17
# File 'lib/bunq_rb/objects/request_inquiry.rb', line 15

def self.url(user_id, )
  "/v1/user/#{user_id}/monetary-account/#{monetary_account_id}/request-inquiry"
end