Class: NNEClient::Subsidiary

Inherits:
Object
  • Object
show all
Defined in:
lib/nne_client/record_types/subsidiary.rb

Instance Method Summary collapse

Constructor Details

#initialize(subsidiary_hash) ⇒ Subsidiary

Returns a new instance of Subsidiary.



7
8
9
# File 'lib/nne_client/record_types/subsidiary.rb', line 7

def initialize(subsidiary_hash)
  @hash = subsidiary_hash
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
14
15
# File 'lib/nne_client/record_types/subsidiary.rb', line 11

def ==(other)
  share == other.share &&
    name == other.name &&
    country == other.country
end

#companyObject



21
22
23
# File 'lib/nne_client/record_types/subsidiary.rb', line 21

def company
  Result.new(:tdc_id => @hash[:tdc_id])
end

#shareObject



17
18
19
# File 'lib/nne_client/record_types/subsidiary.rb', line 17

def share
  @hash[:share].strip
end