Class: Mollie::Amount
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Amount
constructor
A new instance of Amount.
- #to_h ⇒ Object
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
#currency ⇒ Object
Returns the value of attribute currency.
3 4 5 |
# File 'lib/mollie/amount.rb', line 3 def currency @currency end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/mollie/amount.rb', line 3 def value @value end |
Instance Method Details
#to_h ⇒ Object
13 14 15 16 17 18 |
# File 'lib/mollie/amount.rb', line 13 def to_h { value: attributes['value'], currency: attributes['currency'] } end |