class Ingenico::Connect::SDK::Domain::Token::TokenSepaDirectDebitWithoutCreditor

@attr [Ingenico::Connect::SDK::Domain::Token::CustomerTokenWithContactDetails] customer @attr [Ingenico::Connect::SDK::Domain::Token::MandateSepaDirectDebitWithoutCreditor] mandate

Attributes

customer[RW]
mandate[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/token/token_sepa_direct_debit_without_creditor.rb, line 29
def from_hash(hash)
  super
  if hash.has_key? 'customer'
    raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash
    @customer = Ingenico::Connect::SDK::Domain::Token::CustomerTokenWithContactDetails.new_from_hash(hash['customer'])
  end
  if hash.has_key? 'mandate'
    raise TypeError, "value '%s' is not a Hash" % [hash['mandate']] unless hash['mandate'].is_a? Hash
    @mandate = Ingenico::Connect::SDK::Domain::Token::MandateSepaDirectDebitWithoutCreditor.new_from_hash(hash['mandate'])
  end
end
to_h() click to toggle source

@return (Hash)

# File lib/ingenico/connect/sdk/domain/token/token_sepa_direct_debit_without_creditor.rb, line 22
def to_h
  hash = super
  hash['customer'] = @customer.to_h unless @customer.nil?
  hash['mandate'] = @mandate.to_h unless @mandate.nil?
  hash
end