Class: SixSaferpay::PaymentMethodsOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/six_saferpay/models/payment_methods_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#alipayObject

Returns the value of attribute alipay.



4
5
6
# File 'lib/six_saferpay/models/payment_methods_options.rb', line 4

def alipay
  @alipay
end

#idealObject

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_hashObject 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