Class: VAProfile::VeteranStatus::VeteranStatusResponse
- Inherits:
-
Response
- Object
- Common::Base
- Response
- VAProfile::VeteranStatus::VeteranStatusResponse
- Defined in:
- lib/va_profile/veteran_status/veteran_status_response.rb
Constant Summary
Constants included from Common::Client::Concerns::ServiceStatus
Common::Client::Concerns::ServiceStatus::RESPONSE_STATUS
Instance Attribute Summary
Attributes inherited from Common::Base
Class Method Summary collapse
Methods inherited from Response
#cache?, #initialize, #metadata, #ok?, #response_status
Methods inherited from Common::Base
#changed, #changed?, #changes, default_sort, filterable_attributes, #initialize, max_per_page, per_page, sortable_attributes
Constructor Details
This class inherits a constructor from VAProfile::Response
Class Method Details
.from(_, response = nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/va_profile/veteran_status/veteran_status_response.rb', line 11 def self.from(_, response = nil) body = response&.body title38_status_code = body&.dig( 'profile', 'military_person', 'military_summary', 'title38_status_code' ) new( response&.status, title38_status_code: VAProfile::Models::VeteranStatus.new( title38_status_code: ) ) end |