Module: DecisionReview::SavedClaim::Service

Included in:
AppealSubmission, V1::HigherLevelReviewsController, V1::SupplementalClaimsController, V2::HigherLevelReviewsController
Defined in:
lib/decision_review/utilities/saved_claim/service.rb

Constant Summary collapse

VALID_CLASS =
[
  ::SavedClaim::HigherLevelReview,
  ::SavedClaim::NoticeOfDisagreement,
  ::SavedClaim::SupplementalClaim
].freeze

Instance Method Summary collapse

Instance Method Details

#store_saved_claim(claim_class:, form:, guid:, uploaded_forms: []) ⇒ Object



15
16
17
18
19
20
# File 'lib/decision_review/utilities/saved_claim/service.rb', line 15

def store_saved_claim(claim_class:, form:, guid:, uploaded_forms: [])
  raise "Invalid class type '#{claim_class}'" unless VALID_CLASS.include? claim_class

  claim = claim_class.new(form:, guid:, uploaded_forms:)
  claim.save!
end