class Ingenico::Direct::SDK::Domain::PersonalName

@attr [String] first_name @attr [String] surname @attr [String] title

Attributes

first_name[RW]
surname[RW]
title[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/personal_name.rb, line 27
def from_hash(hash)
  super
  @first_name = hash['firstName'] if hash.key? 'firstName'
  @surname = hash['surname'] if hash.key? 'surname'
  @title = hash['title'] if hash.key? 'title'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/personal_name.rb, line 19
def to_h
  hash = super
  hash['firstName'] = @first_name unless @first_name.nil?
  hash['surname'] = @surname unless @surname.nil?
  hash['title'] = @title unless @title.nil?
  hash
end