class Ingenico::Connect::SDK::Domain::Definitions::PersonalNameBase

@attr [String] first_name @attr [String] surname @attr [String] surname_prefix

Attributes

first_name[RW]
surname[RW]
surname_prefix[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb, line 31
def from_hash(hash)
  super
  if hash.has_key? 'firstName'
    @first_name = hash['firstName']
  end
  if hash.has_key? 'surname'
    @surname = hash['surname']
  end
  if hash.has_key? 'surnamePrefix'
    @surname_prefix = hash['surnamePrefix']
  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/definitions/personal_name_base.rb, line 23
def to_h
  hash = super
  hash['firstName'] = @first_name unless @first_name.nil?
  hash['surname'] = @surname unless @surname.nil?
  hash['surnamePrefix'] = @surname_prefix unless @surname_prefix.nil?
  hash
end