Class: SavedClaim::SupplementalClaim
- Inherits:
-
SavedClaim
- Object
- ActiveRecord::Base
- ApplicationRecord
- SavedClaim
- SavedClaim::SupplementalClaim
- Defined in:
- app/models/saved_claim/supplemental_claim.rb
Constant Summary collapse
- FORM =
'20-0995'
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
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/models/saved_claim/supplemental_claim.rb', line 9 def form_matches_schema return unless form_is_string schema = VetsJsonSchema::SCHEMAS['SC-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
24 25 26 27 |
# File 'app/models/saved_claim/supplemental_claim.rb', line 24 def # Inherited from SavedClaim. Disabling since this claim handles attachments separately. raise NotImplementedError, 'Not Implemented for Form 20-0995' end |