class Ingenico::Connect::SDK::Domain::Product::DirectoryEntry

@attr [Array<String>] country_names @attr [String] issuer_id @attr [String] issuer_list @attr [String] issuer_name

Attributes

country_names[RW]
issuer_id[RW]
issuer_list[RW]
issuer_name[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/product/directory_entry.rb, line 35
def from_hash(hash)
  super
  if hash.has_key? 'countryNames'
    raise TypeError, "value '%s' is not an Array" % [hash['countryNames']] unless hash['countryNames'].is_a? Array
    @country_names = []
    hash['countryNames'].each do |e|
      @country_names << e
    end
  end
  if hash.has_key? 'issuerId'
    @issuer_id = hash['issuerId']
  end
  if hash.has_key? 'issuerList'
    @issuer_list = hash['issuerList']
  end
  if hash.has_key? 'issuerName'
    @issuer_name = hash['issuerName']
  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/product/directory_entry.rb, line 26
def to_h
  hash = super
  hash['countryNames'] = @country_names unless @country_names.nil?
  hash['issuerId'] = @issuer_id unless @issuer_id.nil?
  hash['issuerList'] = @issuer_list unless @issuer_list.nil?
  hash['issuerName'] = @issuer_name unless @issuer_name.nil?
  hash
end