class BunqRb::Payment

Payment

Attributes

amount[R]
created[R]
description[R]
id[R]
updated[R]

Public Class Methods

new(hsh = {}) click to toggle source
# File lib/bunq_rb/objects/payment.rb, line 10
def initialize(hsh = {})
  @id = hsh["id"]
  @description = hsh["description"]
  @amount = Money.new(hsh["amount"]["value"].to_f * 100, hsh["amount"]["currency"])
  @created = Time.parse(hsh["created"])
  @updated = Time.parse(hsh["updated"])
end
url(user_id, monetary_account_id) click to toggle source
# File lib/bunq_rb/objects/payment.rb, line 18
def self.url(user_id, monetary_account_id)
  "/v1/user/#{user_id}/monetary-account/#{monetary_account_id}/payment"
end