index
int64
0
0
repo_id
stringclasses
829 values
file_path
stringlengths
34
254
content
stringlengths
6
5.38M
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/appeal_submission.rb
# frozen_string_literal: true require 'decision_review/utilities/saved_claim/service' class AppealSubmission < ApplicationRecord include DecisionReview::SavedClaim::Service APPEAL_TYPES = %w[HLR NOD SC].freeze validates :submitted_appeal_uuid, presence: true belongs_to :user_account, dependent: nil, optional...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/user_credential_email.rb
# frozen_string_literal: true class UserCredentialEmail < ApplicationRecord belongs_to :user_verification, dependent: nil, optional: false has_kms_key has_encrypted :credential_email, key: :kms_key, **lockbox_options validates :credential_email_ciphertext, presence: true end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/user_session_form.rb
# frozen_string_literal: true class UserSessionForm include ActiveModel::Validations VALIDATIONS_FAILED_ERROR_CODE = '004' SAML_REPLAY_VALID_SESSION_ERROR_CODE = '002' ERRORS = { validations_failed: { code: VALIDATIONS_FAILED_ERROR_CODE, tag: :validations_failed, ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/extract_status.rb
# frozen_string_literal: true require 'vets/model' require 'digest' # facility extract statuses, part of PHR refresh. class ExtractStatus include Vets::Model attribute :extract_type, String attribute :last_updated, Vets::Type::UTCTime attribute :status, String attribute :created_on, Vets::Type::UTCTime a...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/transaction_notification.rb
# frozen_string_literal: true require 'common/models/concerns/cache_aside' class TransactionNotification < Common::RedisStore redis_store REDIS_CONFIG[:transaction_notification][:namespace] redis_ttl REDIS_CONFIG[:transaction_notification][:each_ttl] redis_key :transaction_id attribute :transaction_id, Strin...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/secondary_appeal_form.rb
# frozen_string_literal: true class SecondaryAppealForm < ApplicationRecord validates :guid, :form_id, :form, presence: true belongs_to :appeal_submission has_kms_key has_encrypted :form, key: :kms_key, **lockbox_options scope :needs_failure_notification, lambda { where(delete_date: nil, failure_notifi...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/eligible_data_class.rb
# frozen_string_literal: true require 'vets/model' # BlueButton EligibleDataClass class EligibleDataClass include Vets::Model attribute :name, String end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/application_record.rb
# frozen_string_literal: true class ApplicationRecord < ActiveRecord::Base self.abstract_class = true def self.lockbox_options { previous_versions: [ { padding: false }, { padding: false, master_key: Settings.lockbox.master_key } ] } end def self.descendants_using_encrypti...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/user_verification.rb
# frozen_string_literal: true class UserVerification < ApplicationRecord has_one :deprecated_user_account, dependent: :destroy, required: false belongs_to :user_account, dependent: nil has_one :user_credential_email, dependent: :destroy, required: false validate :single_credential_identifier validate :backi...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/mpi_data.rb
# frozen_string_literal: true require 'mpi/responses/find_profile_response' require 'mpi/service' require 'common/models/redis_store' require 'common/models/concerns/cache_aside' require 'mpi/constants' # Facade for MVI. User model delegates MVI correlation id and VA profile (golden record) methods to this class. # W...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/mhv_user_account.rb
# frozen_string_literal: true class MHVUserAccount include ActiveModel::Model include ActiveModel::Attributes attribute :user_profile_id, :string attribute :premium, :boolean attribute :champ_va, :boolean attribute :patient, :boolean attribute :sm_account_created, :boolean attribute :message, :string ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/prescription_documentation.rb
# frozen_string_literal: true require 'active_model' class PrescriptionDocumentation attr_reader :html def initialize(html) @html = html end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/lcpe_redis.rb
# frozen_string_literal: true require 'common/models/concerns/cache_aside' require 'gi/lcpe/response' # Facade for GIDS LCPE data class LCPERedis < Common::RedisStore include Common::CacheAside redis_config_key :lcpe_response attr_reader :lcpe_type class ClientCacheStaleError < StandardError; end def in...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/mhv_opt_in_flag.rb
# frozen_string_literal: true class MHVOptInFlag < ApplicationRecord belongs_to :user_account, dependent: nil FEATURES = %w[secure_messaging].freeze attribute :user_account_id attribute :feature validates :feature, presence: true validates :feature, inclusion: { in: FEATURES } end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/health_care_application.rb
# frozen_string_literal: true require 'hca/service' require 'hca/rate_limited_search' require 'hca/user_attributes' require 'hca/enrollment_eligibility/service' require 'hca/enrollment_eligibility/status_matcher' require 'mpi/service' require 'hca/overrides_parser' require 'kafka/sidekiq/event_bus_submission_job' cla...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/iam_user_identity.rb
# frozen_string_literal: true require 'vets/shared_logging' # Subclasses the `UserIdentity` model. Adds a unique redis namespace for IAM user identities. # Like the it's base model it acts as an adapter for the attributes from the IAMSSOeOAuth::Service's # introspect endpoint.Adds IAM sourced versions of ICN, EDIPI, ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/message_thread_details.rb
# frozen_string_literal: true class MessageThreadDetails < Message attribute :message_id, Integer attribute :thread_id, Integer attribute :folder_id, Integer attribute :message_body, String attribute :draft_date, Vets::Type::DateTimeString attribute :to_date, Vets::Type::DateTimeString attribute :has_att...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/messaging_signature.rb
# frozen_string_literal: true require 'vets/model' class MessagingSignature include Vets::Model attribute :signature_name, String attribute :signature_title, String attribute :include_signature, Bool, default: false validates :signature_name, :signature_title, :include_signature, presence: true def to_...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/datadog_metrics.rb
# frozen_string_literal: true module DatadogMetrics ALLOWLIST = [ # MR list calls 'mr.labs_and_tests_list', 'mr.care_summaries_and_notes_list', 'mr.vaccines_list', 'mr.allergies_list', 'mr.health_conditions_list', 'mr.vitals_list', # MR detail calls 'mr.labs_and_tests_details', ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/user.rb
# frozen_string_literal: true require 'common/models/base' require 'common/models/redis_store' require 'evss/auth_headers' require 'evss/common_service' require 'mpi/service' require 'saml/user' require 'formatters/date_formatter' require 'va_profile/configuration' require 'va_profile/veteran_status/service' class Us...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/triage_team.rb
# frozen_string_literal: true require 'vets/model' # TriageTeam model class TriageTeam include Vets::Model include RedisCaching redis_config REDIS_CONFIG[:secure_messaging_store] attribute :triage_team_id, Integer attribute :name, String attribute :relation_type, String attribute :preferred_team, Bool...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/evidence_submission_poll_store.rb
# frozen_string_literal: true # RedisStore for caching evidence submission polling to prevent redundant Lighthouse API calls. # This implements the cache-aside pattern to reduce load on Lighthouse Benefits Documents API. # # Cache Strategy: # - Caches the set of request_ids that have been successfully polled for a giv...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/models/user_relationship.rb
# frozen_string_literal: true class UserRelationship attr_accessor :first_name, :last_name, :birth_date, :ssn, :gender, :veteran_status, :participant_id, :icn PERSON_TYPE_VETERAN = 'VET' # Initializer with a single 'person' from a BGS get_dependents call def self.from_bgs_dependent(bgs_depend...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/base.rb
# frozen_string_literal: true require 'vets/model' module BGSDependentsV2 class Base include Vets::Model MILITARY_POST_OFFICE_TYPE_CODES = %w[APO DPO FPO].freeze # Gets the person's address based on the lives with veteran flag # # @param dependents_application [Hash] the submitted form informat...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/veteran.rb
# frozen_string_literal: true module BGSDependentsV2 class Veteran < Base attribute :participant_id, String attribute :ssn, String attribute :first_name, String attribute :middle_name, String attribute :last_name, String def initialize(proc_id, user) # rubocop:disable Lint/MissingSuper ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/adult_child_attending_school.rb
# frozen_string_literal: true module BGSDependentsV2 class AdultChildAttendingSchool < Base # The AdultChildAttendingSchool class represents a person including name and address info # # @!attribute first # @return [String] the person's first name # @!attribute middle # @return [String] th...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/divorce.rb
# frozen_string_literal: true module BGSDependentsV2 class Divorce < Base def initialize(divorce_info) # rubocop:disable Lint/MissingSuper @divorce_info = divorce_info end def format_info { divorce_state: @divorce_info.dig('divorce_location', 'location', 'state'), divorce_cit...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/child.rb
# frozen_string_literal: true module BGSDependentsV2 class Child < Base # The Child class represents a veteran's dependent/child including name, address, and birth info # # @!attribute ssn # @return [String] the person's social security number # @!attribute first # @return [String] the pe...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/vnp_benefit_claim.rb
# frozen_string_literal: true module BGSDependentsV2 class VnpBenefitClaim VNP_BENEFIT_CREATE_PARAMS = { status_type_cd: 'CURR', svc_type_cd: 'CP', pgm_type_cd: 'COMP', bnft_claim_type_cd: '130DPNEBNADJ', atchms_ind: 'N' }.freeze def initialize(proc_id, veteran) @vete...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/child_marriage.rb
# frozen_string_literal: true module BGSDependentsV2 class ChildMarriage < Base def initialize(child_marriage) # rubocop:disable Lint/MissingSuper @child_marriage = child_marriage end def format_info { event_date: @child_marriage['date_married'], ssn: @child_marriage['ssn'], ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/step_child.rb
# frozen_string_literal: true module BGSDependentsV2 class StepChild < Base EXPENSE_PAID_CONVERTER = { 'Half' => '.5', 'More than half' => '.75', 'Less than half' => '.25' }.freeze def initialize(stepchild_info) # rubocop:disable Lint/MissingSuper @stepchild_info = stepchild_info end def forma...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/child_school.rb
# frozen_string_literal: true module BGSDependentsV2 class ChildSchool < Base attribute :last_term_school_information, Hash attribute :school_information, Hash attribute :program_information, Hash attribute :current_term_dates, Hash def initialize(proc_id, vnp_participant_id, student = nil) # ru...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/marriage_history.rb
# frozen_string_literal: true module BGSDependentsV2 class MarriageHistory < Base def initialize(former_spouse) # rubocop:disable Lint/MissingSuper @former_spouse = former_spouse @start_source = @former_spouse.dig('start_location', 'location') @end_source = @former_spouse.dig('end_location', 'l...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/death.rb
# frozen_string_literal: true module BGSDependentsV2 class Death < Base def initialize(death_info) # rubocop:disable Lint/MissingSuper @death_info = death_info end def format_info dependent_type = relationship_type(@death_info) info = { death_date: format_date(@death_info['depe...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/relationship.rb
# frozen_string_literal: true module BGSDependentsV2 class Relationship < Base def initialize(proc_id) # rubocop:disable Lint/MissingSuper @proc_id = proc_id end def params_for_686c(participant_a_id, dependent) { vnp_proc_id: @proc_id, vnp_ptcpnt_id_a: participant_a_id, ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/spouse.rb
# frozen_string_literal: true module BGSDependentsV2 class Spouse < Base # The Spouse class represents a person including name, address, and marital status info # # @!attribute ssn # @return [String] the person's social security number # @!attribute first # @return [String] the person's f...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/child_stopped_attending_school.rb
# frozen_string_literal: true module BGSDependentsV2 class ChildStoppedAttendingSchool < Base def initialize(child_info) # rubocop:disable Lint/MissingSuper @child_info = child_info end def format_info { event_date: @child_info['date_child_left_school'], ssn: @child_info['ssn...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs_dependents_v2/child_student.rb
# frozen_string_literal: true module BGSDependentsV2 class ChildStudent < Base attribute :student_address_marriage_tuition, Hash attribute :student_earnings_from_school_year, Hash attribute :student_networth_information, Hash attribute :student_expected_earnings_next_year, Hash attribute :student...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/persistent_attachments/military_records.rb
# frozen_string_literal: true class PersistentAttachments::MilitaryRecords < PersistentAttachment include ::ClaimDocumentation::Uploader::Attachment.new(:file) before_destroy(:delete_file) def warnings @warnings ||= [] end private def delete_file file.delete end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/persistent_attachments/lgy_claim.rb
# frozen_string_literal: true class PersistentAttachments::LgyClaim < PersistentAttachment include ::ClaimDocumentation::Uploader::Attachment.new(:file) before_destroy(:delete_file) private def delete_file file.delete end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/persistent_attachments/dependency_claim.rb
# frozen_string_literal: true class PersistentAttachments::DependencyClaim < PersistentAttachment include ::ClaimDocumentation::Uploader::Attachment.new(:file) before_destroy(:delete_file) # @see PersistentAttachment#requires_stamped_pdf_validation def requires_stamped_pdf_validation? true end priva...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/persistent_attachments/va_form.rb
# frozen_string_literal: true class PersistentAttachments::VAForm < PersistentAttachment include ::FormUpload::Uploader::Attachment.new(:file) before_destroy(:delete_file) CONFIGS = Hash.new( { max_pages: 10, min_pages: 1 } ).merge( { '21-0779' => { max_pages: 4, min_pages: 2 }, '21-4192'...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/persistent_attachments/claim_evidence.rb
# frozen_string_literal: true # This class represents the generic and default persistent attachment type # used by ClaimDocumentsController when a more specific subclass is not selected # based on form_id. It provides the default override for claim evidence uploads. # # See ClaimDocumentsController#klass for how this ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/persistent_attachments/va_form_documentation.rb
# frozen_string_literal: true class PersistentAttachments::VAFormDocumentation < PersistentAttachment include ::ClaimDocumentation::Uploader::Attachment.new(:file) before_destroy(:delete_file) private def delete_file file.delete end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/persistent_attachments/pension_burial.rb
# frozen_string_literal: true class PersistentAttachments::PensionBurial < PersistentAttachment include ::ClaimDocumentation::Uploader::Attachment.new(:file) before_destroy(:delete_file) private def delete_file file.delete end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/code_container.rb
# frozen_string_literal: true module SignIn class CodeContainer < Common::RedisStore redis_store REDIS_CONFIG[:sign_in_code_container][:namespace] redis_ttl REDIS_CONFIG[:sign_in_code_container][:each_ttl] redis_key :code attribute :code_challenge, String attribute :code, String attribute :c...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/config_certificate.rb
# frozen_string_literal: true module SignIn class ConfigCertificate < ApplicationRecord self.table_name = 'sign_in_config_certificates' belongs_to :config, polymorphic: true belongs_to :cert, class_name: 'SignIn::Certificate', foreign_key: :certificate_id, inverse_of: :config_certificates accepts_ne...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/credential_level.rb
# frozen_string_literal: true module SignIn class CredentialLevel include ActiveModel::Validations attr_reader( :requested_acr, :current_ial, :max_ial, :credential_type, :auto_uplevel ) validates(:requested_acr, inclusion: { in: Constants::Auth::ACR_VALUES }) valid...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/o_auth_session.rb
# frozen_string_literal: true module SignIn class OAuthSession < ApplicationRecord belongs_to :user_account, dependent: nil belongs_to :user_verification, dependent: nil has_kms_key has_encrypted :user_attributes, key: :kms_key, **lockbox_options validates :handle, uniqueness: true, presence: t...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/user_info.rb
# frozen_string_literal: true module SignIn class UserInfo include ActiveModel::Model include ActiveModel::Attributes include ActiveModel::Serialization GCID_TYPE_CODES = { icn: '200M', sec_id: '200PROV', edipi: '200DOD', mhv_ien: '200MHV', npi_id: '200ENPI', vhic...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/state_code.rb
# frozen_string_literal: true module SignIn class StateCode < Common::RedisStore redis_store REDIS_CONFIG[:sign_in_state_code][:namespace] redis_ttl REDIS_CONFIG[:sign_in_state_code][:each_ttl] redis_key :code attribute :code, String validates(:code, presence: true) end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/client_config.rb
# frozen_string_literal: true module SignIn class ClientConfig < ApplicationRecord attribute :access_token_duration, :interval attribute :refresh_token_duration, :interval has_many :config_certificates, as: :config, dependent: :destroy, inverse_of: :config, index_errors: true has_many :certs, throug...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/refresh_token.rb
# frozen_string_literal: true module SignIn class RefreshToken include ActiveModel::Validations attr_reader :user_uuid, :uuid, :session_handle, :parent_refresh_token_hash, :anti_csrf_token, :nonce, :version validates :user_uuid, :uuid, :session_handle, :anti_csrf_token, :nonce, :version, presence: true...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/user_code_map.rb
# frozen_string_literal: true module SignIn class UserCodeMap include ActiveModel::Validations attr_reader( :login_code, :type, :client_state, :client_config, :terms_code ) validates(:login_code, :type, :client_config, presence: true) def initialize(login_code:, ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/state_payload.rb
# frozen_string_literal: true module SignIn class StatePayload include ActiveModel::Validations attr_reader( :acr, :client_id, :type, :code_challenge, :client_state, :code, :scope, :created_at ) validates :code, :created_at, presence: true validat...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/terms_code_container.rb
# frozen_string_literal: true module SignIn class TermsCodeContainer < Common::RedisStore redis_store REDIS_CONFIG[:sign_in_terms_code_container][:namespace] redis_ttl REDIS_CONFIG[:sign_in_terms_code_container][:each_ttl] redis_key :code attribute :code, String attribute :user_account_uuid, Str...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/validated_credential.rb
# frozen_string_literal: true module SignIn class ValidatedCredential include ActiveModel::Validations attr_reader( :user_verification, :credential_email, :client_config, :user_attributes, :device_sso, :web_sso_session_id ) validates( :user_verification, ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/service_account_config.rb
# frozen_string_literal: true module SignIn class ServiceAccountConfig < ApplicationRecord attribute :access_token_duration, :interval has_many :config_certificates, as: :config, dependent: :destroy, inverse_of: :config, index_errors: true has_many :certs, through: :config_certificates, source: :cert, i...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/certificate.rb
# frozen_string_literal: true module SignIn class Certificate < ApplicationRecord self.table_name = 'sign_in_certificates' EXPIRING_WINDOW = 60.days has_many :config_certificates, dependent: :destroy has_many :client_configs, through: :config_certificates, source: :config, source_type: 'ClientConfi...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/service_account_access_token.rb
# frozen_string_literal: true module SignIn class ServiceAccountAccessToken include ActiveModel::Validations attr_reader( :uuid, :service_account_id, :audience, :scopes, :user_attributes, :user_identifier, :version, :expiration_time, :created_time ) ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/session_container.rb
# frozen_string_literal: true module SignIn class SessionContainer include ActiveModel::Validations attr_reader( :session, :refresh_token, :access_token, :anti_csrf_token, :client_config, :device_secret, :web_sso_client ) validates( :session, :r...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/sign_in/access_token.rb
# frozen_string_literal: true module SignIn class AccessToken include ActiveModel::Validations attr_reader( :uuid, :session_handle, :client_id, :user_uuid, :audience, :refresh_token_hash, :anti_csrf_token, :last_regeneration_time, :parent_refresh_token_h...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/chatbot/code_container.rb
# frozen_string_literal: true module Chatbot class CodeContainer < Common::RedisStore redis_store REDIS_CONFIG[:chatbot_code_container][:namespace] redis_ttl REDIS_CONFIG[:chatbot_code_container][:each_ttl] redis_key :code attribute :icn, String attribute :code, String validates(:icn, :code...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs/submission.rb
# frozen_string_literal: true class BGS::Submission < Submission self.table_name = 'bgs_submissions' include SubmissionEncryption has_many :submission_attempts, class_name: 'BGS::SubmissionAttempt', dependent: :destroy, foreign_key: :bgs_submission_id, inverse_of: :submission ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/bgs/submission_attempt.rb
# frozen_string_literal: true class BGS::SubmissionAttempt < SubmissionAttempt self.table_name = 'bgs_submission_attempts' include SubmissionAttemptEncryption belongs_to :submission, class_name: 'BGS::Submission', foreign_key: :bgs_submission_id, inverse_of: :submission_attempts has...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/async_transaction/base.rb
# frozen_string_literal: true require 'json_marshal/marshaller' module AsyncTransaction class Base < ApplicationRecord self.table_name = 'async_transactions' REQUESTED = 'requested' COMPLETED = 'completed' DELETE_COMPLETED_AFTER = 1.month scope :stale, lambda { where('created_at < ?', DE...
0
code_files/vets-api-private/app/models/async_transaction
code_files/vets-api-private/app/models/async_transaction/va_profile/base.rb
# frozen_string_literal: true module AsyncTransaction module VAProfile class Base < AsyncTransaction::Base FINAL_STATUSES = %w[ REJECTED COMPLETED_SUCCESS COMPLETED_NO_CHANGES_DETECTED COMPLETED_FAILURE ].freeze REQUESTED = 'requested' COMPLETED = 'complete...
0
code_files/vets-api-private/app/models/async_transaction
code_files/vets-api-private/app/models/async_transaction/va_profile/address_transaction.rb
# frozen_string_literal: true module AsyncTransaction module VAProfile class AddressTransaction < AsyncTransaction::VAProfile::Base; end end end
0
code_files/vets-api-private/app/models/async_transaction
code_files/vets-api-private/app/models/async_transaction/va_profile/telephone_transaction.rb
# frozen_string_literal: true module AsyncTransaction module VAProfile class TelephoneTransaction < AsyncTransaction::VAProfile::Base; end end end
0
code_files/vets-api-private/app/models/async_transaction
code_files/vets-api-private/app/models/async_transaction/va_profile/initialize_person_transaction.rb
# frozen_string_literal: true module AsyncTransaction module VAProfile class InitializePersonTransaction < AsyncTransaction::VAProfile::Base; end end end
0
code_files/vets-api-private/app/models/async_transaction
code_files/vets-api-private/app/models/async_transaction/va_profile/permission_transaction.rb
# frozen_string_literal: true module AsyncTransaction module VAProfile class PermissionTransaction < AsyncTransaction::VAProfile::Base; end end end
0
code_files/vets-api-private/app/models/async_transaction
code_files/vets-api-private/app/models/async_transaction/va_profile/email_transaction.rb
# frozen_string_literal: true module AsyncTransaction module VAProfile class EmailTransaction < AsyncTransaction::VAProfile::Base; end end end
0
code_files/vets-api-private/app/models/veteran_enrollment_system
code_files/vets-api-private/app/models/veteran_enrollment_system/form1095_b/form1095_b.rb
# frozen_string_literal: true require 'common/models/resource' module VeteranEnrollmentSystem module Form1095B class Form1095B include Vets::Model attribute :first_name, String attribute :middle_name, String attribute :last_name, String attribute :last_4_ssn, String attribut...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/base.rb
# frozen_string_literal: true require 'vets/model' # Parent class for other Preneeds Burial form related models # Should not be initialized directly # module Preneeds class Base include Vets::Model # Override `as_json` # # @param options [Hash] # # @see ActiveModel::Serializers::JSON # ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/claimant.rb
# frozen_string_literal: true module Preneeds # Models an Claimant from a {Preneeds::BurialForm} form # # @!attribute date_of_birth # @return [String] claimant date of birth # @!attribute desired_cemetery # @return [String] cemetery number # @!attribute email # @return [String] claimant email #...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/veteran.rb
# frozen_string_literal: true module Preneeds # Models a veteran from a {Preneeds::BurialForm} form # # @!attribute date_of_birth # @return [String] veteran's date of birth # @!attribute date_of_death # @return [String] veteran's date of death # @!attribute gender # @return [String] veteran's gen...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/preneed_attachment.rb
# frozen_string_literal: true module Preneeds # Models the actual attachments uploaded for a {Preneeds::BurialForm} form # class PreneedAttachment < FormAttachment # Set for parent class to use appropriate uploader # ATTACHMENT_UPLOADER_CLASS = PreneedAttachmentUploader end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/date_range.rb
# frozen_string_literal: true module Preneeds # Models a date range from a {Preneeds::BurialForm} form # # @!attribute from # @return [String] 'from' date # @!attribute to # @return [String] 'to' date # class DateRange < Preneeds::Base attribute :from, String attribute :to, String # (s...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/attachment_type.rb
# frozen_string_literal: true require 'vets/model' module Preneeds # Models an attachment type from the EOAS service. # For use within the {Preneeds::BurialForm} form. # # @!attribute attachment_type_id # @return [Integer] attachment type id # @!attribute description # @return [String] attachment ty...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/attachment.rb
# frozen_string_literal: true module Preneeds # Models a {Preneeds::BurialForm} form attachment # # @!attribute attachment_type # @return [Preneeds::AttachmentType] {Preneeds::AttachmentType} object # @!attribute sending_source # @return [String] sending source; currently hard coded # @!attribute fil...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/preneed_attachment_hash.rb
# frozen_string_literal: true module Preneeds # Models a {Preneeds::BurialForm} form attachment. # This is the data about the actual attachment, {Preneeds::Attachment}. # # @!attribute confirmation_code # @return [String] guid of uploaded attachment # @!attribute attachment_id # @return [String] atta...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/preneed_submission.rb
# frozen_string_literal: true module Preneeds # A record to track a {Preneeds::BurialForm} form submission. # # @!attribute id # @return [Integer] auto-increment primary key. # @!attribute tracking_number # @return (see Preneeds::ReceiveApplication#tracking_number) # @!attribute application_uuid # ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/race.rb
# frozen_string_literal: true module Preneeds class Race < Preneeds::Base ATTRIBUTE_MAPPING = { 'I' => :is_american_indian_or_alaskan_native, 'A' => :is_asian, 'B' => :is_black_or_african_american, 'H' => :is_spanish_hispanic_latino, 'U' => :not_spanish_hispanic_latino, 'P' =>...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/cemetery.rb
# frozen_string_literal: true require 'vets/model' module Preneeds # Models a cemetery from the EOAS service. # For use within the {Preneeds::BurialForm} form. # # @!attribute cemetery_type # @return [String] cemetery type; one of 'N', 'S', 'I', 'A', 'M' # @!attribute name # @return [String] name of...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/full_name.rb
# frozen_string_literal: true module Preneeds # Models a full name for persons included in a {Preneeds::BurialForm} form # # @!attribute first # @return [String] first name # @!attribute last # @return [String] last name # @!attribute maiden # @return [String] maiden name # @!attribute middle ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/currently_buried_person.rb
# frozen_string_literal: true module Preneeds # Models a currently buried person under a veteran's benefit from a {Preneeds::BurialForm} form # # @!attribute cemetery_number # @return [String] cemetery number # @!attribute name # @return [Preneeds::FullName] currently buried person's full name # cl...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/military_rank_input.rb
# frozen_string_literal: true require 'vets/model' module Preneeds # Models the input needed to query {Preneeds::Service#get_military_rank_for_branch_of_service} # For use within the {Preneeds::BurialForm} form. # # @!attribute branch_of_service # @return [String] branch of service abbreviated code # @!...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/receive_application.rb
# frozen_string_literal: true require 'vets/model' module Preneeds # Objects used to model pertinent data about a submitted {Preneeds::BurialForm} form. # # @!attribute tracking_number # @return (see Preneeds::BurialForm#tracking_number) # @!attribute return_code # @return [Integer] submission's retur...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/service_record.rb
# frozen_string_literal: true module Preneeds # Models service record information for a {Preneeds::BurialForm} form # # @!attribute service_branch # @return (see Preneeds::BranchesOfService#code) # @!attribute discharge_type # @return (see Preneeds::DischargeType#id) # @!attribute highest_rank # ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/address.rb
# frozen_string_literal: true module Preneeds # Models an address from a {Preneeds::BurialForm} form # # @!attribute street # @return [String] address line 1 # @!attribute street2 # @return [String] address line 2 # @!attribute city # @return [String] address city # @!attribute country # @r...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/applicant.rb
# frozen_string_literal: true module Preneeds # Models an Applicant from a {Preneeds::BurialForm} form # # @!attribute applicant_email # @return [String] applicant's email # @!attribute applicant_phone_number # @return [String] applicant's phone number # @!attribute applicant_relationship_to_claimant...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/preneeds/burial_form.rb
# frozen_string_literal: true require 'vets/model' # Preneeds namespace # module Preneeds # Models a Preneeds Burial form. This class (and associationed classes) is used to store form details and to # generate the XML request for submission to the EOAS service # # @!attribute application_status # @return ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/saved_claim/disability_compensation.rb
# frozen_string_literal: true require 'evss/disability_compensation_form/data_translation_all_claim' require 'evss/disability_compensation_form/form4142' require 'evss/disability_compensation_form/form0781' require 'evss/disability_compensation_form/form8940' require 'bgs/disability_compensation_form_flashes' class S...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/saved_claim/caregivers_assistance_claim.rb
# frozen_string_literal: true require 'pdf_fill/filler' class SavedClaim::CaregiversAssistanceClaim < SavedClaim FORM = '10-10CG' has_one :submission, class_name: 'Form1010cg::Submission', foreign_key: 'claim_guid', primary_key: 'guid', inverse_of: :claim, depend...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/saved_claim/coe_claim.rb
# frozen_string_literal: true class SavedClaim::CoeClaim < SavedClaim FORM = '26-1880' def send_to_lgy(edipi:, icn:) @edipi = edipi @icn = icn # If the EDIPI is blank, throw an error if @edipi.blank? Rails.logger.error('COE application cannot be submitted without an edipi!') # Otherwise...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/saved_claim/notice_of_disagreement.rb
# frozen_string_literal: true class SavedClaim::NoticeOfDisagreement < SavedClaim has_one :appeal_submission, class_name: 'AppealSubmission', foreign_key: :submitted_appeal_uuid, primary_key: :guid, dependent: nil, inverse_of: :saved_claim_nod, required: false FORM = '10182' def f...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/saved_claim/education_career_counseling_claim.rb
# frozen_string_literal: true require 'vets/shared_logging' class SavedClaim::EducationCareerCounselingClaim < CentralMailClaim include Vets::SharedLogging FORM = '28-8832' def regional_office [] end def send_to_benefits_intake! form_copy = parsed_form if form_copy['veteranSocialSecurityNumbe...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/saved_claim/form214192.rb
# frozen_string_literal: true class SavedClaim::Form214192 < SavedClaim FORM = '21-4192' DEFAULT_ZIP_CODE = '00000' validates :form, presence: true def form_schema schema = JSON.parse(Openapi::Requests::Form214192::FORM_SCHEMA.to_json) schema['components'] = JSON.parse(Openapi::Components::ALL.to_jso...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/saved_claim/dependency_claim.rb
# frozen_string_literal: true require 'claims_api/vbms_uploader' require 'pdf_utilities/datestamp_pdf' require 'dependents/monitor' require 'dependents/notification_email' class SavedClaim::DependencyClaim < CentralMailClaim FORM = '686C-674' STUDENT_ATTENDING_COLLEGE_KEYS = %w[ student_information studen...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/saved_claim/dependency_verification_claim.rb
# frozen_string_literal: true class SavedClaim::DependencyVerificationClaim < CentralMailClaim FORM = '21-0538' def regional_office [] end def send_to_central_mail! form_copy = parsed_form form_copy['veteranSocialSecurityNumber'] = parsed_form.dig('dependencyVerification', 'veteranInformation', ...