Class: EVSS::ReferenceData::IntakeSitesResponse

Inherits:
EVSS::Response show all
Defined in:
lib/evss/reference_data/intake_sites_response.rb

Overview

Model for Intake Sites returned by reference_datea

Constant Summary

Constants included from Common::Client::Concerns::ServiceStatus

Common::Client::Concerns::ServiceStatus::RESPONSE_STATUS

Instance Attribute Summary collapse

Attributes inherited from Common::Base

#errors_hash, #metadata

Instance Method Summary collapse

Methods inherited from EVSS::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(status, response = nil) ⇒ IntakeSitesResponse

Returns a new instance of IntakeSitesResponse.



19
20
21
22
# File 'lib/evss/reference_data/intake_sites_response.rb', line 19

def initialize(status, response = nil)
  separation_locations = response&.body&.dig('intake_sites')
  super(status, separation_locations:)
end

Instance Attribute Details

#countriesArray[String]

Returns An array of intake sites.

Returns:

  • (Array[String])

    An array of intake sites



16
17
18
19
20
21
22
23
# File 'lib/evss/reference_data/intake_sites_response.rb', line 16

class IntakeSitesResponse < EVSS::Response
  attribute :separation_locations, Array[Hash]

  def initialize(status, response = nil)
    separation_locations = response&.body&.dig('intake_sites')
    super(status, separation_locations:)
  end
end