Class: Zoro::Lead

Inherits:
Record show all
Defined in:
lib/zoro/lead.rb

Instance Attribute Summary

Attributes inherited from Record

#fields, #zoho_module

Instance Method Summary collapse

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