Class: SixSaferpay::Dcc
- Inherits:
-
Object
- Object
- SixSaferpay::Dcc
- Defined in:
- lib/six_saferpay/models/dcc.rb
Instance Attribute Summary collapse
-
#payer_amount ⇒ Object
Returns the value of attribute payer_amount.
Instance Method Summary collapse
-
#initialize(payer_amount:) ⇒ Dcc
constructor
A new instance of Dcc.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(payer_amount:) ⇒ Dcc
Returns a new instance of Dcc.
6 7 8 |
# File 'lib/six_saferpay/models/dcc.rb', line 6 def initialize(payer_amount:) @payer_amount = SixSaferpay::PayerAmount.new(**payer_amount.to_h) end |
Instance Attribute Details
#payer_amount ⇒ Object
Returns the value of attribute payer_amount.
4 5 6 |
# File 'lib/six_saferpay/models/dcc.rb', line 4 def payer_amount @payer_amount end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
10 11 12 13 14 |
# File 'lib/six_saferpay/models/dcc.rb', line 10 def to_hash hash = Hash.new hash.merge!(payer_amount: @payer_amount.to_h) if @payer_amount hash end |