Class: BGS::DependencyVerificationService
- Inherits:
-
Object
- Object
- BGS::DependencyVerificationService
- Includes:
- SentryLogging
- Defined in:
- app/services/bgs/dependency_verification_service.rb
Instance Attribute Summary collapse
-
#common_name ⇒ Object
readonly
Returns the value of attribute common_name.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#icn ⇒ Object
readonly
Returns the value of attribute icn.
-
#participant_id ⇒ Object
readonly
Returns the value of attribute participant_id.
-
#ssn ⇒ Object
readonly
Returns the value of attribute ssn.
Instance Method Summary collapse
-
#initialize(user) ⇒ DependencyVerificationService
constructor
A new instance of DependencyVerificationService.
- #read_diaries ⇒ Object
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger
Constructor Details
#initialize(user) ⇒ DependencyVerificationService
Returns a new instance of DependencyVerificationService.
9 10 11 12 13 14 15 |
# File 'app/services/bgs/dependency_verification_service.rb', line 9 def initialize(user) @participant_id = user.participant_id @ssn = user.ssn @common_name = user.common_name @email = user.email @icn = user.icn end |
Instance Attribute Details
#common_name ⇒ Object (readonly)
Returns the value of attribute common_name.
7 8 9 |
# File 'app/services/bgs/dependency_verification_service.rb', line 7 def common_name @common_name end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
7 8 9 |
# File 'app/services/bgs/dependency_verification_service.rb', line 7 def email @email end |
#icn ⇒ Object (readonly)
Returns the value of attribute icn.
7 8 9 |
# File 'app/services/bgs/dependency_verification_service.rb', line 7 def icn @icn end |
#participant_id ⇒ Object (readonly)
Returns the value of attribute participant_id.
7 8 9 |
# File 'app/services/bgs/dependency_verification_service.rb', line 7 def participant_id @participant_id end |
#ssn ⇒ Object (readonly)
Returns the value of attribute ssn.
7 8 9 |
# File 'app/services/bgs/dependency_verification_service.rb', line 7 def ssn @ssn end |
Instance Method Details
#read_diaries ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/services/bgs/dependency_verification_service.rb', line 17 def read_diaries diaries = service.diaries.read_diaries( { beneficiary_id: participant_id, participant_id:, ssn:, award_type: 'CPL' } ) return empty_response(diaries) if diaries[:diaries].blank? dependency_decisions = diaries[:dependency_decs][:dependency_dec] diaries[:dependency_decs][:dependency_dec] = normalize_dependency_decisions(dependency_decisions) standard_response(diaries) rescue => e log_exception_to_sentry(e, { icn: }, { team: Constants::SENTRY_REPORTING_TEAM }) end |