class Ingenico::Connect::SDK::Domain::Payment::AddressPersonal
@attr [Ingenico::Connect::SDK::Domain::Payment::PersonalName] name
Attributes
name[RW]
Public Instance Methods
from_hash(hash)
click to toggle source
Calls superclass method
Ingenico::Connect::SDK::Domain::Definitions::Address#from_hash
# File lib/ingenico/connect/sdk/domain/payment/address_personal.rb, line 24 def from_hash(hash) super if hash.has_key? 'name' raise TypeError, "value '%s' is not a Hash" % [hash['name']] unless hash['name'].is_a? Hash @name = Ingenico::Connect::SDK::Domain::Payment::PersonalName.new_from_hash(hash['name']) end end
to_h()
click to toggle source
@return (Hash)
Calls superclass method
Ingenico::Connect::SDK::Domain::Definitions::Address#to_h
# File lib/ingenico/connect/sdk/domain/payment/address_personal.rb, line 18 def to_h hash = super hash['name'] = @name.to_h unless @name.nil? hash end