modules/claims_api/app/controllers/claims_api/v1/forms/intent_to_file_controller.rb
# GET current intent to file status based on type.
#
# @return [JSON] Response from BGS
GET current intent to file status based on type.
GET current intent to file status based on type .
def active
          check_for_type
          bgs_response = bgs_service.intent_to_file.find_intent_to_file_by_ptcpnt_id_itf_type_cd(
            target_veteran.participant_id,
            ClaimsApi::IntentToFile::ITF_TYPES_TO_BGS_TYPES[active_param]
          )
          bgs_active = if bgs_response.is_a?(Array)
                         bgs_response.detect { |itf| active?(itf) }
                       elsif active?(bgs_response)
                         bgs_response
                       end
          message = "No Intent to file is on record for #{target_veteran_name} of type #{active_param}"
          raise ::Common::Exceptions::ResourceNotFound.new(detail: message) if bgs_active.blank?
          render json: bgs_active, serializer: ClaimsApi::IntentToFileSerializer
        end
def active check_for_type bgs_response = bgs_service . intent_to_file . find_intent_to_file_by_ptcpnt_id_itf_type_cd ( target_veteran . participant_id , ClaimsApi :: IntentToFile :: ITF_TYPES_TO_BGS_TYPES [ active_param ] ) bgs_active = if bgs_response . is_a? ( Array ) bgs_response . detect { | itf | active? ( itf ) } elsif active? ( bgs_response ) bgs_response end message = "No Intent to file is on record for #{target_veteran_name} of type #{active_param}" raise :: Common :: Exceptions :: ResourceNotFound . new ( detail : message ) if bgs_active . blank? render json : bgs_active , serializer : ClaimsApi :: IntentToFileSerializer end
GET current intent to file status based on type.
GET current intent to file status based on type .
Response from BGS
Response from BGS
JSON