Class: NovaposhtaApi::Resources::SettlementResource

Inherits:
NovaposhtaApi::Resource show all
Defined in:
lib/novaposhta_api/resources/settlement_resource.rb

Instance Attribute Summary

Attributes inherited from NovaposhtaApi::Resource

#http

Instance Method Summary collapse

Methods inherited from NovaposhtaApi::Resource

#initialize, #request

Constructor Details

This class inherits a constructor from NovaposhtaApi::Resource

Instance Method Details

#all(params = {}) ⇒ Object



6
7
8
9
10
# File 'lib/novaposhta_api/resources/settlement_resource.rb', line 6

def all(params = {})
  response = request('Address/searchSettlements', params)

  NovaposhtaApi::Models::Settlement.extract_collection(response[0]['Addresses'])
end