Class: EVSS::DisabilityCompensationAuthHeaders
- Inherits:
-
BaseHeaders
- Object
- BaseHeaders
- EVSS::DisabilityCompensationAuthHeaders
- Defined in:
- lib/evss/disability_compensation_auth_headers.rb
Instance Method Summary collapse
-
#add_headers(auth_headers) ⇒ Object
:nocov:.
- #eauth_json ⇒ Object private
- #gender ⇒ Object private
Methods inherited from BaseHeaders
Constructor Details
This class inherits a constructor from EVSS::BaseHeaders
Instance Method Details
#add_headers(auth_headers) ⇒ Object
:nocov:
10 11 12 13 14 |
# File 'lib/evss/disability_compensation_auth_headers.rb', line 10 def add_headers(auth_headers) auth_headers.merge( 'va_eauth_authorization' => eauth_json ) end |
#eauth_json ⇒ Object (private)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/evss/disability_compensation_auth_headers.rb', line 18 def eauth_json { authorizationResponse: { status: 'VETERAN', idType: 'SSN', id: @user.ssn, edi: @user.edipi, firstName: @user.first_name, lastName: @user.last_name, birthDate: Formatters::DateFormatter.format_date(@user.birth_date, :datetime_iso8601), gender: } }.to_json end |
#gender ⇒ Object (private)
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/evss/disability_compensation_auth_headers.rb', line 33 def gender case @user.gender when 'F' 'FEMALE' when 'M' 'MALE' else 'UNKNOWN' end end |