class BunqRb::CashRegister

CashRegister

Attributes

id[R]
name[R]
status[R]

Public Class Methods

create(hsh = {}, user_id, monetary_account_id) click to toggle source
# File lib/bunq_rb/objects/cash_register.rb, line 16
def self.create(hsh = {}, user_id, monetary_account_id)
  uri = url(user_id, monetary_account_id)
  response = Client.send_method(:post, uri, hsh)
  response[0]["Id"]
end
new(hsh = {}) click to toggle source
# File lib/bunq_rb/objects/cash_register.rb, line 10
def initialize(hsh = {})
  @id = hsh["id"]
  @name = hsh["name"]
  @status = hsh["status"]
end
url(user_id, monetary_account_id) click to toggle source
# File lib/bunq_rb/objects/cash_register.rb, line 22
def self.url(user_id, monetary_account_id)
  "/v1/user/#{user_id}/monetary-account/#{monetary_account_id}/cash-register"
end