Class: BunqRb::AttachmentMonetaryAccount
- Inherits:
-
Object
- Object
- BunqRb::AttachmentMonetaryAccount
- Defined in:
- lib/bunq_rb/objects/attachment_monetary_account.rb
Overview
AttachmentMonetaryAccount
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hsh = {}) ⇒ AttachmentMonetaryAccount
constructor
A new instance of AttachmentMonetaryAccount.
Constructor Details
#initialize(hsh = {}) ⇒ AttachmentMonetaryAccount
6 7 8 |
# File 'lib/bunq_rb/objects/attachment_monetary_account.rb', line 6 def initialize(hsh = {}) @id = hsh["id"] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/bunq_rb/objects/attachment_monetary_account.rb', line 4 def id @id end |
Class Method Details
.create(image) ⇒ Object
10 11 12 13 |
# File 'lib/bunq_rb/objects/attachment_monetary_account.rb', line 10 def self.create(image) response = Client.send_method(:post, url(1913, 1933), image) response.map { |resp| new(resp["Id"]) } end |
.url(user_id, monetary_account_id) ⇒ Object
15 16 17 |
# File 'lib/bunq_rb/objects/attachment_monetary_account.rb', line 15 def self.url(user_id, monetary_account_id) "/v1/user/#{user_id}/monetary-account/#{monetary_account_id}/attachment" end |