epb_view_models 2.2.14 → 2.2.15

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.
@@ -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.2.14"
8
+ VERSION = "2.2.15"
9
9
  end
10
10
 
11
11
  # Monkey patching to avoid using ActiveRecord::Type::Boolean.new.cast
@@ -36,6 +36,7 @@ module ViewModel
36
36
  RdSAP-Schema-NI-17.4
37
37
  RdSAP-Schema-NI-17.3
38
38
  RdSAP-Schema-S-19.0
39
+ RdSAP-Schema-S-21.0
39
40
  ].freeze
40
41
  TYPES_OF_SAP = %i[
41
42
  SAP-Schema-19.2.0
@@ -0,0 +1,669 @@
1
+ module ViewModel
2
+ module RdSapSchemaS210
3
+ class CommonSchema < ViewModel::DomesticEpcViewModel
4
+ def assessment_id
5
+ xpath(%w[RRN])
6
+ end
7
+
8
+ def address_line1
9
+ xpath(%w[Property Address Address-Line-1])
10
+ end
11
+
12
+ def address_line2
13
+ xpath(%w[Property Address Address-Line-2]).to_s
14
+ end
15
+
16
+ def address_line3
17
+ xpath(%w[Property Address Address-Line-3]).to_s
18
+ end
19
+
20
+ def address_line4
21
+ xpath(%w[Property Address Address-Line-4]).to_s
22
+ end
23
+
24
+ def town
25
+ xpath(%w[Property Address Post-Town])
26
+ end
27
+
28
+ def postcode
29
+ xpath(%w[Property Address Postcode])
30
+ end
31
+
32
+ def scheme_assessor_id
33
+ xpath(%w[Membership-Number]) or xpath(%w[Certificate-Number])
34
+ end
35
+
36
+ def assessor_name
37
+ xpath(%w[Energy-Assessor Name])
38
+ end
39
+
40
+ def assessor_email
41
+ xpath(%w[Energy-Assessor E-Mail])
42
+ end
43
+
44
+ def assessor_telephone
45
+ xpath(%w[Energy-Assessor Telephone])
46
+ end
47
+
48
+ def date_of_assessment
49
+ xpath(%w[Inspection-Date])
50
+ end
51
+
52
+ def date_of_registration
53
+ xpath(%w[Registration-Date])
54
+ end
55
+
56
+ def date_of_completion
57
+ xpath(%w[Completion-Date])
58
+ end
59
+
60
+ def address_id
61
+ "LPRN-#{xpath(%w[UPRN])}"
62
+ end
63
+
64
+ def date_of_expiry
65
+ expires_at = (Date.parse(date_of_registration) - 1) >> 12 * 10
66
+
67
+ expires_at.to_s
68
+ end
69
+
70
+ def property_summary
71
+ @xml_doc.search("Energy-Assessment Property-Summary").children.select(
72
+ &:element?
73
+ ).map { |node|
74
+ next if xpath(%w[Energy-Efficiency-Rating], node).nil?
75
+
76
+ {
77
+ energy_efficiency_rating:
78
+ xpath(%w[Energy-Efficiency-Rating], node).to_i,
79
+ environmental_efficiency_rating:
80
+ xpath(%w[Environmental-Efficiency-Rating], node).to_i,
81
+ name: node.name.underscore,
82
+ description: xpath(%w[Description], node),
83
+ }
84
+ }.compact
85
+ end
86
+
87
+ def related_party_disclosure_text
88
+ xpath(%w[Related-Party-Disclosure-Text])
89
+ end
90
+
91
+ def related_party_disclosure_number
92
+ disclosure_number = xpath(%w[Related-Party-Disclosure-Number])
93
+ disclosure_number.nil? ? nil : disclosure_number.to_i
94
+ end
95
+
96
+ def improvements
97
+ @xml_doc
98
+ .search("Suggested-Improvements Improvement")
99
+ .map do |node|
100
+ {
101
+ energy_performance_rating_improvement:
102
+ xpath(%w[Energy-Performance-Rating], node).to_i,
103
+ environmental_impact_rating_improvement:
104
+ xpath(%w[Environmental-Impact-Rating], node).to_i,
105
+ green_deal_category_code: xpath(%w[Green-Deal-Category], node),
106
+ improvement_category: xpath(%w[Improvement-Category], node),
107
+ improvement_code:
108
+ xpath(%w[Improvement-Details Improvement-Number], node),
109
+ improvement_description: xpath(%w[Improvement-Description], node),
110
+ improvement_title: improvement_title(node),
111
+ improvement_type: xpath(%w[Improvement-Type], node),
112
+ indicative_cost: xpath(%w[Indicative-Cost], node),
113
+ sequence: xpath(%w[Sequence], node).to_i,
114
+ typical_saving: xpath(%w[Typical-Saving], node),
115
+ }
116
+ end
117
+ end
118
+
119
+ def recommendations_for_report
120
+ @xml_doc
121
+ .search("Suggested-Improvements Improvement")
122
+ .map do |node|
123
+ {
124
+ sequence: xpath(%w[Sequence], node).to_i,
125
+ improvement_summary: xpath(%w[Improvement-Summary], node),
126
+ improvement_description: xpath(%w[Improvement-Description], node),
127
+ improvement_code:
128
+ xpath(%w[Improvement-Details Improvement-Number], node),
129
+ indicative_cost: xpath(%w[Indicative-Cost], node),
130
+ }
131
+ end
132
+ end
133
+
134
+ def hot_water_cost_potential
135
+ xpath(%w[Hot-Water-Cost-Potential])
136
+ end
137
+
138
+ def heating_cost_potential
139
+ xpath(%w[Heating-Cost-Potential])
140
+ end
141
+
142
+ def lighting_cost_potential
143
+ xpath(%w[Lighting-Cost-Potential])
144
+ end
145
+
146
+ def hot_water_cost_current
147
+ xpath(%w[Hot-Water-Cost-Current])
148
+ end
149
+
150
+ def heating_cost_current
151
+ xpath(%w[Heating-Cost-Current])
152
+ end
153
+
154
+ def lighting_cost_current
155
+ xpath(%w[Lighting-Cost-Current])
156
+ end
157
+
158
+ def potential_carbon_emission
159
+ xpath(%w[CO2-Emissions-Potential])
160
+ end
161
+
162
+ def current_carbon_emission
163
+ xpath(%w[CO2-Emissions-Current])
164
+ end
165
+
166
+ def potential_energy_rating
167
+ xpath(%w[Energy-Rating-Potential])&.to_i
168
+ end
169
+
170
+ def current_energy_rating
171
+ xpath(%w[Energy-Rating-Current])&.to_i
172
+ end
173
+
174
+ def estimated_energy_cost; end
175
+
176
+ def total_floor_area
177
+ xpath(%w[Property-Summary Total-Floor-Area])
178
+ end
179
+
180
+ def dwelling_type
181
+ xpath(%w[Dwelling-Type])
182
+ end
183
+
184
+ def potential_energy_saving; end
185
+
186
+ def property_age_band
187
+ xpath(%w[Construction-Age-Band])
188
+ end
189
+
190
+ def tenure
191
+ xpath(%w[Tenure])
192
+ end
193
+
194
+ def transaction_type
195
+ xpath(%w[Transaction-Type])
196
+ end
197
+
198
+ def current_space_heating_demand
199
+ xpath(%w[Space-Heating-Existing-Dwelling])
200
+ end
201
+
202
+ def current_water_heating_demand
203
+ xpath(%w[Water-Heating])
204
+ end
205
+
206
+ def impact_of_cavity_insulation
207
+ if xpath(%w[Impact-Of-Cavity-Insulation])
208
+ xpath(%w[Impact-Of-Cavity-Insulation])&.to_i
209
+ end
210
+ end
211
+
212
+ def impact_of_loft_insulation
213
+ if xpath(%w[Impact-Of-Loft-Insulation])
214
+ xpath(%w[Impact-Of-Loft-Insulation])&.to_i
215
+ end
216
+ end
217
+
218
+ def impact_of_solid_wall_insulation
219
+ if xpath(%w[Impact-Of-Solid-Wall-Insulation])
220
+ xpath(%w[Impact-Of-Solid-Wall-Insulation])&.to_i
221
+ end
222
+ end
223
+
224
+ def habitable_room_count
225
+ xpath(%w[Habitable-Room-Count])&.to_i
226
+ end
227
+
228
+ def energy_rating_current
229
+ xpath(%w[Energy-Rating-Current])&.to_i
230
+ end
231
+
232
+ def energy_rating_potential
233
+ xpath(%w[Energy-Rating-Potential])&.to_i
234
+ end
235
+
236
+ def environmental_impact_current
237
+ xpath(%w[Environmental-Impact-Current])&.to_i
238
+ end
239
+
240
+ def environmental_impact_potential
241
+ xpath(%w[Environmental-Impact-Potential])&.to_i
242
+ end
243
+
244
+ def primary_energy_use
245
+ xpath(%w[Energy-Consumption-Current])&.to_f
246
+ end
247
+
248
+ def energy_consumption_potential
249
+ xpath(%w[Energy-Consumption-Potential])&.to_f
250
+ end
251
+
252
+ def all_roof_descriptions
253
+ @xml_doc.search("Roof/Description").map(&:content)
254
+ end
255
+
256
+ def all_roof_energy_efficiency_rating
257
+ @xml_doc.search("Roof/Energy-Efficiency-Rating").map(&:content)
258
+ end
259
+
260
+ def all_roof_env_energy_efficiency_rating
261
+ @xml_doc.search("Roof/Environmental-Efficiency-Rating").map(&:content)
262
+ end
263
+
264
+ def all_window_descriptions
265
+ @xml_doc.search("Window/Description").map(&:content)
266
+ end
267
+
268
+ def all_main_heating_descriptions
269
+ @xml_doc.search("Main-Heating/Description").map(&:content)
270
+ end
271
+
272
+ def all_main_heating_controls_descriptions
273
+ @xml_doc.search("Main-Heating-Controls/Description").map(&:content)
274
+ end
275
+
276
+ def all_main_heating_energy_efficiency
277
+ @xml_doc.search("Main-Heating/Energy-Efficiency-Rating").map(&:content)
278
+ end
279
+
280
+ def all_main_heating_environmental_efficiency
281
+ @xml_doc
282
+ .search("Main-Heating/Environmental-Efficiency-Rating")
283
+ .map(&:content)
284
+ end
285
+
286
+ def all_hot_water_descriptions
287
+ @xml_doc.search("Hot-Water/Description").map(&:content)
288
+ end
289
+
290
+ def all_lighting_descriptions
291
+ @xml_doc.search("Lighting/Description").map(&:content)
292
+ end
293
+
294
+ def all_secondary_heating_descriptions
295
+ @xml_doc.search("Secondary-Heating/Description").map(&:content)
296
+ end
297
+
298
+ def country_code
299
+ xpath(%w[Country-Code])
300
+ end
301
+
302
+ def main_fuel_type
303
+ xpath(%w[Main-Fuel-Type])
304
+ end
305
+
306
+ def secondary_fuel_type
307
+ xpath(%w[Secondary-Fuel-Type])
308
+ end
309
+
310
+ def water_heating_fuel
311
+ xpath(%w[Water-Heating-Fuel])
312
+ end
313
+
314
+ def co2_emissions_current_per_floor_area
315
+ xpath(%w[CO2-Emissions-Current-Per-Floor-Area])&.to_f
316
+ end
317
+
318
+ def mains_gas
319
+ xpath(%w[Mains-Gas])
320
+ end
321
+
322
+ def level
323
+ xpath(%w[Level])
324
+ end
325
+
326
+ def top_storey
327
+ xpath(%w[Top-Storey])
328
+ end
329
+
330
+ def storey_count
331
+ xpath(%w[Storey-Count])&.to_i
332
+ end
333
+
334
+ def main_heating_controls
335
+ xpath(%w[Main-Heating-Controls Description])
336
+ end
337
+
338
+ def multiple_glazed_proportion
339
+ xpath(%w[Multiple-Glazed-Proportion])
340
+ end
341
+
342
+ def glazed_area; end
343
+
344
+ def heated_room_count
345
+ xpath(%w[Heated-Room-Count])&.to_i
346
+ end
347
+
348
+ def low_energy_lighting
349
+ if fixed_lighting_outlets_count.zero?
350
+ return 0
351
+ end
352
+ ((low_energy_fixed_lighting_outlets_count.to_f / fixed_lighting_outlets_count) * 100).round
353
+ end
354
+
355
+ def fixed_lighting_outlets_count
356
+ fixed_lighting_outlets_count = low_energy_fixed_lighting_outlets_count
357
+ if xpath(%w[Incandescent-Fixed-Lighting-Bulbs-Count])
358
+ fixed_lighting_outlets_count += xpath(%w[Incandescent-Fixed-Lighting-Bulbs-Count])&.to_i
359
+ end
360
+ fixed_lighting_outlets_count
361
+ end
362
+
363
+ def low_energy_fixed_lighting_outlets_count
364
+ low_energy_fixed_lighting_outlets_count = 0
365
+ if xpath(%w[CFL-Fixed-Lighting-Bulbs-Count])
366
+ low_energy_fixed_lighting_outlets_count += xpath(%w[CFL-Fixed-Lighting-Bulbs-Count])&.to_i
367
+ end
368
+ if xpath(%w[LED-Fixed-Lighting-Bulbs-Count])
369
+ low_energy_fixed_lighting_outlets_count += xpath(%w[LED-Fixed-Lighting-Bulbs-Count])&.to_i
370
+ end
371
+ if xpath(%w[Low-Energy-Fixed-Lighting-Bulbs-Count])
372
+ low_energy_fixed_lighting_outlets_count += xpath(%w[Low-Energy-Fixed-Lighting-Bulbs-Count])&.to_i
373
+ end
374
+ low_energy_fixed_lighting_outlets_count
375
+ end
376
+
377
+ def open_fireplaces_count
378
+ xpath(%w[Open-Chimneys-Count])&.to_i
379
+ end
380
+
381
+ def hot_water_description
382
+ xpath(%w[Hot-Water Description])
383
+ end
384
+
385
+ def hot_water_energy_efficiency_rating
386
+ xpath(%w[Hot-Water Energy-Efficiency-Rating])
387
+ end
388
+
389
+ def hot_water_environmental_efficiency_rating
390
+ xpath(%w[Hot-Water Environmental-Efficiency-Rating])
391
+ end
392
+
393
+ def wind_turbine_count
394
+ xpath(%w[Wind-Turbines-Count])&.to_i
395
+ end
396
+
397
+ def heat_loss_corridor
398
+ xpath(%w[Heat-Loss-Corridor])
399
+ end
400
+
401
+ def unheated_corridor_length
402
+ xpath(%w[Unheated-Corridor-Length])
403
+ end
404
+
405
+ def window_description
406
+ xpath(%w[Window Description])
407
+ end
408
+
409
+ def window_energy_efficiency_rating
410
+ xpath(%w[Window Energy-Efficiency-Rating])
411
+ end
412
+
413
+ def window_environmental_efficiency_rating
414
+ xpath(%w[Window Environmental-Efficiency-Rating])
415
+ end
416
+
417
+ def secondary_heating_description
418
+ xpath(%w[Secondary-Heating Description])
419
+ end
420
+
421
+ def secondary_heating_energy_efficiency_rating
422
+ xpath(%w[Secondary-Heating Energy-Efficiency-Rating])
423
+ end
424
+
425
+ def secondary_heating_environmental_efficiency_rating
426
+ xpath(%w[Secondary-Heating Environmental-Efficiency-Rating])
427
+ end
428
+
429
+ def lighting_description
430
+ xpath(%w[Lighting Description])
431
+ end
432
+
433
+ def lighting_energy_efficiency_rating
434
+ xpath(%w[Lighting Energy-Efficiency-Rating])
435
+ end
436
+
437
+ def lighting_environmental_efficiency_rating
438
+ xpath(%w[Lighting Environmental-Efficiency-Rating])
439
+ end
440
+
441
+ def photovoltaic_roof_area_percent
442
+ xpath(%w[Photovoltaic-Supply Percent-Roof-Area])
443
+ end
444
+
445
+ def built_form
446
+ xpath(%w[Built-Form])
447
+ end
448
+
449
+ def extensions_count
450
+ xpath(%w[Extensions-Count])&.to_i
451
+ end
452
+
453
+ def report_type
454
+ xpath(%w[Report-Type])
455
+ end
456
+
457
+ def all_wall_descriptions
458
+ @xml_doc.search("Wall/Description").map(&:content)
459
+ end
460
+
461
+ def all_wall_energy_efficiency_rating
462
+ @xml_doc.search("Wall/Energy-Efficiency-Rating").map(&:content)
463
+ end
464
+
465
+ def all_wall_env_energy_efficiency_rating
466
+ @xml_doc.search("Wall/Environmental-Efficiency-Rating").map(&:content)
467
+ end
468
+
469
+ def meter_type
470
+ xpath(%w[Meter-Type])
471
+ end
472
+
473
+ def gas_smart_meter_present
474
+ Helper::ToBool.execute(xpath(%w[Gas-Smart-Meter-Present]))
475
+ end
476
+
477
+ def electricity_smart_meter_present
478
+ Helper::ToBool.execute(xpath(%w[Electricity-Smart-Meter-Present]))
479
+ end
480
+
481
+ def floor_level
482
+ xpath(%w[Flat-Location])
483
+ end
484
+
485
+ def solar_water_heating_flag
486
+ xpath(%w[Solar-Water-Heating])
487
+ end
488
+
489
+ def mechanical_ventilation
490
+ xpath(%w[Mechanical-Ventilation])
491
+ end
492
+
493
+ def floor_height
494
+ @xml_doc.search("Room-Height").map(&:content)
495
+ end
496
+
497
+ def all_floor_descriptions
498
+ @xml_doc.search("Property-Summary/Floor/Description").map(&:content)
499
+ end
500
+
501
+ def all_floor_energy_efficiency_rating
502
+ @xml_doc
503
+ .search("Property-Summary/Floor/Energy-Efficiency-Rating")
504
+ .map(&:content)
505
+ end
506
+
507
+ def all_floor_env_energy_efficiency_rating
508
+ @xml_doc
509
+ .search("Property-Summary/Floor/Environmental-Efficiency-Rating")
510
+ .map(&:content)
511
+ end
512
+
513
+ def all_main_heating_controls_energy_efficiency
514
+ @xml_doc
515
+ .search("Main-Heating-Controls/Energy-Efficiency-Rating")
516
+ .map(&:content)
517
+ end
518
+
519
+ def all_main_heating_controls_environmental_efficiency
520
+ @xml_doc
521
+ .search("Main-Heating-Controls/Environmental-Efficiency-Rating")
522
+ .map(&:content)
523
+ end
524
+
525
+ def main_dwelling_construction_age_band_or_year
526
+ sap_building_parts =
527
+ @xml_doc.xpath("//SAP-Building-Parts/SAP-Building-Part")
528
+ sap_building_parts.each do |sap_building_part|
529
+ building_part_number = sap_building_part.at("Building-Part-Number")
530
+
531
+ # Identifies the Main Dwelling
532
+ if building_part_number&.content == "1"
533
+ return (
534
+ sap_building_part.at_xpath(
535
+ "Construction-Age-Band | Construction-Year",
536
+ )&.content
537
+ )
538
+ end
539
+ end
540
+ nil
541
+ end
542
+
543
+ def cylinder_insul_thickness
544
+ xpath(%w[Cylinder-Insulation-Thickness])
545
+ end
546
+
547
+ def cylinder_insulation_type
548
+ xpath(%w[Cylinder-Insulation-Type])
549
+ end
550
+
551
+ def cylinder_size
552
+ xpath(%w[Cylinder-Size])
553
+ end
554
+
555
+ def has_cylinder_thermostat
556
+ xpath(%w[Cylinder-Thermostat])
557
+ end
558
+
559
+ def party_wall_construction
560
+ xpath(%w[SAP-Building-Part Party-Wall-Construction])
561
+ end
562
+
563
+ # For lodgement rules
564
+
565
+ def party_walls_construction
566
+ @xml_doc
567
+ .search("SAP-Building-Part")
568
+ .map do |node|
569
+ xpath(%w[Party-Wall-Construction], node)
570
+ end
571
+ end
572
+
573
+ def walls_thickness
574
+ @xml_doc
575
+ .search("SAP-Building-Part")
576
+ .map do |node|
577
+ {
578
+ alternative_wall_thickness: node.at_xpath("SAP-Alternative-Wall/Wall-Thickness")&.content,
579
+ alternative_wall_thickness_measured: node.at_xpath("SAP-Alternative-Wall/Wall-Thickness-Measured")&.content,
580
+ alternative_wall_construction: node.at_xpath("SAP-Alternative-Wall/Wall-Construction")&.content,
581
+ alternative_wall_u_value: node.at_xpath("SAP-Alternative-Wall/Wall-U-Value")&.content,
582
+ alternative_wall_insulation_thickness: node.at_xpath("SAP-Alternative-Wall/Wall-Insulation-Thickness")&.content,
583
+ wall_thickness: node.at_xpath("Wall-Thickness")&.content,
584
+ wall_construction: node.at_xpath("Wall-Construction")&.content,
585
+ wall_thickness_measured: node.at_xpath("Wall-Thickness-Measured")&.content,
586
+ }
587
+ end
588
+ end
589
+
590
+ def rooves_construction_and_insulation
591
+ @xml_doc
592
+ .search("SAP-Building-Part")
593
+ .map do |node|
594
+ {
595
+ roof_insulation_location: node.at_xpath("Roof-Insulation-Location")&.content,
596
+ roof_construction: node.at_xpath("Roof-Construction")&.content,
597
+ }
598
+ end
599
+ end
600
+
601
+ def rooms_in_roof_insulation
602
+ nil
603
+ end
604
+
605
+ def floors_insulation
606
+ @xml_doc
607
+ .search("SAP-Building-Part")
608
+ .map do |node|
609
+ {
610
+ floor_u_value: node.at_xpath("Floor-U-Value")&.content,
611
+ floor_insulation_thickness: node.at_xpath("Floor-Insulation-Thickness")&.content,
612
+ }
613
+ end
614
+ end
615
+
616
+ def rooves_insulation
617
+ @xml_doc
618
+ .search("SAP-Building-Part")
619
+ .map do |node|
620
+ {
621
+ roof_u_value: node.at_xpath("Roof-U-Value")&.content,
622
+ roof_insulation_thickness: node.at_xpath("Roof-Insulation-Thickness")&.content,
623
+ rafter_insulation_thickness: node.at_xpath("Rafter-Insulation-Thickness")&.content,
624
+ flat_roof_insulation_thickness: node.at_xpath("Flat-Roof-Insulation-Thickness")&.content,
625
+ sloping_ceiling_insulation_thickness: node.at_xpath("Sloping-Ceiling-Insulation-Thickness")&.content,
626
+ }
627
+ end
628
+ end
629
+
630
+ def walls_insulation
631
+ @xml_doc
632
+ .search("SAP-Building-Part")
633
+ .map do |node|
634
+ {
635
+ wall_u_value: node.at_xpath("Wall-U-Value")&.content,
636
+ wall_insulation_thickness: node.at_xpath("Wall-Insulation-Thickness")&.content,
637
+ }
638
+ end
639
+ end
640
+
641
+ def rooms_in_roof
642
+ nil
643
+ end
644
+
645
+ def rooms_in_roof_roof_insulation
646
+ nil
647
+ end
648
+
649
+ def main_heating_details
650
+ @xml_doc
651
+ .search("Main-Heating")
652
+ .map do |node|
653
+ {
654
+ main_heating_index_number: xpath(%w[Main-Heating-Index-Number]),
655
+ sap_main_heating_code: xpath(%w[SAP-Main-Heating-Code]),
656
+ main_fuel_type: xpath(%w[Main-Fuel-Type]),
657
+ }
658
+ end
659
+ end
660
+
661
+ def water_heating
662
+ {
663
+ water_heating_fuel: xpath(%w[Water-Heating-Fuel]),
664
+ water_heating_code: xpath(%w[Water-Heating-Code]),
665
+ }
666
+ end
667
+ end
668
+ end
669
+ end
@@ -85,6 +85,8 @@ module ViewModel
85
85
  ViewModel::RdSapSchemaNi173::CommonSchema.new xml_doc
86
86
  when :"RdSAP-Schema-S-19.0"
87
87
  ViewModel::RdSapSchemaS190::CommonSchema.new xml_doc
88
+ when :"RdSAP-Schema-S-21.0"
89
+ ViewModel::RdSapSchemaS210::CommonSchema.new xml_doc
88
90
  else
89
91
  raise ArgumentError, "Unsupported schema type"
90
92
  end