Class: Amorail::Property::Lead
- Inherits:
-
PropertyItem
- Object
- PropertyItem
- Amorail::Property::Lead
- Defined in:
- lib/amorail/property.rb
Instance Attribute Summary collapse
-
#statuses ⇒ Object
Returns the value of attribute statuses.
Attributes inherited from PropertyItem
Class Method Summary collapse
Methods inherited from PropertyItem
Methods included from MethodMissing
#method_missing, #respond_to_missing?
Constructor Details
This class inherits a constructor from Amorail::Property::PropertyItem
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Amorail::MethodMissing
Instance Attribute Details
#statuses ⇒ Object
Returns the value of attribute statuses.
102 103 104 |
# File 'lib/amorail/property.rb', line 102 def statuses @statuses end |
Class Method Details
.parse(data) ⇒ Object
105 106 107 108 109 110 111 112 113 |
# File 'lib/amorail/property.rb', line 105 def parse(data) obj = super hash = {} data.fetch('leads_statuses', []).each do |prop| hash[prop['name']] = PropertyItem.new(prop) end obj.statuses = hash obj end |