Class: VAProfile::Profile::V3::MilitaryOccupationResponse

Inherits:
Response show all
Defined in:
lib/va_profile/profile/v3/military_occupation_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

#errors_hash, #metadata

Instance Method Summary collapse

Methods inherited from Response

#cache?, #metadata, #ok?, #response_status

Methods inherited from Common::Base

#changed, #changed?, #changes, default_sort, filterable_attributes, max_per_page, per_page, sortable_attributes

Constructor Details

#initialize(response) ⇒ MilitaryOccupationResponse

Returns a new instance of MilitaryOccupationResponse.



11
12
13
14
15
16
17
18
# File 'lib/va_profile/profile/v3/military_occupation_response.rb', line 11

def initialize(response)
  attributes = {
    military_occupations: response.body.dig('profile', 'military_person', 'military_occupations'),
    messages: response.body['messages']
  }

  super(response.status, attributes)
end