Class: WsCee::CauseInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/ws_cee_client/cause_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cause_hash) ⇒ CauseInfo

Returns a new instance of CauseInfo.



8
9
10
11
12
13
14
15
# File 'lib/ws_cee_client/cause_info.rb', line 8

def initialize(cause_hash)
  @code = cause_hash[:code]
  @document_type = cause_hash[:document_type]
  @registration_date = cause_hash[:registration_date]
  @subject = Subject.new cause_hash[:subject_info]
rescue NoMethodError
  raise WsCee::ParsingError
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/ws_cee_client/cause_info.rb', line 3

def code
  @code
end

#document_typeObject (readonly)

Returns the value of attribute document_type.



4
5
6
# File 'lib/ws_cee_client/cause_info.rb', line 4

def document_type
  @document_type
end

#registration_dateObject (readonly)

Returns the value of attribute registration_date.



5
6
7
# File 'lib/ws_cee_client/cause_info.rb', line 5

def registration_date
  @registration_date
end

#subjectObject (readonly)

Returns the value of attribute subject.



6
7
8
# File 'lib/ws_cee_client/cause_info.rb', line 6

def subject
  @subject
end