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/modules/va_notify/app/services
code_files/vets-api-private/modules/va_notify/app/services/va_notify/find_in_progress_forms.rb
# frozen_string_literal: true module VANotify class FindInProgressForms RELEVANT_FORMS = %w[ 686C-674 1010ez 21-526EZ ].freeze def to_notify date_range = [ 7.days.ago.all_day ] InProgressForm.where(form_id: RELEVANT_FORMS).where(updated_at: date_range) ...
0
code_files/vets-api-private/modules/va_notify
code_files/vets-api-private/modules/va_notify/bin/rails
#!/usr/bin/env ruby # frozen_string_literal: true ENGINE_ROOT = File.expand_path('../..', __dir__) ENGINE_PATH = File.expand_path('../../lib/va_notify/engine', __dir__) # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __dir__) require 'bundler/setup' if File.exist?(ENV[...
0
code_files/vets-api-private/modules/va_notify
code_files/vets-api-private/modules/va_notify/config/routes.rb
# frozen_string_literal: true VaNotify::Engine.routes.draw do post '/callbacks', to: 'callbacks#create' end
0
code_files/vets-api-private/modules/va_notify
code_files/vets-api-private/modules/va_notify/spec/spec_helper.rb
# frozen_string_literal: true # Configure Rails Envinronment ENV['RAILS_ENV'] = 'test' require 'rspec/rails' RSpec.configure { |config| config.use_transactional_fixtures = true }
0
code_files/vets-api-private/modules/va_notify
code_files/vets-api-private/modules/va_notify/spec/rails_helper.rb
# frozen_string_literal: true require 'spec_helper' require 'support/factory_bot'
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/user_account_job_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' RSpec.describe VANotify::UserAccountJob, type: :worker do let(:user_account) { create(:user_account, icn:) } let(:icn) { '1013062086V794840' } let(:template_id) { 'template_id' } before do allow_any_instance_of(VaNotify::Conf...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/in_progress_1880_form_reminder_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' describe VANotify::InProgress1880FormReminder, type: :worker do let(:user) { create(:user) } let(:in_progress_form) { create(:in_progress_1880_form, user_uuid: user.uuid) } describe '#perform' do it 'skips sending if ICN is not ...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/email_job_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' RSpec.describe VANotify::EmailJob, type: :worker do let(:email) { 'user@example.com' } let(:template_id) { 'template_id' } before do allow_any_instance_of(VaNotify::Configuration).to receive(:base_path).and_return('http://fakea...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/in_progress_form_reminder_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' describe VANotify::InProgressFormReminder, type: :worker do let(:user) { create(:user) } let(:in_progress_form) { create(:in_progress_686c_form, user_uuid: user.uuid) } let(:in_progress_form_with_user_account_id) do create(:in_pr...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/one_time_in_progress_reminder_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' describe VANotify::OneTimeInProgressReminder, type: :worker do describe '#perform' do let(:user_account) { create(:user_account, icn:) } let(:icn) { 'icn_here' } let(:form_name) { 'some_form_name' } context 'sends remind...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/clear_stale_in_progress_reminders_sent_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' describe VANotify::ClearStaleInProgressRemindersSent, type: :worker do describe '#perform' do let(:user_account) { create(:user_account) } it 'clears in progress reminders sent after 60 days' do create_in_progress_reminder...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/delivery_status_update_job_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' require 'sidekiq/attr_package' require 'va_notify/default_callback' RSpec.describe VANotify::DeliveryStatusUpdateJob, type: :worker do let(:notification_id) { SecureRandom.uuid } let(:template_id) { SecureRandom.uuid } let(:attr_pack...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/in_progress_forms_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' describe VANotify::InProgressForms, type: :worker do describe '#perform' do it 'creates additional async workers to send messages to va notify' do in_progress_form_1 = create_in_progress_form_days_ago(7, user_uuid: create(:user...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/sidekiq/in_progress_1880_form_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' describe VANotify::InProgress1880Form, type: :worker do describe '#perform' do it 'creates additional async workers to send messages to va notify' do in_progress_form1 = create_in_progress_form_hours_ago(22, user_uuid: create(:...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/models/veteran_spec.rb
# frozen_string_literal: true require 'rails_helper' RSpec.describe VANotify::Veteran, type: :model do let(:user_account) { create(:user_account, icn:) } let(:icn) { nil } let(:in_progress_form) { create(:in_progress_686c_form, user_account:) } let(:subject) { VANotify::Veteran.new(in_progress_form) } desc...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/models/confirmation_email_spec.rb
# frozen_string_literal: true require 'rails_helper' RSpec.describe VANotify::ConfirmationEmail, type: :model do describe '.send' do it 'returns early if already sent' do allow(VANotify::EmailJob).to receive(:perform_async).and_return('email_notification') described_class.create(user_uuid_and_form_i...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/requests/callbacks_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/attr_package' require 'va_notify/default_callback' require 'va_notify/callback_signature_generator' RSpec.describe 'VANotify Callbacks', type: :request do let(:valid_token) { Settings.vanotify.status_callback.bearer_token } let(:invalid_token) ...
0
code_files/vets-api-private/modules/va_notify/spec/support
code_files/vets-api-private/modules/va_notify/spec/support/helpers/callback_class.rb
# frozen_string_literal: true module VANotify::OtherTeam class OtherForm def self.call(_notification) true end end end module VANotify::NonCompliantModule class NonCompliantClass def self.not_call(_notification) false end end end
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/factories/notifications.rb
# frozen_string_literal: true FactoryBot.define do factory :notification, class: 'VANotify::Notification' do notification_id { SecureRandom.uuid } reference { nil } to { 'email@email.com' } status { %w[temporary-failure permanent-failure technical-failure preferences-declined pending pending-vi...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/lib/client_spec.rb
# frozen_string_literal: true require 'rails_helper' RSpec.describe VaNotify::Client do let(:api_key) do 'test-key-550e8400-e29b-41d4-a716-446655440000-123e4567-e89b-12d3-a456-426614174000' end let(:callback_options) do { callback_klass: 'TestCallback', callback_metadata: { notification_type...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/lib/configuration_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'va_notify/configuration' describe VaNotify::Configuration do describe '#service_name' do it 'has the expected service name' do expect(described_class.instance.service_name).to eq('VANotify') end end end
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/lib/callback_signature_generator_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'va_notify/callback_signature_generator' describe VANotify::CallbackSignatureGenerator do describe '#call' do it 'creates a signature' do payload = { id: '123', reference: nil, to: 'test@example.com', status: 'del...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/lib/service_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'va_notify/service' describe VaNotify::Service do before(:example, test_service: false) do test_base_url = 'http://fakeapi.com' allow_any_instance_of(VaNotify::Configuration).to receive(:base_path).and_return(test_base_url) end let(:test_api_...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/lib/default_callback_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'va_notify/default_callback' describe VANotify::DefaultCallback do describe '#call' do let(:tags) do ['service:service-name', 'function:function description'] end context 'notification of error' do let(:notification_type) {...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/lib/in_progress_form_helper_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'va_notify/in_progress_form_helper' describe VANotify::InProgressFormHelper do describe '686c' do let(:in_progress_form) { create_in_progress_form_days_ago(49, form_id: '686C-674') } it 'knows the template id' do expect(described_class::TEM...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/services/in_progress_form_reminder_spec.rb
# frozen_string_literal: true require 'rails_helper' require 'sidekiq/testing' describe VANotify::InProgressFormReminder, type: :worker do let(:user) { create(:user) } let(:in_progress_form) do create(:in_progress_686c_form, user_uuid: user.uuid, user_account: create(:user_account)) end describe '#perfor...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/services/find_in_progress_forms_spec.rb
# frozen_string_literal: true require 'rails_helper' describe VANotify::FindInProgressForms do it 'verify form_ids are valid' do valid_form_ids = FormProfile::ALL_FORMS.values.flatten expect(valid_form_ids).to include(*described_class::RELEVANT_FORMS) end it 'verify correct form ids' do expect(desc...
0
code_files/vets-api-private/modules/va_notify/spec
code_files/vets-api-private/modules/va_notify/spec/services/custom_callback_spec.rb
# frozen_string_literal: true require 'rails_helper' require_relative '../support/helpers/callback_class' describe VANotify::CustomCallback do subject { described_class.new(provider_callback) } let(:notification_id) { SecureRandom.uuid } let(:provider_callback) do { id: notification_id } end ...
0
code_files/vets-api-private/modules/va_notify
code_files/vets-api-private/modules/va_notify/lib/va_notify.rb
# frozen_string_literal: true require 'va_notify/engine' module VaNotify # Your code goes here... end
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/in_progress_form_helper.rb
# frozen_string_literal: true module VANotify class InProgressFormHelper TEMPLATE_ID = { 'generic' => Settings.vanotify.services.va_gov.template_id.in_progress_reminder_email_generic, '686C-674' => Settings.vanotify.services.va_gov.template_id.form686c_reminder_email, '1010ez' => Settings.vanot...
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/engine.rb
# frozen_string_literal: true module VaNotify class Engine < ::Rails::Engine isolate_namespace VaNotify config.generators.api_only = true initializer :append_migrations do |app| unless app.root.to_s.match? root.to_s config.paths['db/migrate'].expanded.each do |expanded_path| app....
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/client.rb
# frozen_string_literal: true require 'common/client/base' require 'common/client/concerns/monitoring' require 'jwt' require_relative 'configuration' require_relative 'error' require 'vets/shared_logging' module VaNotify # Client for VA Notify Push Notification API class Client < Common::Client::Base include ...
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/version.rb
# frozen_string_literal: true module VaNotify VERSION = '0.1.0' end
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/error.rb
# frozen_string_literal: true module VANotify class Error < StandardError attr_reader :status_code, :body, :errors, :context def self.from_generic_error(error, context = {}) case error.status when 400 VANotify::BadRequest.new(error.status, error.body, context) when 401 VANo...
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/default_callback.rb
# frozen_string_literal: true module VANotify class DefaultCallback attr_reader :notification_record, :metadata def initialize(notification_record) @notification_record = notification_record @metadata = notification_record.callback_metadata end def call if metadata.present? ...
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/callback_signature_generator.rb
# frozen_string_literal: true module VANotify class CallbackSignatureGenerator def self.call(payload, api_key) parsed_payload = JSON.parse(payload) encoded = urlencode_like_python(parsed_payload) OpenSSL::HMAC.hexdigest('SHA256', api_key, encoded) end def self.urlencode_like_python(h...
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/configuration.rb
# frozen_string_literal: true require 'common/client/configuration/rest' module VaNotify class Configuration < Common::Client::Configuration::REST self.read_timeout = 30 def connection @conn ||= Faraday.new(base_path, headers: base_request_headers, request: request_options) do |faraday| farad...
0
code_files/vets-api-private/modules/va_notify/lib
code_files/vets-api-private/modules/va_notify/lib/va_notify/service.rb
# frozen_string_literal: true require 'notifications/client' require 'common/client/base' require 'common/client/concerns/monitoring' require_relative 'configuration' require_relative 'error' require_relative 'client' require 'vets/shared_logging' require 'datadog' module VaNotify class Service < Common::Client::Ba...
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20251119032000_add_service_id_to_va_notify_notifications.rb
class AddServiceIdToVANotifyNotifications < ActiveRecord::Migration[7.2] def change add_column :va_notify_notifications, :service_id, :uuid end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20241119190908_remove_callback_and_metadata_from_va_notify_notifications.rb
class RemoveCallbackAndMetadataFromVANotifyNotifications < ActiveRecord::Migration[7.1] def change safety_assured do remove_column :va_notify_notifications, :callback, :text remove_column :va_notify_notifications, :metadata, :string end end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20241014205528_add_metadata_to_va_notify_notifications.rb
class AddMetadataToVANotifyNotifications < ActiveRecord::Migration[7.1] def change add_column :va_notify_notifications, :metadata, :string end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20241119031849_applies_modifications_to_va_notify_notifications.rb
class AppliesModificationsToVANotifyNotifications < ActiveRecord::Migration[7.1] def change add_column :va_notify_notifications, :callback_klass, :text, if_not_exists: true add_column :va_notify_notifications, :template_id, :uuid, if_not_exists: true end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20241206163037_add_to_ciphertext.rb
class AddToCiphertext < ActiveRecord::Migration[7.1] def change add_column :va_notify_notifications, :to_ciphertext, :text add_column :va_notify_notifications, :encrypted_kms_key, :text end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20230412000222_re_add_in_progress_reminders_sent.rb
class ReAddInProgressRemindersSent < ActiveRecord::Migration[6.1] def change create_table :va_notify_in_progress_reminders_sent do |t| t.string :form_id, null: false t.references :user_account, type: :uuid, foreign_key: :true, null: false, index: true t.index ["user_account_id", "form_id"], nam...
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20250123063915_remove_existing_notification_callback_to_field.rb
class RemoveExistingNotificationCallbackToField < ActiveRecord::Migration[7.2] def change safety_assured { remove_column :va_notify_notifications, :to, :text, if_exists: true } end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20241114213556_add_callback_metadata_to_va_notify_notifications.rb
class AddCallbackMetadataToVANotifyNotifications < ActiveRecord::Migration[7.1] def change add_column :va_notify_notifications, :callback_metadata, :jsonb end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20230404190930_create_in_progress_reminders_sent.rb
class CreateInProgressRemindersSent < ActiveRecord::Migration[6.1] def change create_table :va_notify_in_progress_reminders_sent do |t| t.string :form_id, null: false t.string :user_uuid, null: false t.timestamps end end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20250813184013_add_service_api_key_path_to_va_notify_notifications.rb
class AddServiceApiKeyPathToVANotifyNotifications < ActiveRecord::Migration[7.2] def change add_column :va_notify_notifications, :service_api_key_path, :text end end
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20241010144821_create_va_notify_notifications.rb
class CreateVANotifyNotifications < ActiveRecord::Migration[7.1] def change create_table :va_notify_notifications do |t| t.uuid :notification_id, null: false t.text :reference t.text :to t.text :status t.datetime :completed_at t.datetime :sent_at t.text :notification_type...
0
code_files/vets-api-private/modules/va_notify/db
code_files/vets-api-private/modules/va_notify/db/migrate/20230412000219_drop_notify_in_progress_reminders_sent.rb
class DropNotifyInProgressRemindersSent < ActiveRecord::Migration[6.1] def up drop_table :va_notify_in_progress_reminders_sent end def down raise ActiveRecord::IrreversibleMigration end end
0
code_files/vets-api-private/modules
code_files/vets-api-private/modules/mobile/README.md
# Mobile API API endpoints for the flagship VA Mobile iOS and Android Apps. ## License See the parent [LICENSE.md](../../LICENSE.md)
0
code_files/vets-api-private/modules
code_files/vets-api-private/modules/mobile/Rakefile
# frozen_string_literal: true begin require 'bundler/setup' rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end require 'rdoc/task' RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = 'Mobile' rdoc.options << '--line-numbers' rdoc.rdoc_file...
0
code_files/vets-api-private/modules
code_files/vets-api-private/modules/mobile/mobile.gemspec
# frozen_string_literal: true $LOAD_PATH.push File.expand_path('../lib', __FILE__) # Maintain your gem's version: require 'mobile/version' # Describe your gem and declare its dependencies: Gem::Specification.new do |spec| spec.name = 'mobile' spec.version = Mobile::VERSION spec.authors = ['Alast...
0
code_files/vets-api-private/modules
code_files/vets-api-private/modules/mobile/Gemfile
# frozen_string_literal: true source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } # Declare your gem's dependencies in mobile.gemspec. # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development...
0
code_files/vets-api-private/modules/mobile/app/sidekiq/mobile
code_files/vets-api-private/modules/mobile/app/sidekiq/mobile/v0/weekly_maintenance_window_logger.rb
# frozen_string_literal: true require 'sidekiq' require 'date' module Mobile module V0 class WeeklyMaintenanceWindowLogger include Sidekiq::Job sidekiq_options retry: 3, unique_for: 1.week def perform upstream_maintenance_windows = ::MaintenanceWindow.where('created_at >= ?', 1.week....
0
code_files/vets-api-private/modules/mobile/app/sidekiq/mobile
code_files/vets-api-private/modules/mobile/app/sidekiq/mobile/v0/vet360_linking_job.rb
# frozen_string_literal: true require 'sidekiq' require 'va_profile/person/service' # This job is run when a user does not have a vet360_id, which indicates that the user does not have an account on the # VAProfile service. The mobile app depends on the VAProfile service for user contact data, and mobile features # i...
0
code_files/vets-api-private/modules/mobile/app/models
code_files/vets-api-private/modules/mobile/app/models/mobile/user.rb
# frozen_string_literal: true module Mobile class User < ApplicationRecord validates :icn, presence: true, uniqueness: true attribute :vet360_link_attempts, :integer, default: 0 attribute :vet360_linked, :boolean, default: false def increment_vet360_link_attempts self.vet360_link_attempts += 1...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/vaccine.rb
# frozen_string_literal: true module Mobile module V0 # Stores vaccine data from the CDC for use in Immunization records # @example create a new instance # Mobile::V0::Vaccine.create(cvx_code: 1, group_name: 'FLU', manufacturer: 'Moderna') # class Vaccine < ApplicationRecord validates :cv...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/benefit_military_information.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class BenefitMilitaryInformation < Common::Resource attribute :branch, Types::String attribute :character_of_service, Types::String attribute :entered_date, Types::DateTime attribute :released_date, Ty...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/award.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class Award < Common::Resource attribute :id, Types::String attribute :aportn_recip_id, Types::Integer attribute :award_amt, Types::Decimal attribute :award_cmpsit_id, Types::String attribute :aw...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/military_information.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class MilitaryInformation < Common::Resource attribute :branch_of_service, Types::String attribute :begin_date, Types::String attribute :end_date, Types::String.optional attribute :formatted_begin_date...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/claim_event_timeline.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class ClaimEventTimeline < Common::Resource attribute :type, Types::String attribute :tracked_item_id, Types::Integer.optional.default(nil) attribute :description, Types::String.optional.default(nil) a...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/travel_pay_claim_details.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class TravelPayClaimDetails < Common::Resource attribute :id, Types::String attribute :claimNumber, Types::String.optional attribute :claimName, Types::String.optional attribute :claimantFirstName, Typ...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/service_node.rb
# frozen_string_literal: true module Mobile module V0 class ServiceNode attr_accessor :name, :dependent_services def initialize(name:) @name = name @dependent_services = [] end def add_service(service) @dependent_services << service end def leaf? ...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/travel_pay_claim_summary.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class TravelPayClaimSummary < Common::Resource attribute :id, Types::String attribute :claimNumber, Types::String.optional attribute :claimStatus, Types::String attribute :appointmentDateTime, Types::D...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/maintenance_window.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class MaintenanceWindow < Common::Resource attribute :id, Types::String attribute :service, Types::String attribute :start_time, Types::DateTime attribute :end_time, Types::DateTime end end end
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/debt.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class Debt < Common::Resource attribute :id, Types::String attribute :file_number, Types::String attribute :payee_number, Types::String attribute :person_entitled, Types::String attribute :deduct...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/appointment.rb
# frozen_string_literal: true require 'common/models/resource' require 'mobile/v0/exceptions/validation_errors' module Mobile module V0 # Model that can be populated by either Community Care or the four # VA appointment types # # @example create a new instance and parse incoming data # Mobile:...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/service_graph.rb
# frozen_string_literal: true module Mobile module V0 class ServiceGraph attr_accessor :services MAINTENANCE_WINDOW_NAMESPACE = 'fa1a248e-0f71-4077-8d25-ed7430bcdb34' def initialize(*graph) @services = {} graph.each do |service| upstream = service.first do...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/user_accessible_services.rb
# frozen_string_literal: true module Mobile module V0 class UserAccessibleServices def initialize(user, request = nil) @user = user @request = request end def authorized service_auth_map.select { |_, v| v == true }.keys.sort end # forming this requires eval...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/appeal.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 # This model is derived from the following docs: https://developer.va.gov/explore/api/appeals-status/docs?version=current # We do not use the endpoint that these docs are for but instead share the same upstream service. ...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/letter.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class Letter < Common::Resource LETTER_TYPE = Types::String.enum( 'benefit_summary', 'benefit_summary_dependent', 'benefit_verification', 'certificate_of_eligibility', 'certificat...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/payment_history.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class PaymentHistory < Common::Resource attribute :id, Types::String attribute :account, Types::String.optional attribute :amount, Types::Float attribute :bank, Types::String.optional attribute :...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/lighthouse_session.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 # Stores the session attributes returned from the Lighthouse token endpoint. # Mixes in the RedisCaching concern so the token can be cached for the length # (in seconds) of the expires_in attribute # class Lig...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/location.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 # @example create a new instance and parse incoming data # Mobile::V0::Adapters::Location.new(location_hash) # class Location < Common::Resource attribute :id, Types::String.optional attribute :name,...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/benefit_information.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class BenefitInformation < Common::Resource attribute :award_effective_date, Types::DateTime attribute :has_chapter35_eligibility, Types::Bool attribute :monthly_award_amount, Types::Float attribute :s...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/immunization.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class Immunization < Common::Resource CACHE_VERSION = 1 include Mobile::V0::Concerns::RedisCaching redis_config REDIS_CONFIG[:mobile_app_immunizations_store], CACHE_VERSION attribute :id, Types::Str...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/allergy_intolerance.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class AllergyIntolerance < Common::Resource attribute :id, Types::String attribute :resourceType, Types::String attribute :type, Types::String attribute :category, Types::Array.of(Types::String) ...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/appointment_phone.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 # Child model of Mobile::V0::Location to store phone data # # @example create a new instance and parse incoming data # Mobile::V0::Adapters::AppointmentPhone.new(phone_hash) # class AppointmentPhone < Co...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/claim.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class Claim < Common::Resource attribute :id, Types::String attribute :date_filed, Types::Date attribute :min_est_date, Types::Date attribute :max_est_date, Types::Date attribute :phase_change_da...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/suggested_address.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class SuggestedAddress < Common::Resource attribute :id, Types::String attribute :address_line1, Types::String.optional.default(nil) attribute :address_line2, Types::String.optional.default(nil) attrib...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/lighthouse_params_factory.rb
# frozen_string_literal: true module Mobile module V0 # Initialized with a veteran's ICN builds the params needed when posting a request to the # Lighthouse access token endpoint. # class LighthouseParamsFactory # @param icn String a veteran's ICN # def initialize(icn, api) ...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/military_information_history.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class MilitaryInformationHistory < Common::Resource attribute :id, Types::String attribute :service_history, Types::Array.of(MilitaryInformation) end end end
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/rating.rb
# frozen_string_literal: true require 'vets/model' module Mobile module V0 class Rating include Vets::Model attribute :id, String attribute :combined_disability_rating, Integer attribute :individual_ratings, Mobile::V0::IndividualRating, array: true, default: -> { [] } end end end...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/payment_information.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class PaymentInformation < Common::Resource attribute :id, Types::String attribute :account_control do attribute :can_update_address, Types::Bool attribute :corp_avail_indicator, Types::Bool ...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/lighthouse_assertion.rb
# frozen_string_literal: true module Mobile module V0 # Lighthouse OAuth assertion class used for establishing a LH session. # class LighthouseAssertion TTL = 300 CLIENT_IDS = { health: Settings.lighthouse_health_immunization.client_id }.freeze AUD_CLAIM_URLS = { health: Settings.ligh...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/decision_letter.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class DecisionLetter < Common::Resource attribute :document_id, Types::String attribute :series_id, Types::String.optional attribute :version, Types::String.optional attribute :type_description, Types:...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/pension.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class Pension < Common::Resource attribute :veteran_id, Types::String attribute :is_eligible_for_pension, Types::Bool attribute :is_in_receipt_of_pension, Types::Bool attribute :net_worth_limit, Types:...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/medical_service.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class MedicalService < Common::Resource attribute :name, Types::String attribute :request_eligible_facilities, Types::Array attribute :direct_eligible_facilities, Types::Array end end end
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/letter_info.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class LetterInfo < Common::Resource attribute :id, Types::String attribute :benefit_information, BenefitInformation attribute :military_service, Types::Array.of(BenefitMilitaryInformation) end end end
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/claim_document.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class ClaimDocument < Common::Resource attribute :tracked_item_id, Types::Integer attribute :file_type, Types::String attribute :document_type, Types::Nil attribute :filename, Types::String attri...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/avs_pdf.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class AvsPdf < Common::Resource attribute :appt_id, Types::String.optional attribute :id, Types::String.optional attribute :name, Types::String.optional attribute :loinc_codes, Types::Array.of(Types::S...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/facility_info.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 # @example create a new instance and parse incoming data # Mobile::V0::Adapters::FacilityInfo.new(info_hash) # class FacilityInfo < Common::Resource attribute :id, Types::String attribute :facilities...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/claim_letter_document.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class ClaimLetterDocument < Common::Resource attribute :id, Types::String attribute :doc_type, Types::String attribute :type_description, Types::String attribute :received_at, Types::Date end end...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/address.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 # @example create a new instance and parse incoming data # Mobile::V0::Adapters::Address.new(address_hash) # class Address < Common::Resource attribute :street, Types::String attribute :city, Types::...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/new_dependent_form_submission.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class NewDependentFormSubmission < Common::Resource attribute :id, Types::String attribute :submit_form_job_id, Types::String end end end
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/individual_rating.rb
# frozen_string_literal: true require 'vets/model' module Mobile module V0 class IndividualRating include Vets::Model attribute :decision, String attribute :effective_date, DateTime attribute :rating_percentage, Integer attribute :diagnostic_text, String end end end
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/enrollment_status.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class EnrollmentStatus < Common::Resource attribute :id, Types::String attribute :application_date, Types::String.optional.default(nil) attribute :enrollment_date, Types::String.optional.default(nil) a...
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/efolder.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class Efolder < Common::Resource attribute :id, Types::String attribute :doc_type, Types::String attribute :type_description, Types::String attribute :received_at, Types::Date end end end
0
code_files/vets-api-private/modules/mobile/app/models/mobile
code_files/vets-api-private/modules/mobile/app/models/mobile/v0/claim_overview.rb
# frozen_string_literal: true require 'common/models/resource' module Mobile module V0 class ClaimOverview < Common::Resource CACHE_VERSION = 1 include Mobile::V0::Concerns::RedisCaching redis_config REDIS_CONFIG[:mobile_app_claims_store], CACHE_VERSION attribute :id, Types::String ...