class Ingenico::Direct::SDK::Domain::Address

@attr [String] additional_info @attr [String] city @attr [String] country_code @attr [String] house_number @attr [String] state @attr [String] street @attr [String] zip

Attributes

additional_info[RW]
city[RW]
country_code[RW]
house_number[RW]
state[RW]
street[RW]
zip[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/address.rb, line 39
def from_hash(hash)
  super
  @additional_info = hash['additionalInfo'] if hash.key? 'additionalInfo'
  @city = hash['city'] if hash.key? 'city'
  @country_code = hash['countryCode'] if hash.key? 'countryCode'
  @house_number = hash['houseNumber'] if hash.key? 'houseNumber'
  @state = hash['state'] if hash.key? 'state'
  @street = hash['street'] if hash.key? 'street'
  @zip = hash['zip'] if hash.key? 'zip'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/address.rb, line 27
def to_h
  hash = super
  hash['additionalInfo'] = @additional_info unless @additional_info.nil?
  hash['city'] = @city unless @city.nil?
  hash['countryCode'] = @country_code unless @country_code.nil?
  hash['houseNumber'] = @house_number unless @house_number.nil?
  hash['state'] = @state unless @state.nil?
  hash['street'] = @street unless @street.nil?
  hash['zip'] = @zip unless @zip.nil?
  hash
end