Module: CleverSDK::Client::Districts
- Included in:
- CleverSDK::Client
- Defined in:
- lib/clever_sdk/client/districts.rb
Instance Method Summary collapse
- #district(id) ⇒ Object
-
#districts(count: nil) ⇒ Object
count - acceptable values are nil, :true, :false, :undefined.
Instance Method Details
#district(id) ⇒ Object
14 15 16 17 18 |
# File 'lib/clever_sdk/client/districts.rb', line 14 def district(id) response = api.district(access_token: access_token, id: id) data = response.body.dig("data") CleverSDK::Data::District.new(data, response) end |
#districts(count: nil) ⇒ Object
count - acceptable values are nil, :true, :false, :undefined
9 10 11 12 |
# File 'lib/clever_sdk/client/districts.rb', line 9 def districts(count: nil) response = api.districts(access_token: access_token, count: count) CleverSDK::Data::Districts.new(response) end |