Class: BGS::People::Response
- Inherits:
-
Object
- Object
- BGS::People::Response
- Defined in:
- app/services/bgs/people/response.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #cache? ⇒ Boolean
- #file_number ⇒ Object
-
#initialize(response, status: :ok) ⇒ Response
constructor
A new instance of Response.
- #participant_id ⇒ Object
- #ssn_number ⇒ Object
Constructor Details
#initialize(response, status: :ok) ⇒ Response
Returns a new instance of Response.
8 9 10 11 |
# File 'app/services/bgs/people/response.rb', line 8 def initialize(response, status: :ok) @response = response @status = status end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'app/services/bgs/people/response.rb', line 6 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'app/services/bgs/people/response.rb', line 6 def status @status end |
Instance Method Details
#cache? ⇒ Boolean
31 32 33 |
# File 'app/services/bgs/people/response.rb', line 31 def cache? status == :ok end |
#file_number ⇒ Object
19 20 21 22 23 |
# File 'app/services/bgs/people/response.rb', line 19 def file_number return if response.blank? response[:file_nbr] end |
#participant_id ⇒ Object
13 14 15 16 17 |
# File 'app/services/bgs/people/response.rb', line 13 def participant_id return if response.blank? response[:ptcpnt_id] end |
#ssn_number ⇒ Object
25 26 27 28 29 |
# File 'app/services/bgs/people/response.rb', line 25 def ssn_number return if response.blank? response[:ssn_nbr] end |