Class: PacerApi::Immediate::PartySearch::Page

Inherits:
PacerApi::Immediate::PaginatedResponse show all
Defined in:
lib/pacer_api/immediate/party_search.rb

Instance Attribute Summary

Attributes inherited from PacerApi::Immediate::PaginatedResponse

#payload

Instance Method Summary collapse

Methods inherited from PacerApi::Immediate::PaginatedResponse

#errors, #last?, #page, #total_elements, #total_pages

Instance Method Details

#partiesObject



23
24
25
26
27
28
29
30
# File 'lib/pacer_api/immediate/party_search.rb', line 23

def parties
  @parties ||=
    if payload.key?(:content)
      payload.fetch(:content).map { |h| PartyInfo.new(h) }
    else
      []
    end
end