Module: ZohoCrm::ZohoApiUtils

Defined in:
lib/zoho_crm/zoho_api_utils.rb

Class Method Summary collapse

Class Method Details

.build_attributes(module_name, field_values_hash) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/zoho_crm/zoho_api_utils.rb', line 13

def build_attributes(module_name, field_values_hash)
  rexml   = REXML::Document.new
  element = rexml.add_element(module_name)
  row     = element.add_element('row', {'no' => '1'})
  field_values_hash.each_pair { |k, v| add_field(row, k, v) }
  rexml.to_s
end

.create_url(module_name, api_call) ⇒ Object

/// api_call //////// -> insertRecords -> updateRecords -> getModules



9
10
11
# File 'lib/zoho_crm/zoho_api_utils.rb', line 9

def create_url(module_name, api_call)
  "https://crm.zoho.com/crm/private/xml/#{module_name}/#{api_call}"
end