class Ingenico::Connect::SDK::Domain::Refund::BankRefundMethodSpecificInput

@attr [Ingenico::Connect::SDK::Domain::Refund::BankAccountBbanRefund] bank_account_bban @attr [Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban] bank_account_iban @attr [String] country_code

Attributes

bank_account_bban[RW]
bank_account_iban[RW]
country_code[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/refund/bank_refund_method_specific_input.rb, line 33
def from_hash(hash)
  super
  if hash.has_key? 'bankAccountBban'
    raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountBban']] unless hash['bankAccountBban'].is_a? Hash
    @bank_account_bban = Ingenico::Connect::SDK::Domain::Refund::BankAccountBbanRefund.new_from_hash(hash['bankAccountBban'])
  end
  if hash.has_key? 'bankAccountIban'
    raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']] unless hash['bankAccountIban'].is_a? Hash
    @bank_account_iban = Ingenico::Connect::SDK::Domain::Definitions::BankAccountIban.new_from_hash(hash['bankAccountIban'])
  end
  if hash.has_key? 'countryCode'
    @country_code = hash['countryCode']
  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/refund/bank_refund_method_specific_input.rb, line 25
def to_h
  hash = super
  hash['bankAccountBban'] = @bank_account_bban.to_h unless @bank_account_bban.nil?
  hash['bankAccountIban'] = @bank_account_iban.to_h unless @bank_account_iban.nil?
  hash['countryCode'] = @country_code unless @country_code.nil?
  hash
end