class Ingenico::Connect::SDK::Domain::Payment::CompletePaymentCardPaymentMethodSpecificInput

@attr [Ingenico::Connect::SDK::Domain::Definitions::CardWithoutCvv] card

Attributes

card[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/payment/complete_payment_card_payment_method_specific_input.rb, line 24
def from_hash(hash)
  super
  if hash.has_key? 'card'
    raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
    @card = Ingenico::Connect::SDK::Domain::Definitions::CardWithoutCvv.new_from_hash(hash['card'])
  end
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/payment/complete_payment_card_payment_method_specific_input.rb, line 18
def to_h
  hash = super
  hash['card'] = @card.to_h unless @card.nil?
  hash
end