Class: PriceHubble::ValuationRequest
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- PriceHubble::ValuationRequest
- Defined in:
- lib/price_hubble/entity/valuation_request.rb
Overview
The PriceHubble valuation request for one or more properties.
Instance Attribute Summary
Attributes inherited from BaseEntity
Instance Method Summary collapse
-
#perform(**args) ⇒ Array<PriceHubble::Valuation>
Perform the property valuation request.
-
#sanitize_attr_key_properties ⇒ Symbol
For transportation the
properties
array name must be changed to reflect the actual API specification. -
#sanitize_attr_properties ⇒ Array<Hash{String => Mixed}>
For transportation the
properties
array must be sanitized to reflect the actual API specification.
Methods inherited from BaseEntity
Methods included from Utils::Bangers
Methods included from EntityConcern::Persistence
#destroyed?, #mark_as_destroyed, #new_record?, #persisted?
Methods included from EntityConcern::Client
Methods included from EntityConcern::Associations
has_many, has_one, inherited_setup_associations
Methods included from EntityConcern::Attributes
#assign_attributes, #attributes, inherited_setup_attributes, tracked_attr, typed_attr
Methods included from EntityConcern::Attributes::StringInquirer
Methods included from EntityConcern::Attributes::Range
Methods included from EntityConcern::Attributes::Enum
Methods included from EntityConcern::Attributes::DateArray
Constructor Details
This class inherits a constructor from PriceHubble::BaseEntity
Instance Method Details
#perform(**args) ⇒ Array<PriceHubble::Valuation>
Perform the property valuation request.
53 54 55 |
# File 'lib/price_hubble/entity/valuation_request.rb', line 53 def perform(**args) client.property_value(self, **args) || [] end |
#sanitize_attr_key_properties ⇒ Symbol
For transportation the properties
array name must be changed to reflect the actual API specification.
37 38 39 |
# File 'lib/price_hubble/entity/valuation_request.rb', line 37 def sanitize_attr_key_properties :valuation_inputs end |
#sanitize_attr_properties ⇒ Array<Hash{String => Mixed}>
For transportation the properties
array must be sanitized to reflect the actual API specification.
45 46 47 |
# File 'lib/price_hubble/entity/valuation_request.rb', line 45 def sanitize_attr_properties properties.map { |prop| { property: prop.attributes(sanitize: true) } } end |