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/models
code_files/vets-api-private/app/models/form_profiles/va_10215.rb
# frozen_string_literal: true class FormProfiles::VA10215 < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/applicant/information' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_2122a.rb
# frozen_string_literal: true require 'vets/model' module VA2122a class IdentityValidation include Vets::Model attribute :has_icn, Bool attribute :has_participant_id, Bool attribute :is_loa3, Bool end end class FormProfiles::VA2122a < FormProfile attribute :identity_validation, VA2122a::Identi...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_210966.rb
# frozen_string_literal: true class FormProfiles::VA210966 < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/personal-information-1' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_21p0537.rb
# frozen_string_literal: true class FormProfiles::VA21p0537 < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/name' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_686c674.rb
# frozen_string_literal: true require 'vets/model' class FormProfiles::VA686c674 < FormProfile class FormAddress include Vets::Model attribute :country_name, String attribute :address_line1, String attribute :address_line2, String attribute :address_line3, String attribute :city, String ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_21p601.rb
# frozen_string_literal: true class FormProfiles::VA21p601 < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/personal-information' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_2122.rb
# frozen_string_literal: true require 'vets/model' module VA2122 class IdentityValidation include Vets::Model attribute :has_icn, Bool attribute :has_participant_id, Bool attribute :is_loa3, Bool end end class FormProfiles::VA2122 < FormProfile attribute :identity_validation, VA2122::IdentityV...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_264555.rb
# frozen_string_literal: true class FormProfiles::VA264555 < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/personal-information-1' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/dispute_debt.rb
# frozen_string_literal: true class FormProfiles::DisputeDebt < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/personal-information' } end private def va_file_number_last_four return unless user.authorize :debt, :access? file_number = begin ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_288832.rb
# frozen_string_literal: true class FormProfiles::VA288832 < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/claimant-information' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/vha_10_10d.rb
# frozen_string_literal: true class FormProfiles::VHA1010d < FormProfile FORM_ID = '10-10D' def metadata { version: 0, prefill: true, returnUrl: '/signer-type' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/va_4010007.rb
# frozen_string_literal: true class FormProfiles::VA4010007 < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/applicant-information' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/form_profiles/form_mock_ae_design_patterns.rb
# frozen_string_literal: true class FormProfiles::FormMockAeDesignPatterns < FormProfile def metadata { version: 0, prefill: true, returnUrl: '/veteran-details' } end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/lighthouse/submission.rb
# frozen_string_literal: true class Lighthouse::Submission < Submission self.table_name = 'lighthouse_submissions' include SubmissionEncryption has_many :submission_attempts, class_name: 'Lighthouse::SubmissionAttempt', dependent: :destroy, foreign_key: :lighthouse_submission_i...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/lighthouse/submission_attempt.rb
# frozen_string_literal: true class Lighthouse::SubmissionAttempt < SubmissionAttempt self.table_name = 'lighthouse_submission_attempts' include SubmissionAttemptEncryption belongs_to :submission, class_name: 'Lighthouse::Submission', foreign_key: :lighthouse_submission_id, inverse_of...
0
code_files/vets-api-private/app/models/lighthouse
code_files/vets-api-private/app/models/lighthouse/hcc/invoice.rb
# frozen_string_literal: true module Lighthouse module HCC class Invoice include Vets::Model attribute :external_id, String attribute :facility, String attribute :latest_billing_ref, String attribute :current_balance, Float attribute :previous_balance, String attribute :...
0
code_files/vets-api-private/app/models/lighthouse
code_files/vets-api-private/app/models/lighthouse/hcc/copay_detail.rb
# frozen_string_literal: true module Lighthouse module HCC class CopayDetail include Vets::Model PAYMENT_DUE_DAYS = 30 attribute :external_id, String attribute :facility, String attribute :bill_number, String attribute :status, String attribute :status_description, Str...
0
code_files/vets-api-private/app/models/lighthouse
code_files/vets-api-private/app/models/lighthouse/hcc/bundle.rb
# frozen_string_literal: true module Lighthouse module HCC class Bundle include Vets::Model attribute :entries, Array attribute :links, Hash attribute :meta, Hash attribute :total, Integer attribute :page, Integer attribute :per_page, Integer def i...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/redis_form.rb
# frozen_string_literal: true module RedisForm extend ActiveSupport::Concern included do |base| # i tried to make this module a class but it didn't work because of how RedisStore was defined raise 'must be a subclass of Common::RedisStore' unless base < Common::RedisStore include SetGuid include ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/set_guid.rb
# frozen_string_literal: true module SetGuid extend ActiveSupport::Concern included do after_initialize do self.guid ||= SecureRandom.uuid end end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/temp_form_validation.rb
# frozen_string_literal: true module TempFormValidation extend ActiveSupport::Concern included do attr_accessor(:form) validates(:form, presence: true, on: :create) validate(:form_matches_schema, on: :create) end def parsed_form @parsed_form ||= JSON.parse(form) end private def form_...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/async_request.rb
# frozen_string_literal: true module AsyncRequest extend ActiveSupport::Concern include ActiveModel::Validations::Callbacks included do validates(:state, presence: true, inclusion: %w[success failed pending]) validates(:response, presence: true, if: :success?) end def success? state == 'success...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/authorization.rb
# frozen_string_literal: true module Authorization extend ActiveSupport::Concern def authorize(policy, method) Pundit.policy!(self, policy).send(method) end end
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/form526_mpi_concern.rb
# frozen_string_literal: true module Form526MPIConcern extend ActiveSupport::Concern def mpi_service @mpi_service ||= MPI::Service.new end def get_icn_from_mpi edipi_response_profile = edipi_mpi_profile_query(auth_headers['va_eauth_dodedipnid']) if edipi_response_profile&.icn.present? OpenS...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/redis_caching.rb
# frozen_string_literal: true module RedisCaching extend ActiveSupport::Concern class_methods do def redis_config(config) @redis_namespace = config[:namespace] @redis_ttl = config[:each_ttl] @redis = Redis::Namespace.new(@redis_namespace, redis: $redis) end def get_cached(key) ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/form526_claim_fast_tracking_concern.rb
# frozen_string_literal: true require 'mail_automation/client' require 'lighthouse/veterans_health/client' require 'contention_classification/client' # rubocop:disable Metrics/ModuleLength # For use with Form526Submission module Form526ClaimFastTrackingConcern extend ActiveSupport::Concern RRD_STATSD_KEY_PREFIX ...
0
code_files/vets-api-private/app/models
code_files/vets-api-private/app/models/concerns/kms_encrypted_model_patch.rb
# frozen_string_literal: true module KmsEncryptedModelPatch extend self # Update #kms_key_rotation_date method if rotation date changes from 10/12 def has_kms_key(**args) # implicitly calls #has_kms_key with specified options, so that we don't need to require it # of future encrypted models super(*...
0
code_files/vets-api-private/app/openapi
code_files/vets-api-private/app/openapi/openapi/components.rb
# frozen_string_literal: true module Openapi module Components ALL = { schemas: { Errors: Openapi::Components::Errors::ERRORS, Error: Openapi::Components::Errors::ERROR, FirstMiddleLastName: Openapi::Components::Name::FIRST_MIDDLE_LAST, SimpleAddress: Openapi::Components::Ad...
0
code_files/vets-api-private/app/openapi/openapi
code_files/vets-api-private/app/openapi/openapi/responses/benefits_intake_submission_response.rb
# frozen_string_literal: true module Openapi module Responses class BenefitsIntakeSubmissionResponse # Valid response from Benefits Intake API (called via Lighthouse::SubmitBenefitsIntakeClaim) BENEFITS_INTAKE_SUBMISSION_RESPONSE = { type: :object, properties: { data: { ...
0
code_files/vets-api-private/app/openapi/openapi
code_files/vets-api-private/app/openapi/openapi/requests/form214192.rb
# frozen_string_literal: true module Openapi module Requests class Form214192 FORM_SCHEMA = { '$schema': 'json-schemer://openapi30/schema', type: :object, properties: { veteranInformation: { type: :object, required: %i[fullName dateOfBirth], ...
0
code_files/vets-api-private/app/openapi/openapi
code_files/vets-api-private/app/openapi/openapi/requests/form21p530a.rb
# frozen_string_literal: true module Openapi module Requests class Form21p530a FORM_SCHEMA = { '$schema': 'json-schemer://openapi30/schema', type: :object, properties: { veteranInformation: { type: :object, required: %i[fullName dateOfBirth dateOfDe...
0
code_files/vets-api-private/app/openapi/openapi
code_files/vets-api-private/app/openapi/openapi/components/errors.rb
# frozen_string_literal: true module Openapi module Components class Errors ERRORS = { required: ['errors'], properties: { errors: { type: 'array', items: { :$ref => '#/components/schemas/Error' } } } }.freeze ERROR = { required: %w[title detail code status], proper...
0
code_files/vets-api-private/app/openapi/openapi
code_files/vets-api-private/app/openapi/openapi/components/name.rb
# frozen_string_literal: true module Openapi module Components class Name FIRST_MIDDLE_LAST = { type: 'object', required: %w[first last], properties: { first: { type: 'string', example: 'John', maxLength: 12 }, middle: { type: 'string', example: 'A', maxL...
0
code_files/vets-api-private/app/openapi/openapi
code_files/vets-api-private/app/openapi/openapi/components/address.rb
# frozen_string_literal: true module Openapi module Components class Address SIMPLE_ADDRESS = { type: 'object', required: %w[street city state postalCode country], properties: { street: { type: 'string', example: '123 Main St', maxLength: 30 }, street2: {...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/demographics_policy.rb
# frozen_string_literal: true DemographicsPolicy = Struct.new(:user, :gender_identity) do def access? user&.idme_uuid.present? || user&.logingov_uuid.present? end def access_update? user&.idme_uuid.present? || user&.logingov_uuid.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/mhv_messaging_policy.rb
# frozen_string_literal: true require 'sm/client' MHVMessagingPolicy = Struct.new(:user, :mhv_messaging) do def access? return false unless user.mhv_correlation_id return false if Flipper.enabled?(:mhv_secure_messaging_policy_va_patient) && !user.va_patient? client = SM::Client.new(session: { user_id: ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/mpi_policy.rb
# frozen_string_literal: true MPIPolicy = Struct.new(:user, :mvi) do def access_add_person_proxy? user.icn.present? && user.edipi.present? && user.ssn.present? && (user.birls_id.blank? || user.participant_id.blank?) end def queryable? user.icn.present? || required_attrs_present?(user) end pri...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/coe_policy.rb
# frozen_string_literal: true CoePolicy = Struct.new(:user, :coe) do def access? user.loa3? && user.edipi.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/mhv_medical_records_policy.rb
# frozen_string_literal: true MHVMedicalRecordsPolicy = Struct.new(:user, :mhv_medical_records) do MR_ACCOUNT_TYPES = %w[Premium].freeze def access? if Flipper.enabled?(:mhv_medical_records_new_eligibility_check) user.loa3? && mhv_user_account&.patient else MR_ACCOUNT_TYPES.include?(user.mhv_a...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/medical_copays_policy.rb
# frozen_string_literal: true MedicalCopaysPolicy = Struct.new(:user, :medical_copays) do ## # Determines if the authenticated user has # access to the Medical Copays feature # # @return [Boolean] # def access? accessible = user.edipi.present? && user.icn.present? StatsD.increment("api.mcp.policy...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/hca_disability_rating_policy.rb
# frozen_string_literal: true HCADisabilityRatingPolicy = Struct.new(:user, :hca_disability_rating) do def access? user.loa3? && user.ssn.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/power_of_attorney_policy.rb
# frozen_string_literal: true PowerOfAttorneyPolicy = Struct.new(:user, :power_of_attorney) do def access? user.loa3? && user.icn.present? && user.participant_id.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/bgs_policy.rb
# frozen_string_literal: true BGSPolicy = Struct.new(:user, :bgs) do def access?(log_stats: true) accessible = user.icn.present? && user.ssn.present? && user.participant_id.present? increment_statsd(accessible) if user.loa3? && log_stats accessible end def increment_statsd(accessible) if accessi...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/form1095_policy.rb
# frozen_string_literal: true Form1095Policy = Struct.new(:user, :form1095) do def access? user.present? && user.loa3? && user.icn.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/appeals_policy.rb
# frozen_string_literal: true AppealsPolicy = Struct.new(:user, :appeals) do def access? user.loa3? && user.ssn.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/mhv_prescriptions_policy.rb
# frozen_string_literal: true require 'rx/client' MHVPrescriptionsPolicy = Struct.new(:user, :mhv_prescriptions) do RX_ACCESS_LOG_MESSAGE = 'RX ACCESS DENIED' def access? return true if user.loa3? && (mhv_user_account&.patient || mhv_user_account&.champ_va) log_access_denied(RX_ACCESS_LOG_MESSAGE) f...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/vye_policy.rb
# frozen_string_literal: true VyePolicy = Struct.new(:user, :user_info) do def access? user.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/vet360_policy.rb
# frozen_string_literal: true Vet360Policy = Struct.new(:user, :vet360) do def access? user.vet360_id.present? end def military_access? user.edipi.present? end def profile_access? user.icn.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/debt_letters_policy.rb
# frozen_string_literal: true DebtLettersPolicy = Struct.new(:user, :debt_letters) do def access? Flipper.enabled?(:debt_letters_show_letters_vbms, user) end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/mhv_user_account_policy.rb
# frozen_string_literal: true class MHVUserAccountPolicy attr_reader :user def initialize(user, _record) @user = user end def show? user.present? && user.can_create_mhv_account? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/enrollment_periods_policy.rb
# frozen_string_literal: true EnrollmentPeriodsPolicy = Struct.new(:user, :enrollment_periods) do def access? user.present? && user.loa3? && user.icn.present? end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/lighthouse_policy.rb
# frozen_string_literal: true LighthousePolicy = Struct.new(:user, :lighthouse) do def access? user.icn.present? && user.participant_id.present? end def direct_deposit_access? user.loa3? && allowed_providers.include?(user.identity.sign_in[:service_name]) && user.icn.present? && user.particip...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/dgi_policy.rb
# frozen_string_literal: true DGIPolicy = Struct.new(:user, :dgi) do def access? accessible = user.icn.present? && user.ssn.present? && user.loa3? increment_statsd(accessible) accessible end def increment_statsd(accessible) if accessible StatsD.increment('api.dgi.policy.success') else ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/debt_policy.rb
# frozen_string_literal: true DebtPolicy = Struct.new(:user, :debt) do def access? accessible = user.icn.present? && user.ssn.present? && user.loa3? increment_statsd(accessible) accessible end def increment_statsd(accessible) if accessible StatsD.increment('api.debt.policy.success') e...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/meb_policy.rb
# frozen_string_literal: true MebPolicy = Struct.new(:user, :my_education_benefits) do def access? accessible = user.icn.present? && user.ssn.present? && user.loa3? increment_statsd(accessible) accessible end def increment_statsd(accessible) if accessible StatsD.increment('api.my_education...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/communication_preferences_policy.rb
# frozen_string_literal: true CommunicationPreferencesPolicy = Struct.new(:user, :communication_preferences) do def access? Flipper.enabled?(:communication_preferences, user) end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/mhv_health_records_policy.rb
# frozen_string_literal: true MHVHealthRecordsPolicy = Struct.new(:user, :mhv_health_records) do BB_ACCOUNT_TYPES = %w[Premium Advanced Basic].freeze def access? BB_ACCOUNT_TYPES.include?(user.mhv_account_type) end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/evss_policy.rb
# frozen_string_literal: true EVSSPolicy = Struct.new(:user, :evss) do def access? if user.edipi.present? && user.ssn.present? && user.participant_id.present? log_success('access') else log_failure('access') end end def access_letters? if user.edipi.present? && user.ssn.present? && u...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/policies/va_profile_policy.rb
# frozen_string_literal: true VAProfilePolicy = Struct.new(:user, :va_profile) do def access? user.edipi.present? end def access_to_v2? user.icn.present? end end
0
code_files/vets-api-private/app/policies
code_files/vets-api-private/app/policies/sign_in/user_info_policy.rb
# frozen_string_literal: true module SignIn class UserInfoPolicy attr_reader :user, :record def initialize(user, record) @user = user @record = record end def show? user.present? && client_id.in?(IdentitySettings.sign_in.user_info_clients) end private def client_id ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/onsite_notification_serializer.rb
# frozen_string_literal: true class OnsiteNotificationSerializer include JSONAPI::Serializer attributes :template_id, :va_profile_id, :dismissed, :created_at, :updated_at end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/search_serializer.rb
# frozen_string_literal: true class SearchSerializer include JSONAPI::Serializer set_id { '' } attribute :body end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/dependents_verifications_serializer.rb
# frozen_string_literal: true class DependentsVerificationsSerializer include JSONAPI::Serializer set_id { '' } set_type :dependency_decs attribute :dependency_verifications attribute :dependency_verifications do |object| dependency_decs = object[:dependency_decs] ensured_array = dependency_decs.i...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/separation_location_serializer.rb
# frozen_string_literal: true class SeparationLocationSerializer def initialize(resource) @resource = resource end def to_json(*) Oj.dump(serializable_hash, mode: :compat, time_format: :ruby) end def serializable_hash { status: @resource.status, separation_locations: @resource.separ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/lighthouse_rating_info_serializer.rb
# frozen_string_literal: true class LighthouseRatingInfoSerializer include JSONAPI::Serializer set_id { '' } attribute :user_percent_of_disability do |object| attr = :user_percent_of_disability object.respond_to?(attr) ? object.send(attr) : object[attr] end attribute :source_system do |_| 'Lig...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/rated_disabilities_serializer.rb
# frozen_string_literal: true class RatedDisabilitiesSerializer include JSONAPI::Serializer set_id { '' } attribute :rated_disabilities end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/user_serializer.rb
# frozen_string_literal: true require 'backend_services' require 'common/client/concerns/service_status' class UserSerializer include JSONAPI::Serializer include Common::Client::Concerns::ServiceStatus set_id { '' } attributes :services, :user_account, :profile, :va_profile, :veteran_status, :i...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/persistent_attachment_va_form_serializer.rb
# frozen_string_literal: true class PersistentAttachmentVAFormSerializer include JSONAPI::Serializer attribute :confirmation_code, &:guid attribute :name, &:original_filename attribute :size attribute :warnings end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/supporting_evidence_attachment_serializer.rb
# frozen_string_literal: true class SupportingEvidenceAttachmentSerializer include JSONAPI::Serializer set_type :supporting_evidence_attachments attribute :guid end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/full_name_serializer.rb
# frozen_string_literal: true class FullNameSerializer include JSONAPI::Serializer set_id { '' } attribute :first do |object| object[:first] end attribute :middle do |object| object[:middle] end attribute :last do |object| object[:last] end attribute :suffix do |object| object[:s...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/benefits_intake_submission_serializer.rb
# frozen_string_literal: true class BenefitsIntakeSubmissionSerializer include JSONAPI::Serializer attribute :state end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/in_progress_form_serializer.rb
# frozen_string_literal: true class InProgressFormSerializer include JSONAPI::Serializer set_id { '' } set_type :in_progress_forms # ensures that the attribute keys are camelCase, whether or not the Inflection header is sent # NOTE: camelCasing all keys (deep transform) is *not* the goal. (see the InProgre...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/mhv_user_account_serializer.rb
# frozen_string_literal: true class MHVUserAccountSerializer include JSONAPI::Serializer set_id(&:user_profile_id) attributes :user_profile_id, :premium, :champ_va, :patient, :sm_account_created, :message end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/eligible_data_classes_serializer.rb
# frozen_string_literal: true require 'digest' class EligibleDataClassesSerializer include JSONAPI::Serializer set_id { '' } set_type 'eligible_data_classes' attribute :data_classes do |object| object.map(&:name) end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/user_action_serializer.rb
# frozen_string_literal: true class UserActionSerializer include JSONAPI::Serializer attribute :user_action_event_id, :status, :subject_user_verification_id, :acting_ip_address, :acting_user_agent, :created_at, :updated_at, :acting_user_verification_id belongs_to :user_action_event end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/backend_statuses_serializer.rb
# frozen_string_literal: true class BackendStatusesSerializer include JSONAPI::Serializer set_id { '' } attributes :reported_at, :statuses, :maintenance_windows attribute :maintenance_windows do |_object, params| maintenance_windows = params[:maintenance_windows] if maintenance_windows seriali...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/extract_status_serializer.rb
# frozen_string_literal: true class ExtractStatusSerializer include JSONAPI::Serializer set_type :extract_statuses attributes :extract_type, :last_updated, :status, :created_on, :station_number end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/scheduling_preferences_serializer.rb
# frozen_string_literal: true class SchedulingPreferencesSerializer include JSONAPI::Serializer set_id { '' } set_type :scheduling_preferences attribute :preferences do |object| object[:preferences] end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/personal_information_serializer.rb
# frozen_string_literal: true class PersonalInformationSerializer include JSONAPI::Serializer set_id { '' } attribute :gender do |object| object.demographics&.gender end # Returns the veteran's birth date. Object is an instance # of the MPI::Models::MviProfile class. # # @return [String] For ex...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/evss_claim_detail_serializer.rb
# frozen_string_literal: true class EVSSClaimDetailSerializer include JSONAPI::Serializer extend EVSSClaimTimelineHelper extend EVSSClaimBaseHelper # Our IDs are not stable due to 24 hour expiration, use EVSS IDs for consistency # This can be removed if our IDs become stable set_id :evss_id set_type :ev...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/preneed_attachment_serializer.rb
# frozen_string_literal: true class PreneedAttachmentSerializer include JSONAPI::Serializer set_type :preneeds_preneed_attachments attribute :guid end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/contact_serializer.rb
# frozen_string_literal: true class ContactSerializer include JSONAPI::Serializer set_id :contact_type set_type :contact attributes :contact_type, :given_name, :middle_name, :family_name, :relationship, :address_line1, :address_line2, :address_line3, :city, :state, :zip_code, :primary_phone end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/form526_job_status_serializer.rb
# frozen_string_literal: true class Form526JobStatusSerializer include JSONAPI::Serializer set_id { '' } set_type :form526_job_statuses attribute :claim_id do |object| object.submission.submitted_claim_id end attributes :job_id attribute :submission_id do |object| object.submission.id end ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/health_care_application_serializer.rb
# frozen_string_literal: true class HealthCareApplicationSerializer include JSONAPI::Serializer set_type :health_care_applications attributes :state, :form_submission_id, :timestamp end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/gender_identity_serializer.rb
# frozen_string_literal: true class GenderIdentitySerializer include JSONAPI::Serializer set_id { '' } attribute :gender_identity end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/valid_va_file_number_serializer.rb
# frozen_string_literal: true class ValidVAFileNumberSerializer include JSONAPI::Serializer set_id { '' } set_type :valid_va_file_number attribute :valid_va_file_number do |object| # Settings default is false, override in local to a 'true' value to bypass object[:file_nbr] || Settings.valid_va_file_n...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/user_verification_serializer.rb
# frozen_string_literal: true class UserVerificationSerializer attr_reader :user_verification def initialize(user_verification:) @user_verification = user_verification end def perform serialize_response end private def serialize_response { type: user_verification.credential_type, ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/evss_claim_list_serializer.rb
# frozen_string_literal: true class EVSSClaimListSerializer include JSONAPI::Serializer extend EVSSClaimBaseHelper # Our IDs are not stable due to 24 hour expiration, use EVSS IDs for consistency # This can be removed if our IDs become stable set_id :evss_id set_type :evss_claims attribute :evss_id ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/hca_attachment_serializer.rb
# frozen_string_literal: true class HCAAttachmentSerializer include JSONAPI::Serializer set_type :hca_attachments attribute :guid end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/post911_gi_bill_status_serializer.rb
# frozen_string_literal: true class Post911GIBillStatusSerializer include JSONAPI::Serializer set_id { '' } attribute :first_name attribute :last_name attribute :name_suffix attribute :date_of_birth attribute :va_file_number attribute :regional_processing_office attribute :eligibility_date attribu...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/saved_claim_serializer.rb
# frozen_string_literal: true class SavedClaimSerializer include JSONAPI::Serializer set_type :saved_claims attributes :submitted_at, :regional_office, :confirmation_number, :guid attribute :form, &:form_id end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/form1010_ezr_attachment_serializer.rb
# frozen_string_literal: true class Form1010EzrAttachmentSerializer include JSONAPI::Serializer set_type :form1010_ezr_attachments attribute :guid end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/direct_deposits_serializer.rb
# frozen_string_literal: true class DirectDepositsSerializer include JSONAPI::Serializer set_id { '' } set_type 'direct_deposits' attributes :control_information, :payment_account, :veteran_status attribute :control_information do |object| object[:control_information] end attribute :payment_accou...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/hca_rating_info_serializer.rb
# frozen_string_literal: true class HCARatingInfoSerializer include JSONAPI::Serializer set_id { '' } attribute :user_percent_of_disability do |object| object[:user_percent_of_disability].to_i end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/evss_claim_timeline_helper.rb
# frozen_string_literal: true module EVSSClaimTimelineHelper def events_timeline(object) events = [ create_event_from_string_date(:filed, object.data['date']), create_event_from_string_date(:completed, object.data['claim_complete_date']) ] # Do the 8 phases (1..8).each do |n| date ...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/communication_groups_serializer.rb
# frozen_string_literal: true class CommunicationGroupsSerializer include JSONAPI::Serializer set_id { '' } set_type :hashes attribute :communication_groups do |object| object[:communication_groups] end end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/payment_history_serializer.rb
# frozen_string_literal: true class PaymentHistorySerializer include JSONAPI::Serializer set_id { '' } set_type :payment_history attribute :payments attribute :return_payments end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/education_stem_claim_status_serializer.rb
# frozen_string_literal: true class EducationStemClaimStatusSerializer include JSONAPI::Serializer attribute :confirmation_number attribute :is_enrolled_stem do |object| object.saved_claim.parsed_form['isEnrolledStem'] end attribute :is_pursuing_teaching_cert do |object| object.saved_claim.parsed_...
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/persistent_attachment_serializer.rb
# frozen_string_literal: true class PersistentAttachmentSerializer include JSONAPI::Serializer attribute :confirmation_code, &:guid attribute :name, &:original_filename attribute :size end
0
code_files/vets-api-private/app
code_files/vets-api-private/app/serializers/receive_application_serializer.rb
# frozen_string_literal: true class ReceiveApplicationSerializer include JSONAPI::Serializer set_id :receive_application_id set_type :preneeds_receive_applications attribute :receive_application_id attribute :tracking_number attribute :return_code attribute :application_uuid attribute :return_descrip...