Class: ViewModel::Cepc800::Cepc

Inherits:
CommonSchema show all
Defined in:
lib/view_model/cepc800/cepc.rb

Instance Method Summary collapse

Methods inherited from CommonSchema

#address_id, #address_line1, #address_line2, #address_line3, #address_line4, #all_energy_types, #all_reason_types, #all_start_dates, #assessment_id, #assessor_email, #assessor_name, #assessor_telephone, #calculation_tool, #company_address, #company_name, #date_of_assessment, #date_of_expiry, #date_of_issue, #date_of_registration, #inspection_type, #or_assessment_end_date, #postcode, #report_type, #scheme_assessor_id, #town

Methods inherited from BaseViewModel

#initialize, #xpath

Constructor Details

This class inherits a constructor from ViewModel::BaseViewModel

Instance Method Details

#ac_inspection_commissionedObject



4
5
6
# File 'lib/view_model/cepc800/cepc.rb', line 4

def ac_inspection_commissioned
  xpath(%w[AC-Inspection-Commissioned])
end

#ac_kw_ratingObject



8
9
10
# File 'lib/view_model/cepc800/cepc.rb', line 8

def ac_kw_rating
  xpath(%w[AC-kW-Rating])&.to_i
end

#ac_presentObject



12
13
14
# File 'lib/view_model/cepc800/cepc.rb', line 12

def ac_present
  xpath(%w[AC-Present])
end

#building_emission_rateObject



16
17
18
# File 'lib/view_model/cepc800/cepc.rb', line 16

def building_emission_rate
  xpath(%w[BER])
end

#building_environmentObject



20
21
22
# File 'lib/view_model/cepc800/cepc.rb', line 20

def building_environment
  xpath(%w[Building-Environment])
end

#building_levelObject



24
25
26
# File 'lib/view_model/cepc800/cepc.rb', line 24

def building_level
  xpath(%w[Building-Level])&.to_i
end

#effective_dateObject

Is this used?



29
30
31
# File 'lib/view_model/cepc800/cepc.rb', line 29

def effective_date
  xpath(%w[Effective-Date])
end

#energy_efficiency_ratingObject



33
34
35
# File 'lib/view_model/cepc800/cepc.rb', line 33

def energy_efficiency_rating
  xpath(%w[Asset-Rating])&.to_i
end


37
38
39
# File 'lib/view_model/cepc800/cepc.rb', line 37

def epc_related_party_disclosure
  xpath(%w[EPC-Related-Party-Disclosure])
end

#estimated_ac_kw_ratingObject



41
42
43
# File 'lib/view_model/cepc800/cepc.rb', line 41

def estimated_ac_kw_rating
  xpath(%w[AC-Estimated-Output])&.to_i
end

#existing_build_ratingObject



45
46
47
# File 'lib/view_model/cepc800/cepc.rb', line 45

def existing_build_rating
  xpath(%w[Existing-Stock-Benchmark])&.to_i
end

#floor_areaObject



49
50
51
# File 'lib/view_model/cepc800/cepc.rb', line 49

def floor_area
  xpath(%w[Technical-Information Floor-Area])
end

#main_heating_fuelObject



53
54
55
# File 'lib/view_model/cepc800/cepc.rb', line 53

def main_heating_fuel
  xpath(%w[Main-Heating-Fuel])
end

#new_build_ratingObject

This is new_build_benchmark in the CEPC wrapper



58
59
60
# File 'lib/view_model/cepc800/cepc.rb', line 58

def new_build_rating
  xpath(%w[New-Build-Benchmark])&.to_i
end

#or_assessment_start_dateObject



62
63
64
# File 'lib/view_model/cepc800/cepc.rb', line 62

def or_assessment_start_date
  xpath(%w[OR-Operational-Rating OR-Assessment-Start-Date])
end

#or_availability_dateObject



66
67
68
# File 'lib/view_model/cepc800/cepc.rb', line 66

def or_availability_date
  xpath(%w[Technical-Information OR-Availability-Date])
end

#other_fuel_descriptionObject



70
71
72
# File 'lib/view_model/cepc800/cepc.rb', line 70

def other_fuel_description
  xpath(%w[Other-Fuel-Description])
end

#primary_energy_useObject



74
75
76
# File 'lib/view_model/cepc800/cepc.rb', line 74

def primary_energy_use
  xpath(%w[Energy-Consumption-Current])
end

#property_typeObject



78
79
80
# File 'lib/view_model/cepc800/cepc.rb', line 78

def property_type
  xpath(%w[Property-Type])
end

Is this used in the CEPC wrapper? def renewable_energy_source

xpath(%w[Renewable-Energy-Source])

end



87
88
89
# File 'lib/view_model/cepc800/cepc.rb', line 87

def related_rrn
  xpath(%w[Related-RRN])
end

#renewable_sourcesObject



111
112
113
# File 'lib/view_model/cepc800/cepc.rb', line 111

def renewable_sources
  xpath(%w[Renewable-Sources])
end

#special_energy_usesObject



91
92
93
# File 'lib/view_model/cepc800/cepc.rb', line 91

def special_energy_uses
  xpath(%w[Special-Energy-Uses])
end

#standard_emissionsObject



95
96
97
# File 'lib/view_model/cepc800/cepc.rb', line 95

def standard_emissions
  xpath(%w[SER])
end

#target_emissionsObject



99
100
101
# File 'lib/view_model/cepc800/cepc.rb', line 99

def target_emissions
  xpath(%w[TER])
end

#transaction_typeObject



103
104
105
# File 'lib/view_model/cepc800/cepc.rb', line 103

def transaction_type
  xpath(%w[Transaction-Type])
end

#typical_emissionsObject



107
108
109
# File 'lib/view_model/cepc800/cepc.rb', line 107

def typical_emissions
  xpath(%w[TYR])
end