Class: Mollie::Amount

Inherits:
Base
  • Object
show all
Defined in:
lib/mollie/amount.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

all, #assign_attributes, cancel, create, #delete, delete, get, id_param, parent_id, request, resource_name, update, #update

Constructor Details

#initialize(attributes) ⇒ Amount

Returns a new instance of Amount.



5
6
7
# File 'lib/mollie/amount.rb', line 5

def initialize(attributes)
  super unless attributes.nil?
end

Instance Attribute Details

#currencyObject

Returns the value of attribute currency.



3
4
5
# File 'lib/mollie/amount.rb', line 3

def currency
  @currency
end

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/mollie/amount.rb', line 3

def value
  @value
end

Instance Method Details

#to_hObject



13
14
15
16
17
18
# File 'lib/mollie/amount.rb', line 13

def to_h
  {
    value: attributes['value'],
    currency: attributes['currency']
  }
end