Module: Genability::Client::Property
- Included in:
- Genability::Client
- Defined in:
- lib/genability/client/property.rb
Overview
Properties are metadata associated with a tariff. They are frequently used to determine applicability for a particular set of rates within a tariff. For example, the property cityLimits is used when a tariff has different rates based on whether the consumer lives inside or outside the city limits.
Instance Method Summary collapse
-
#properties(options = {}) ⇒ Array
This returns a list of Properties based on a search criteria.
-
#property(key_name) ⇒ Hashie::Mash
This allows you to retrieve one Property using its keyname.
Instance Method Details
#properties(options = {}) ⇒ Array
This returns a list of Properties based on a search criteria. The result set is an array of Property objects in the standard response format.
38 39 40 |
# File 'lib/genability/client/property.rb', line 38 def properties( = {}) get("public/properties", property_params()).results end |
#property(key_name) ⇒ Hashie::Mash
This allows you to retrieve one Property using its keyname. This is particularly useful when using the Calculator as it may require you to specify certain applicability values prior to making the calculation.
19 20 21 |
# File 'lib/genability/client/property.rb', line 19 def property(key_name) get("public/properties/#{key_name}").results.first end |