Class: SixSaferpay::UpdatePaymentMeans

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(card: nil) ⇒ UpdatePaymentMeans

Returns a new instance of UpdatePaymentMeans.



6
7
8
# File 'lib/six_saferpay/models/update_payment_means.rb', line 6

def initialize(card: nil)
  @card = SixSaferpay::AliasCard.new(**card.to_h) if card
end

Instance Attribute Details

#cardObject

Returns the value of attribute card.



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

def card
  @card
end

Instance Method Details

#to_hashObject Also known as: to_h



10
11
12
13
14
# File 'lib/six_saferpay/models/update_payment_means.rb', line 10

def to_hash
  hash = Hash.new
  hash.merge!(card: @card.to_h) if @card
  hash
end