Class: SixSaferpay::Amount
- Inherits:
-
Object
- Object
- SixSaferpay::Amount
- Defined in:
- lib/six_saferpay/models/amount.rb
Direct Known Subclasses
Fee, FeeRefund, FirstInstallmentAmount, InstallmentFee, PayerAmount, SubsequentInstallmentAmount, TotalAmountDue
Instance Attribute Summary collapse
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value:, currency_code:) ⇒ Amount
constructor
A new instance of Amount.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(value:, currency_code:) ⇒ Amount
Returns a new instance of Amount.
6 7 8 9 |
# File 'lib/six_saferpay/models/amount.rb', line 6 def initialize(value:, currency_code:) @value = value @currency_code = currency_code end |
Instance Attribute Details
#currency_code ⇒ Object
Returns the value of attribute currency_code.
4 5 6 |
# File 'lib/six_saferpay/models/amount.rb', line 4 def currency_code @currency_code end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/six_saferpay/models/amount.rb', line 4 def value @value end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
11 12 13 14 15 16 |
# File 'lib/six_saferpay/models/amount.rb', line 11 def to_hash hash = Hash.new hash.merge!(value: @value) hash.merge!(currency_code: @currency_code) hash end |