Class: SavedClaim::HigherLevelReview
- Inherits:
-
SavedClaim
- Object
- ActiveRecord::Base
- ApplicationRecord
- SavedClaim
- SavedClaim::HigherLevelReview
- Defined in:
- app/models/saved_claim/higher_level_review.rb
Constant Summary collapse
- FORM =
'20-0996'
Instance Method Summary collapse
Methods inherited from SavedClaim
add_form_and_validation, #after_create_metrics, #after_destroy_metrics, #attachment_keys, #business_line, #confirmation_number, #email, #form_is_string, #form_must_be_string, #insert_notification, #open_struct_form, #parsed_form, #submitted_at, #to_pdf, #update_form, #va_notification?, #validate_form, #validate_schema
Methods inherited from ApplicationRecord
descendants_using_encryption, lockbox_options, #timestamp_attributes_for_update_in_model, #valid?
Instance Method Details
#form_matches_schema ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/models/saved_claim/higher_level_review.rb', line 8 def form_matches_schema return unless form_is_string schema = VetsJsonSchema::SCHEMAS['HLR-CREATE-REQUEST-BODY_V1'] schema.delete '$schema' # workaround for JSON::Schema::SchemaError (Schema not found) validation_errors = JSON::Validator.fully_validate(schema, parsed_form) unless validation_errors.empty? Rails.logger.warn("SavedClaim: form schema errors detected for form #{FORM}", validation_errors) end true # allow storage of invalid requests for debugging end |
#process_attachments! ⇒ Object
23 24 25 26 |
# File 'app/models/saved_claim/higher_level_review.rb', line 23 def # Inherited from SavedClaim. Disabling since this claim handles attachments separately. raise NotImplementedError, 'Not Implemented for Form 20-0996' end |