Class: Fiscalizer::Office

Inherits:
Object
  • Object
show all
Defined in:
lib/fiscalizer/data_objects/office.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uuid:, time_sent:, pin:, office_label:, office_time:, take_effect_date:, adress_street_name: nil, adress_house_num: nil, adress_house_num_addendum: nil, adress_post_num: nil, adress_settlement: nil, adress_township: nil, adress_other: nil, closure_mark: nil, specific_purpose: nil) ⇒ Office

rubocop:disable Metrics/ParameterLists, Metrics/MethodLength



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/fiscalizer/data_objects/office.rb', line 4

def initialize(uuid:, time_sent:, pin:, office_label:, office_time:, take_effect_date:,
               adress_street_name: nil, adress_house_num: nil, adress_house_num_addendum: nil,
               adress_post_num: nil, adress_settlement: nil, adress_township: nil,
               adress_other: nil, closure_mark: nil, specific_purpose: nil)

  @uuid = uuid
  @time_sent = time_sent
  @pin = pin
  @office_label = office_label
  @adress_street_name = adress_street_name
  @adress_house_num = adress_house_num
  @adress_house_num_addendum = adress_house_num_addendum
  @adress_post_num = adress_post_num
  @adress_settlement = adress_settlement
  @adress_township = adress_township
  @adress_other = adress_other
  @office_time = office_time
  @take_effect_date = take_effect_date
  @closure_mark = closure_mark
  @specific_purpose = specific_purpose
end

Instance Attribute Details

#adress_house_numObject (readonly)

Returns the value of attribute adress_house_num.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def adress_house_num
  @adress_house_num
end

#adress_house_num_addendumObject (readonly)

Returns the value of attribute adress_house_num_addendum.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def adress_house_num_addendum
  @adress_house_num_addendum
end

#adress_otherObject (readonly)

Returns the value of attribute adress_other.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def adress_other
  @adress_other
end

#adress_post_numObject (readonly)

Returns the value of attribute adress_post_num.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def adress_post_num
  @adress_post_num
end

#adress_settlementObject (readonly)

Returns the value of attribute adress_settlement.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def adress_settlement
  @adress_settlement
end

#adress_street_nameObject (readonly)

Returns the value of attribute adress_street_name.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def adress_street_name
  @adress_street_name
end

#adress_townshipObject (readonly)

Returns the value of attribute adress_township.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def adress_township
  @adress_township
end

#closure_markObject (readonly)

Returns the value of attribute closure_mark.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def closure_mark
  @closure_mark
end

#generated_xmlObject

Returns the value of attribute generated_xml.



31
32
33
# File 'lib/fiscalizer/data_objects/office.rb', line 31

def generated_xml
  @generated_xml
end

#office_labelObject (readonly)

Returns the value of attribute office_label.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def office_label
  @office_label
end

#office_timeObject (readonly)

Returns the value of attribute office_time.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def office_time
  @office_time
end

#pinObject (readonly)

Returns the value of attribute pin.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def pin
  @pin
end

#specific_purposeObject (readonly)

Returns the value of attribute specific_purpose.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def specific_purpose
  @specific_purpose
end

#take_effect_dateObject (readonly)

Returns the value of attribute take_effect_date.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def take_effect_date
  @take_effect_date
end

#time_sentObject (readonly)

Returns the value of attribute time_sent.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def time_sent
  @time_sent
end

#uuidObject (readonly)

Returns the value of attribute uuid.



26
27
28
# File 'lib/fiscalizer/data_objects/office.rb', line 26

def uuid
  @uuid
end

Instance Method Details

#take_effect_date_strObject



37
38
39
# File 'lib/fiscalizer/data_objects/office.rb', line 37

def take_effect_date_str
  take_effect_date.strftime('%d.%m.%Y')
end

#time_sent_str(separator = 'T') ⇒ Object



33
34
35
# File 'lib/fiscalizer/data_objects/office.rb', line 33

def time_sent_str(separator = 'T')
  time_sent.strftime("%d.%m.%Y#{separator}%H:%M:%S")
end