Class: Zoro::Lead
Instance Attribute Summary
Attributes inherited from Record
Instance Method Summary collapse
- #add_field(field_name, value) ⇒ Object
-
#initialize(data = {}) ⇒ Lead
constructor
A new instance of Lead.
Methods inherited from Record
#api, #api=, #method_missing, #save!, #to_xml
Constructor Details
#initialize(data = {}) ⇒ Lead
Returns a new instance of Lead.
3 4 5 6 |
# File 'lib/zoro/lead.rb', line 3 def initialize(data = {}) @fields = {}.merge(data) @zoho_module = "Leads" end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Zoro::Record
Instance Method Details
#add_field(field_name, value) ⇒ Object
8 9 10 |
# File 'lib/zoro/lead.rb', line 8 def add_field(field_name, value) @fields[field_name] = value end |