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