epb_view_models 2.1.8 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/.buildspec.yml +1 -1
  3. data/api/schemas/data/orchestrate.json +4 -0
  4. data/api/schemas/xml/CEPC-S-7.1/Reports/BaseDataTypes.xsd +300 -300
  5. data/api/schemas/xml/CEPC-S-7.1/Reports/CEPC-Reports.xsd +66 -66
  6. data/api/schemas/xml/CEPC-S-7.1/Reports/Input-Data.xsd +34 -34
  7. data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd +125 -125
  8. data/api/schemas/xml/CEPC-S-7.1/Reports/Performance-Summary.xsd.bak +123 -123
  9. data/api/schemas/xml/CEPC-S-7.1/Reports/Property.xsd +67 -67
  10. data/api/schemas/xml/CEPC-S-7.1/Reports/Report-Header.xsd +178 -178
  11. data/api/schemas/xml/CEPC-S-7.1/Reports/Reported-Data.xsd +406 -406
  12. data/api/schemas/xml/CEPC-S-7.1/Reports/UserManagement.xsd +174 -174
  13. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/ExternalDefinitions.xsd +261 -261
  14. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/AssessorManagement.xsd +213 -213
  15. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-Certificate.xsd +400 -400
  16. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/EPC-CollectedData.xsd +1051 -1051
  17. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/Property.xsd +66 -66
  18. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/RdSAP-Report.xsd +176 -176
  19. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/Templates/ReportList.xsd +26 -26
  20. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/EPC-Domains.xsd +858 -858
  21. data/api/schemas/xml/RdSAP-Schema-S-19.0/RdSAP/UDT/SAP-Domains.xsd +2684 -2684
  22. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/ExternalDefinitions.xml +1735 -0
  23. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/ExternalDefinitions.xsd +313 -0
  24. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/Templates/AssessorManagement.xsd +275 -0
  25. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/Templates/EPC-Certificate.xsd +632 -0
  26. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/Templates/ExceptionList.xsd +20 -0
  27. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/Templates/Property.xsd +85 -0
  28. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/Templates/ReportList.xsd +27 -0
  29. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/Templates/SAP-CollectedData.xsd +2516 -0
  30. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/Templates/SAP-Compliance-Report.xsd +51 -0
  31. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/Templates/SAP-Report.xsd +277 -0
  32. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/UDT/EPC-Domains.xsd +646 -0
  33. data/api/schemas/xml/SAP-Schema-19.2.0/SAP/UDT/SAP-Domains.xsd +3154 -0
  34. data/lib/epb_view_models.rb +1 -1
  35. data/lib/helper/xml_enums_to_output.rb +3 -0
  36. data/lib/presenter/cepc/certificate_summary.rb +148 -0
  37. data/lib/view_model/base_view_model.rb +2 -0
  38. data/lib/view_model/cepc_s_71/cepc.rb +115 -42
  39. data/lib/view_model/cepc_wrapper.rb +9 -0
  40. data/lib/view_model/factory.rb +1 -0
  41. data/lib/view_model/sap_schema_1920/common_schema.rb +600 -0
  42. data/lib/view_model/sap_wrapper.rb +2 -0
  43. metadata +15 -182
  44. data/api/schemas/xml/SAP-Schema-14.1/._CommonFiles +0 -0
  45. data/api/schemas/xml/SAP-Schema-14.1/._SAP-EPC +0 -0
  46. data/api/schemas/xml/SAP-Schema-14.1/._Templates +0 -0
  47. data/api/schemas/xml/SAP-Schema-14.1/CommonFiles/._CommonStructures.xsd +0 -0
  48. data/api/schemas/xml/SAP-Schema-14.1/Messages/._ConditionReportChangeAccessRequest_1.xsd +0 -0
  49. data/api/schemas/xml/SAP-Schema-14.1/Messages/._ConditionReportChangeAccessResponse_1.xsd +0 -0
  50. data/api/schemas/xml/SAP-Schema-14.1/Messages/._ConditionReportChangeStatusRequest_1.xsd +0 -0
  51. data/api/schemas/xml/SAP-Schema-14.1/Messages/._ConditionReportChangeStatusResponse_1.xsd +0 -0
  52. data/api/schemas/xml/SAP-Schema-14.1/Messages/._ConditionReportCreateRequest_1.xsd +0 -0
  53. data/api/schemas/xml/SAP-Schema-14.1/Messages/._ConditionReportRetrieveResponse_1.xsd +0 -0
  54. data/api/schemas/xml/SAP-Schema-14.1/Messages/._HomeInspectorRegisterUpdateRequest_1.xsd +0 -0
  55. data/api/schemas/xml/SAP-Schema-14.1/Messages/._HomeInspectorRegisterUpdateResponse_1.xsd +0 -0
  56. data/api/schemas/xml/SAP-Schema-14.1/Messages/._HomeInspectorRegisterUpdateStatusResponse_1.xsd +0 -0
  57. data/api/schemas/xml/SAP-Schema-14.1/Messages/._PropertyUPRNValidationResponse_1.xsd +0 -0
  58. data/api/schemas/xml/SAP-Schema-14.1/SAP-EPC/._Templates +0 -0
  59. data/api/schemas/xml/SAP-Schema-14.1/SAP-EPC/Templates/._EPC-Certificate.xsd +0 -0
  60. data/api/schemas/xml/SAP-Schema-14.1/SAP-EPC/Templates/._UserManagement.xsd +0 -0
  61. data/api/schemas/xml/SAP-Schema-14.1/SAP-EPC/UDT/._BaseDataTypes.xsd +0 -0
  62. data/api/schemas/xml/SAP-Schema-14.1/SAP-EPC/UDT/._SAP05-Domains.xsd +0 -0
  63. data/api/schemas/xml/SAP-Schema-14.1/Templates/._EPC-Certificate.xsd +0 -0
  64. data/api/schemas/xml/SAP-Schema-14.1/Templates/._EPC-CollectedData.xsd +0 -0
  65. data/api/schemas/xml/SAP-Schema-14.1/Templates/._HCR-FeaturesGrounds.xsd +0 -0
  66. data/api/schemas/xml/SAP-Schema-14.1/Templates/._HCR-PropertyDetails.xsd +0 -0
  67. data/api/schemas/xml/SAP-Schema-14.1/Templates/._HCR-RiskAssessment.xsd +0 -0
  68. data/api/schemas/xml/SAP-Schema-14.1/Templates/._HIP-Reports.xsd +0 -0
  69. data/api/schemas/xml/SAP-Schema-14.1/Templates/._UserManagement.xsd +0 -0
  70. data/api/schemas/xml/SAP-Schema-14.1/UDT/._BaseDataTypes.xsd +0 -0
  71. data/api/schemas/xml/SAP-Schema-14.1/UDT/._HCR-Domains.xsd +0 -0
  72. data/api/schemas/xml/SAP-Schema-14.1/UDT/._SAP-Domains.xsd +0 -0
  73. data/api/schemas/xml/SAP-Schema-14.1/UDT/._TypeDefinitions.xsd +0 -0
  74. data/api/schemas/xml/SAP-Schema-14.2/._CommonFiles +0 -0
  75. data/api/schemas/xml/SAP-Schema-14.2/._SAP-EPC +0 -0
  76. data/api/schemas/xml/SAP-Schema-14.2/._Templates +0 -0
  77. data/api/schemas/xml/SAP-Schema-14.2/CommonFiles/._CommonStructures.xsd +0 -0
  78. data/api/schemas/xml/SAP-Schema-14.2/Messages/._ConditionReportChangeAccessRequest_1.xsd +0 -0
  79. data/api/schemas/xml/SAP-Schema-14.2/Messages/._ConditionReportChangeAccessResponse_1.xsd +0 -0
  80. data/api/schemas/xml/SAP-Schema-14.2/Messages/._ConditionReportChangeStatusRequest_1.xsd +0 -0
  81. data/api/schemas/xml/SAP-Schema-14.2/Messages/._ConditionReportChangeStatusResponse_1.xsd +0 -0
  82. data/api/schemas/xml/SAP-Schema-14.2/Messages/._ConditionReportCreateRequest_1.xsd +0 -0
  83. data/api/schemas/xml/SAP-Schema-14.2/Messages/._ConditionReportRetrieveResponse_1.xsd +0 -0
  84. data/api/schemas/xml/SAP-Schema-14.2/Messages/._ExternalDefinitions.xml +0 -0
  85. data/api/schemas/xml/SAP-Schema-14.2/Messages/._ExternalDefinitions.xsd +0 -0
  86. data/api/schemas/xml/SAP-Schema-14.2/Messages/._HomeInspectorRegisterUpdateRequest_1.xsd +0 -0
  87. data/api/schemas/xml/SAP-Schema-14.2/Messages/._HomeInspectorRegisterUpdateResponse_1.xsd +0 -0
  88. data/api/schemas/xml/SAP-Schema-14.2/Messages/._HomeInspectorRegisterUpdateStatusResponse_1.xsd +0 -0
  89. data/api/schemas/xml/SAP-Schema-14.2/Messages/._PropertyUPRNValidationResponse_1.xsd +0 -0
  90. data/api/schemas/xml/SAP-Schema-14.2/SAP-EPC/._Templates +0 -0
  91. data/api/schemas/xml/SAP-Schema-14.2/SAP-EPC/Templates/._EPC-Certificate.xsd +0 -0
  92. data/api/schemas/xml/SAP-Schema-14.2/SAP-EPC/Templates/._UserManagement.xsd +0 -0
  93. data/api/schemas/xml/SAP-Schema-14.2/SAP-EPC/UDT/._BaseDataTypes.xsd +0 -0
  94. data/api/schemas/xml/SAP-Schema-14.2/SAP-EPC/UDT/._SAP05-Domains.xsd +0 -0
  95. data/api/schemas/xml/SAP-Schema-14.2/Templates/._EPC-Certificate.xsd +0 -0
  96. data/api/schemas/xml/SAP-Schema-14.2/Templates/._EPC-CollectedData.xsd +0 -0
  97. data/api/schemas/xml/SAP-Schema-14.2/Templates/._HCR-FeaturesGrounds.xsd +0 -0
  98. data/api/schemas/xml/SAP-Schema-14.2/Templates/._HCR-PropertyDetails.xsd +0 -0
  99. data/api/schemas/xml/SAP-Schema-14.2/Templates/._HCR-RiskAssessment.xsd +0 -0
  100. data/api/schemas/xml/SAP-Schema-14.2/Templates/._HIP-Reports.xsd +0 -0
  101. data/api/schemas/xml/SAP-Schema-14.2/Templates/._UserManagement.xsd +0 -0
  102. data/api/schemas/xml/SAP-Schema-14.2/UDT/._BaseDataTypes.xsd +0 -0
  103. data/api/schemas/xml/SAP-Schema-14.2/UDT/._HCR-Domains.xsd +0 -0
  104. data/api/schemas/xml/SAP-Schema-14.2/UDT/._SAP-Domains.xsd +0 -0
  105. data/api/schemas/xml/SAP-Schema-14.2/UDT/._TypeDefinitions.xsd +0 -0
  106. data/api/schemas/xml/SAP-Schema-15.0/._CommonFiles +0 -0
  107. data/api/schemas/xml/SAP-Schema-15.0/._SAP-EPC +0 -0
  108. data/api/schemas/xml/SAP-Schema-15.0/._Templates +0 -0
  109. data/api/schemas/xml/SAP-Schema-15.0/CommonFiles/._CommonStructures.xsd +0 -0
  110. data/api/schemas/xml/SAP-Schema-15.0/Messages/._ConditionReportChangeAccessRequest_1.xsd +0 -0
  111. data/api/schemas/xml/SAP-Schema-15.0/Messages/._ConditionReportChangeAccessResponse_1.xsd +0 -0
  112. data/api/schemas/xml/SAP-Schema-15.0/Messages/._ConditionReportChangeStatusRequest_1.xsd +0 -0
  113. data/api/schemas/xml/SAP-Schema-15.0/Messages/._ConditionReportChangeStatusResponse_1.xsd +0 -0
  114. data/api/schemas/xml/SAP-Schema-15.0/Messages/._ConditionReportCreateRequest_1.xsd +0 -0
  115. data/api/schemas/xml/SAP-Schema-15.0/Messages/._ConditionReportRetrieveResponse_1.xsd +0 -0
  116. data/api/schemas/xml/SAP-Schema-15.0/Messages/._ExternalDefinitions.xml +0 -0
  117. data/api/schemas/xml/SAP-Schema-15.0/Messages/._ExternalDefinitions.xsd +0 -0
  118. data/api/schemas/xml/SAP-Schema-15.0/Messages/._HomeInspectorRegisterUpdateRequest_1.xsd +0 -0
  119. data/api/schemas/xml/SAP-Schema-15.0/Messages/._HomeInspectorRegisterUpdateResponse_1.xsd +0 -0
  120. data/api/schemas/xml/SAP-Schema-15.0/Messages/._HomeInspectorRegisterUpdateStatusResponse_1.xsd +0 -0
  121. data/api/schemas/xml/SAP-Schema-15.0/Messages/._PropertyUPRNValidationResponse_1.xsd +0 -0
  122. data/api/schemas/xml/SAP-Schema-15.0/SAP-EPC/._Templates +0 -0
  123. data/api/schemas/xml/SAP-Schema-15.0/SAP-EPC/Templates/._EPC-Certificate.xsd +0 -0
  124. data/api/schemas/xml/SAP-Schema-15.0/SAP-EPC/Templates/._SAP09-Report.xsd +0 -0
  125. data/api/schemas/xml/SAP-Schema-15.0/SAP-EPC/Templates/._UserManagement.xsd +0 -0
  126. data/api/schemas/xml/SAP-Schema-15.0/SAP-EPC/UDT/._BaseDataTypes.xsd +0 -0
  127. data/api/schemas/xml/SAP-Schema-15.0/Templates/._EPC-Certificate.xsd +0 -0
  128. data/api/schemas/xml/SAP-Schema-15.0/Templates/._EPC-CollectedData.xsd +0 -0
  129. data/api/schemas/xml/SAP-Schema-15.0/Templates/._HCR-FeaturesGrounds.xsd +0 -0
  130. data/api/schemas/xml/SAP-Schema-15.0/Templates/._HCR-PropertyDetails.xsd +0 -0
  131. data/api/schemas/xml/SAP-Schema-15.0/Templates/._HCR-RiskAssessment.xsd +0 -0
  132. data/api/schemas/xml/SAP-Schema-15.0/Templates/._HIP-Reports.xsd +0 -0
  133. data/api/schemas/xml/SAP-Schema-15.0/Templates/._UserManagement.xsd +0 -0
  134. data/api/schemas/xml/SAP-Schema-15.0/UDT/._BaseDataTypes.xsd +0 -0
  135. data/api/schemas/xml/SAP-Schema-15.0/UDT/._HCR-Domains.xsd +0 -0
  136. data/api/schemas/xml/SAP-Schema-15.0/UDT/._SAP-Domains.xsd +0 -0
  137. data/api/schemas/xml/SAP-Schema-15.0/UDT/._TypeDefinitions.xsd +0 -0
  138. data/api/schemas/xml/SAP-Schema-16.0/._CommonFiles +0 -0
  139. data/api/schemas/xml/SAP-Schema-16.0/._SAP-EPC +0 -0
  140. data/api/schemas/xml/SAP-Schema-16.0/._Templates +0 -0
  141. data/api/schemas/xml/SAP-Schema-16.0/CommonFiles/._CommonStructures.xsd +0 -0
  142. data/api/schemas/xml/SAP-Schema-16.0/Messages/._Assessor.xsd +0 -0
  143. data/api/schemas/xml/SAP-Schema-16.0/Messages/._ConditionReportChangeAccessRequest_1.xsd +0 -0
  144. data/api/schemas/xml/SAP-Schema-16.0/Messages/._ConditionReportChangeAccessResponse_1.xsd +0 -0
  145. data/api/schemas/xml/SAP-Schema-16.0/Messages/._ConditionReportChangeStatusRequest_1.xsd +0 -0
  146. data/api/schemas/xml/SAP-Schema-16.0/Messages/._ConditionReportChangeStatusResponse_1.xsd +0 -0
  147. data/api/schemas/xml/SAP-Schema-16.0/Messages/._ConditionReportCreateRequest_1.xsd +0 -0
  148. data/api/schemas/xml/SAP-Schema-16.0/Messages/._ConditionReportRetrieveResponse_1.xsd +0 -0
  149. data/api/schemas/xml/SAP-Schema-16.0/Messages/._ExternalDefinitions.xml +0 -0
  150. data/api/schemas/xml/SAP-Schema-16.0/Messages/._ExternalDefinitions.xsd +0 -0
  151. data/api/schemas/xml/SAP-Schema-16.0/Messages/._PropertyUPRNValidationResponse_1.xsd +0 -0
  152. data/api/schemas/xml/SAP-Schema-16.0/SAP-EPC/._Templates +0 -0
  153. data/api/schemas/xml/SAP-Schema-16.0/SAP-EPC/Templates/._EPC-Certificate.xsd +0 -0
  154. data/api/schemas/xml/SAP-Schema-16.0/SAP-EPC/Templates/._SAP09-Report.xsd +0 -0
  155. data/api/schemas/xml/SAP-Schema-16.0/SAP-EPC/Templates/._UserManagement.xsd +0 -0
  156. data/api/schemas/xml/SAP-Schema-16.0/SAP-EPC/UDT/._BaseDataTypes.xsd +0 -0
  157. data/api/schemas/xml/SAP-Schema-16.0/Templates/._EPC-Certificate.xsd +0 -0
  158. data/api/schemas/xml/SAP-Schema-16.0/Templates/._EPC-CollectedData.xsd +0 -0
  159. data/api/schemas/xml/SAP-Schema-16.0/Templates/._HCR-FeaturesGrounds.xsd +0 -0
  160. data/api/schemas/xml/SAP-Schema-16.0/Templates/._HCR-PropertyDetails.xsd +0 -0
  161. data/api/schemas/xml/SAP-Schema-16.0/Templates/._HCR-RiskAssessment.xsd +0 -0
  162. data/api/schemas/xml/SAP-Schema-16.0/Templates/._HIP-Reports.xsd +0 -0
  163. data/api/schemas/xml/SAP-Schema-16.0/Templates/._UserManagement.xsd +0 -0
  164. data/api/schemas/xml/SAP-Schema-16.0/UDT/._BaseDataTypes.xsd +0 -0
  165. data/api/schemas/xml/SAP-Schema-16.0/UDT/._HCR-Domains.xsd +0 -0
  166. data/api/schemas/xml/SAP-Schema-16.0/UDT/._SAP-Domains.xsd +0 -0
  167. data/api/schemas/xml/SAP-Schema-16.0/UDT/._TypeDefinitions.xsd +0 -0
  168. data/api/schemas/xml/SAP-Schema-16.1/CommonFiles/._CommonStructures.xsd +0 -0
  169. data/api/schemas/xml/SAP-Schema-16.1/Messages/._Assessor.xsd +0 -0
  170. data/api/schemas/xml/SAP-Schema-16.1/Messages/._ConditionReportChangeAccessRequest_1.xsd +0 -0
  171. data/api/schemas/xml/SAP-Schema-16.1/Messages/._ConditionReportChangeAccessResponse_1.xsd +0 -0
  172. data/api/schemas/xml/SAP-Schema-16.1/Messages/._ConditionReportChangeStatusRequest_1.xsd +0 -0
  173. data/api/schemas/xml/SAP-Schema-16.1/Messages/._ConditionReportChangeStatusResponse_1.xsd +0 -0
  174. data/api/schemas/xml/SAP-Schema-16.1/Messages/._ConditionReportCreateRequest_1.xsd +0 -0
  175. data/api/schemas/xml/SAP-Schema-16.1/Messages/._ConditionReportRetrieveResponse_1.xsd +0 -0
  176. data/api/schemas/xml/SAP-Schema-16.1/Messages/._ExternalDefinitions.xml +0 -0
  177. data/api/schemas/xml/SAP-Schema-16.1/Messages/._ExternalDefinitions.xsd +0 -0
  178. data/api/schemas/xml/SAP-Schema-16.1/Messages/._PropertyUPRNValidationResponse_1.xsd +0 -0
  179. data/api/schemas/xml/SAP-Schema-16.1/SAP-EPC/._Templates +0 -0
  180. data/api/schemas/xml/SAP-Schema-16.1/SAP-EPC/Templates/._EPC-Certificate.xsd +0 -0
  181. data/api/schemas/xml/SAP-Schema-16.1/SAP-EPC/Templates/._SAP09-Report.xsd +0 -0
  182. data/api/schemas/xml/SAP-Schema-16.1/SAP-EPC/Templates/._UserManagement.xsd +0 -0
  183. data/api/schemas/xml/SAP-Schema-16.1/SAP-EPC/UDT/._BaseDataTypes.xsd +0 -0
  184. data/api/schemas/xml/SAP-Schema-16.1/Templates/._EPC-Certificate.xsd +0 -0
  185. data/api/schemas/xml/SAP-Schema-16.1/Templates/._EPC-CollectedData.xsd +0 -0
  186. data/api/schemas/xml/SAP-Schema-16.1/Templates/._HCR-FeaturesGrounds.xsd +0 -0
  187. data/api/schemas/xml/SAP-Schema-16.1/Templates/._HCR-PropertyDetails.xsd +0 -0
  188. data/api/schemas/xml/SAP-Schema-16.1/Templates/._HCR-RiskAssessment.xsd +0 -0
  189. data/api/schemas/xml/SAP-Schema-16.1/Templates/._HIP-Reports.xsd +0 -0
  190. data/api/schemas/xml/SAP-Schema-16.1/Templates/._UserManagement.xsd +0 -0
  191. data/api/schemas/xml/SAP-Schema-16.1/UDT/._BaseDataTypes.xsd +0 -0
  192. data/api/schemas/xml/SAP-Schema-16.1/UDT/._HCR-Domains.xsd +0 -0
  193. data/api/schemas/xml/SAP-Schema-16.1/UDT/._SAP-Domains.xsd +0 -0
  194. data/api/schemas/xml/SAP-Schema-16.1/UDT/._TypeDefinitions.xsd +0 -0
  195. data/api/schemas/xml/SAP-Schema-16.2/._CommonFiles +0 -0
  196. data/api/schemas/xml/SAP-Schema-16.2/._SAP-EPC +0 -0
  197. data/api/schemas/xml/SAP-Schema-16.2/._Templates +0 -0
  198. data/api/schemas/xml/SAP-Schema-16.2/CommonFiles/._CommonStructures.xsd +0 -0
  199. data/api/schemas/xml/SAP-Schema-16.2/Messages/._Assessor.xsd +0 -0
  200. data/api/schemas/xml/SAP-Schema-16.2/Messages/._ConditionReportChangeAccessRequest_1.xsd +0 -0
  201. data/api/schemas/xml/SAP-Schema-16.2/Messages/._ConditionReportChangeAccessResponse_1.xsd +0 -0
  202. data/api/schemas/xml/SAP-Schema-16.2/Messages/._ConditionReportChangeStatusRequest_1.xsd +0 -0
  203. data/api/schemas/xml/SAP-Schema-16.2/Messages/._ConditionReportChangeStatusResponse_1.xsd +0 -0
  204. data/api/schemas/xml/SAP-Schema-16.2/Messages/._ConditionReportCreateRequest_1.xsd +0 -0
  205. data/api/schemas/xml/SAP-Schema-16.2/Messages/._ConditionReportRetrieveResponse_1.xsd +0 -0
  206. data/api/schemas/xml/SAP-Schema-16.2/Messages/._ExternalDefinitions.xml +0 -0
  207. data/api/schemas/xml/SAP-Schema-16.2/Messages/._ExternalDefinitions.xsd +0 -0
  208. data/api/schemas/xml/SAP-Schema-16.2/Messages/._PropertyUPRNValidationResponse_1.xsd +0 -0
  209. data/api/schemas/xml/SAP-Schema-16.2/SAP-EPC/._Templates +0 -0
  210. data/api/schemas/xml/SAP-Schema-16.2/SAP-EPC/Templates/._EPC-Certificate.xsd +0 -0
  211. data/api/schemas/xml/SAP-Schema-16.2/SAP-EPC/Templates/._SAP09-Report.xsd +0 -0
  212. data/api/schemas/xml/SAP-Schema-16.2/SAP-EPC/Templates/._UserManagement.xsd +0 -0
  213. data/api/schemas/xml/SAP-Schema-16.2/SAP-EPC/UDT/._BaseDataTypes.xsd +0 -0
  214. data/api/schemas/xml/SAP-Schema-16.2/Templates/._EPC-Certificate.xsd +0 -0
  215. data/api/schemas/xml/SAP-Schema-16.2/Templates/._EPC-CollectedData.xsd +0 -0
  216. data/api/schemas/xml/SAP-Schema-16.2/Templates/._HCR-FeaturesGrounds.xsd +0 -0
  217. data/api/schemas/xml/SAP-Schema-16.2/Templates/._HCR-PropertyDetails.xsd +0 -0
  218. data/api/schemas/xml/SAP-Schema-16.2/Templates/._HCR-RiskAssessment.xsd +0 -0
  219. data/api/schemas/xml/SAP-Schema-16.2/Templates/._HIP-Reports.xsd +0 -0
  220. data/api/schemas/xml/SAP-Schema-16.2/Templates/._UserManagement.xsd +0 -0
  221. data/api/schemas/xml/SAP-Schema-16.2/UDT/._BaseDataTypes.xsd +0 -0
  222. data/api/schemas/xml/SAP-Schema-16.2/UDT/._HCR-Domains.xsd +0 -0
  223. data/api/schemas/xml/SAP-Schema-16.2/UDT/._SAP-Domains.xsd +0 -0
  224. data/api/schemas/xml/SAP-Schema-16.2/UDT/._TypeDefinitions.xsd +0 -0
@@ -5,7 +5,7 @@ loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
5
5
  loader.setup
6
6
 
7
7
  module EpbViewModels
8
- VERSION = "2.1.8"
8
+ VERSION = "2.2.1"
9
9
  end
10
10
 
11
11
  # Monkey patching to avoid using ActiveRecord::Type::Boolean.new.cast
@@ -258,6 +258,7 @@ module Helper
258
258
  "2" => "Gas: bulk LPG",
259
259
  "3" => "Gas: bottled LPG",
260
260
  "4" => "Oil: heating oil",
261
+ "5" => "Gas: bottled LPG (for secondary heating)",
261
262
  "7" => "Gas: biogas",
262
263
  "8" => "LNG",
263
264
  "9" => "LPG subject to Special Condition 18",
@@ -400,6 +401,7 @@ module Helper
400
401
  ]
401
402
 
402
403
  schemes_that_use_l = %i[
404
+ SAP-Schema-19.2.0
403
405
  SAP-Schema-19.1.0
404
406
  SAP-Schema-19.0.0
405
407
  SAP-Schema-18.0.0
@@ -620,6 +622,7 @@ module Helper
620
622
  ]
621
623
 
622
624
  sap = %i[
625
+ SAP-Schema-19.2.0
623
626
  SAP-Schema-19.1.0
624
627
  SAP-Schema-19.0.0
625
628
  SAP-Schema-18.0.0
@@ -0,0 +1,148 @@
1
+ module Presenter
2
+ module Cepc
3
+ class CertificateSummary
4
+ TYPE_OF_ASSESSMENT = "CEPC".freeze
5
+
6
+ def initialize(view_model)
7
+ @view_model = view_model
8
+ end
9
+
10
+ def to_certificate_summary
11
+ {
12
+ type_of_assessment: TYPE_OF_ASSESSMENT,
13
+ assessment_id: @view_model.assessment_id,
14
+ date_of_expiry: @view_model.date_of_expiry,
15
+ report_type: @view_model.report_type,
16
+ date_of_assessment: @view_model.date_of_assessment,
17
+ date_of_registration: @view_model.date_of_registration,
18
+ address: {
19
+ address_line1: @view_model.address_line1,
20
+ address_line2: @view_model.address_line2,
21
+ address_line3: @view_model.address_line3,
22
+ address_line4: @view_model.address_line4,
23
+ town: @view_model.town,
24
+ postcode: @view_model.postcode,
25
+ },
26
+ assessor: {
27
+ scheme_assessor_id: @view_model.scheme_assessor_id,
28
+ name: @view_model.assessor_name,
29
+ contact_details: {
30
+ email: @view_model.assessor_email,
31
+ telephone: @view_model.assessor_telephone,
32
+ },
33
+ },
34
+ technical_information: {
35
+ main_heating_fuel: @view_model.main_heating_fuel,
36
+ building_environment: @view_model.building_environment,
37
+ floor_area: @view_model.floor_area,
38
+ building_level: @view_model.building_level,
39
+ },
40
+ building_emission_rate: @view_model.respond_to?(:building_emission_rate) ? @view_model.building_emission_rate : nil,
41
+ primary_energy_use: @view_model.respond_to?(:primary_energy_use) ? @view_model.primary_energy_use : nil,
42
+ related_rrn: @view_model.related_rrn,
43
+ new_build_rating: @view_model.new_build_rating,
44
+ new_build_band: Helper::EnergyBandCalculator.commercial(@view_model.new_build_rating),
45
+ existing_build_rating: @view_model.existing_build_rating,
46
+ existing_build_band: Helper::EnergyBandCalculator.commercial(@view_model.existing_build_rating),
47
+ current_energy_efficiency_rating: @view_model.energy_efficiency_rating,
48
+ energy_efficiency_rating: @view_model.energy_efficiency_rating,
49
+ related_party_disclosure: @view_model.epc_related_party_disclosure,
50
+ current_energy_efficiency_band: Helper::EnergyBandCalculator.commercial(@view_model.energy_efficiency_rating),
51
+ property_type: @view_model.property_type,
52
+ building_complexity: @view_model.building_level,
53
+ }
54
+ end
55
+
56
+ def to_certificate_summary_scotland
57
+ {
58
+ type_of_assessment: TYPE_OF_ASSESSMENT,
59
+ assessment_id: @view_model.assessment_id,
60
+ date_of_expiry: @view_model.date_of_expiry,
61
+ report_type: @view_model.report_type,
62
+ date_of_assessment: @view_model.date_of_assessment,
63
+ date_of_registration: @view_model.date_of_registration,
64
+ address: {
65
+ address_line1: @view_model.address_line1,
66
+ address_line2: @view_model.address_line2,
67
+ address_line3: @view_model.address_line3,
68
+ address_line4: @view_model.address_line4,
69
+ town: @view_model.town,
70
+ postcode: @view_model.postcode,
71
+ },
72
+ assessor: {
73
+ scheme_assessor_id: @view_model.scheme_assessor_id,
74
+ name: @view_model.assessor_name,
75
+ contact_details: {
76
+ email: @view_model.assessor_email,
77
+ telephone: @view_model.assessor_telephone,
78
+ trading_address: @view_model.trading_address,
79
+ },
80
+ company_name: @view_model.company_name,
81
+ insurer: @view_model.insurer,
82
+ policy_no: @view_model.policy_no,
83
+ insurer_effective_date: @view_model.insurer_effective_date,
84
+ insurer_expiry_date: @view_model.insurer_expiry_date,
85
+ insurer_pi_limit: @view_model.insurer_pi_limit,
86
+ },
87
+ technical_information: {
88
+ main_heating_fuel: @view_model.main_heating_fuel,
89
+ building_environment: @view_model.building_environment,
90
+ floor_area: @view_model.floor_area,
91
+ },
92
+ current_energy_efficiency_rating: @view_model.energy_efficiency_rating,
93
+ potential_energy_rating: @view_model.potential_energy_rating,
94
+ current_energy_efficiency_band: @view_model.current_energy_efficiency_band,
95
+ potential_energy_band: @view_model.potential_energy_band,
96
+ new_build_benchmark_rating: @view_model.new_build_benchmark_rating,
97
+ new_build_benchmark_band: @view_model.new_build_benchmark_band,
98
+ comparative_asset_rating: @view_model.comparative_asset_rating,
99
+ epc_rating_ber: @view_model.epc_rating_ber,
100
+ approximate_energy_use: @view_model.approximate_energy_use,
101
+ property_type: @view_model.property_type,
102
+ property_short_description: @view_model.property_short_description,
103
+ compliant_2002: @view_model.compliant_2002,
104
+ renewable_energy_sources: @view_model.renewable_energy_sources,
105
+ electricity_sources: @view_model.electricity_sources,
106
+ primary_energy_indicator: @view_model.primary_energy_indicator,
107
+ calculation_tool: @view_model.calculation_tool,
108
+ ter_2002: @view_model.ter_2002,
109
+ ter: @view_model.ter,
110
+ recommendations: [
111
+ @view_model.short_payback_recommendations.map do |recommendation|
112
+ {
113
+ payback_type: "short",
114
+ recommendation_code: recommendation[:code],
115
+ recommendation: recommendation[:text],
116
+ cO2_Impact: recommendation[:cO2Impact],
117
+ }
118
+ end,
119
+ @view_model.medium_payback_recommendations.map do |recommendation|
120
+ {
121
+ payback_type: "medium",
122
+ recommendation_code: recommendation[:code],
123
+ recommendation: recommendation[:text],
124
+ cO2_Impact: recommendation[:cO2Impact],
125
+ }
126
+ end,
127
+ @view_model.long_payback_recommendations.map do |recommendation|
128
+ {
129
+ payback_type: "long",
130
+ recommendation_code: recommendation[:code],
131
+ recommendation: recommendation[:text],
132
+ cO2_Impact: recommendation[:cO2Impact],
133
+ }
134
+ end,
135
+ @view_model.other_recommendations.map do |recommendation|
136
+ {
137
+ payback_type: "other",
138
+ recommendation_code: recommendation[:code],
139
+ recommendation: recommendation[:text],
140
+ cO2_Impact: recommendation[:cO2Impact],
141
+ }
142
+ end,
143
+ ].flatten,
144
+ }
145
+ end
146
+ end
147
+ end
148
+ end
@@ -1,3 +1,5 @@
1
+ require "date"
2
+
1
3
  module ViewModel
2
4
  class BaseViewModel
3
5
  def initialize(xml_doc)
@@ -7,48 +7,48 @@ module ViewModel
7
7
  expires_at.to_s
8
8
  end
9
9
 
10
- def ac_inspection_commissioned
11
- xpath(%w[AC-Inspection-Commissioned])
10
+ def building_environment
11
+ xpath(%w[Building-Environment])
12
12
  end
13
13
 
14
- def ac_kw_rating
15
- xpath(%w[AC-kW-Rating])&.to_i
14
+ def energy_efficiency_rating
15
+ xpath(%w[Asset-Rating])&.to_i
16
16
  end
17
17
 
18
- def ac_present
19
- xpath(%w[AC-Present])
18
+ def current_energy_efficiency_band
19
+ xpath(%w[Energy-Band])
20
20
  end
21
21
 
22
- def ac_rated_output
23
- xpath(%w[AC-Rated-Output])
22
+ def potential_energy_rating
23
+ xpath(%w[Potential-Rating])
24
24
  end
25
25
 
26
- def building_emission_rate
27
- xpath(%w[BER])
26
+ def potential_energy_band
27
+ xpath(%w[Potential-Band])
28
28
  end
29
29
 
30
- def building_environment
31
- xpath(%w[Building-Environment])
30
+ def new_build_benchmark_rating
31
+ xpath(%w[New-Build-Benchmark])
32
32
  end
33
33
 
34
- def building_level
35
- xpath(%w[Building-Level])&.to_i
34
+ def new_build_benchmark_band
35
+ xpath(%w[New-Build-Benchmark-Band])
36
36
  end
37
37
 
38
- def energy_efficiency_rating
39
- xpath(%w[Asset-Rating])&.to_i
38
+ def comparative_asset_rating
39
+ xpath(%w[Comparative-Asset-Rating])
40
40
  end
41
41
 
42
- def epc_related_party_disclosure
43
- xpath(%w[EPC-Related-Party-Disclosure])
42
+ def comparative_asset_band
43
+ xpath(%w[Comparative-Energy-Band])
44
44
  end
45
45
 
46
- def estimated_ac_kw_rating
47
- xpath(%w[AC-Estimated-Output])&.to_i
46
+ def epc_rating_ber
47
+ xpath(%w[BER])
48
48
  end
49
49
 
50
- def existing_build_rating
51
- xpath(%w[Existing-Stock-Benchmark])&.to_i
50
+ def approximate_energy_use
51
+ xpath(%w[Approximate-Energy-Use])
52
52
  end
53
53
 
54
54
  def floor_area
@@ -59,48 +59,121 @@ module ViewModel
59
59
  xpath(%w[Main-Heating-Fuel])
60
60
  end
61
61
 
62
- def new_build_rating
63
- xpath(%w[New-Build-Benchmark])&.to_i
62
+ def property_type
63
+ xpath(%w[Property-Type])
64
64
  end
65
65
 
66
- def other_fuel_description
67
- xpath(%w[Other-Fuel-Description])
66
+ def property_short_description
67
+ xpath(%w[Property-Type Short-Description])
68
68
  end
69
69
 
70
- def primary_energy_use
71
- xpath(%w[Energy-Consumption-Current])
70
+ def compliant_2002
71
+ xpath(%w[Compliant-2002])
72
72
  end
73
73
 
74
- def property_type
75
- xpath(%w[Property-Type])
74
+ def renewable_energy_sources
75
+ @xml_doc.search("Renewable-Energy-Sources").map(&:content)
76
+ end
77
+
78
+ def electricity_sources
79
+ @xml_doc.search("Electricity-Sources").map(&:content)
80
+ end
81
+
82
+ def primary_energy_indicator
83
+ xpath(%w[Primary-Energy-Indicator])
84
+ end
85
+
86
+ def calculation_tool
87
+ xpath(%w[Calculation-Tool])
88
+ end
89
+
90
+ def ter_2002
91
+ xpath(%w[TER-2002])
92
+ end
93
+
94
+ def ter
95
+ xpath(%w[TER])
96
+ end
97
+
98
+ def renewable_sources
99
+ xpath(%w[Renewable-Sources])
100
+ end
101
+
102
+ def recommendations(payback = "")
103
+ if payback.empty?
104
+ # return an enumerable of all nodes
105
+ @xml_doc.xpath "Recommendations-Report RR-Recommendations"
106
+ else
107
+ @xml_doc
108
+ .search("Recommendations-Report RR-Recommendations/#{payback}")
109
+ .map do |node|
110
+ {
111
+ code: node.at("Recommendation-Code").content,
112
+ text: node.at("Recommendation").content,
113
+ cO2Impact: node.at("CO2-Impact").content,
114
+ }
115
+ end
116
+ end
117
+ end
118
+
119
+ def short_payback_recommendations
120
+ recommendations("Short-Payback")
121
+ end
122
+
123
+ def medium_payback_recommendations
124
+ recommendations("Medium-Payback")
125
+ end
126
+
127
+ def long_payback_recommendations
128
+ recommendations("Long-Payback")
129
+ end
130
+
131
+ def other_recommendations
132
+ recommendations("Other-Payback")
76
133
  end
77
134
 
78
135
  def related_rrn
79
136
  xpath(%w[Related-RRN])
80
137
  end
81
138
 
82
- def special_energy_uses
83
- xpath(%w[Special-Energy-Uses])
139
+ def new_build_rating
140
+ xpath(%w[New-Build-Benchmark])&.to_i
84
141
  end
85
142
 
86
- def standard_emissions
87
- xpath(%w[SER])
143
+ def existing_build_rating
144
+ xpath(%w[Existing-Stock-Benchmark])&.to_i
88
145
  end
89
146
 
90
- def target_emissions
91
- xpath(%w[TER])
147
+ def epc_related_party_disclosure
148
+ xpath(%w[EPC-Related-Party-Disclosure])
92
149
  end
93
150
 
94
- def transaction_type
95
- xpath(%w[Transaction-Type])
151
+ def trading_address
152
+ xpath(%w[Trading-Address])
96
153
  end
97
154
 
98
- def typical_emissions
99
- xpath(%w[TYR])
155
+ def company_name
156
+ xpath(%w[Company-Name])
100
157
  end
101
158
 
102
- def renewable_sources
103
- xpath(%w[Renewable-Sources])
159
+ def insurer
160
+ xpath(%w[Insurer])
161
+ end
162
+
163
+ def policy_no
164
+ xpath(%w[Policy-No])
165
+ end
166
+
167
+ def insurer_effective_date
168
+ xpath(%w[Effective-Date])
169
+ end
170
+
171
+ def insurer_expiry_date
172
+ xpath(%w[Expiry-Date])
173
+ end
174
+
175
+ def insurer_pi_limit
176
+ xpath(%w[PI-Limit])
104
177
  end
105
178
  end
106
179
  end
@@ -6,6 +6,7 @@ module ViewModel
6
6
  @view_model = build_view_model(xml_doc, schema_type)
7
7
  @summary = Presenter::Cepc::Summary.new(view_model)
8
8
  @report = Presenter::Cepc::Report.new(view_model, additional_data)
9
+ @certificate_summary = Presenter::Cepc::CertificateSummary.new(view_model)
9
10
  end
10
11
 
11
12
  def type
@@ -22,6 +23,14 @@ module ViewModel
22
23
  @report.to_hash
23
24
  end
24
25
 
26
+ def to_certificate_summary
27
+ @certificate_summary.to_certificate_summary
28
+ end
29
+
30
+ def to_certificate_summary_scotland
31
+ @certificate_summary.to_certificate_summary_scotland
32
+ end
33
+
25
34
  def get_report_type
26
35
  view_model.report_type
27
36
  end
@@ -32,6 +32,7 @@ module ViewModel
32
32
  RdSAP-Schema-S-19.0
33
33
  ].freeze
34
34
  TYPES_OF_SAP = %i[
35
+ SAP-Schema-19.2.0
35
36
  SAP-Schema-19.1.0
36
37
  SAP-Schema-19.0.0
37
38
  SAP-Schema-18.0.0