Class: Infopark::Crm::System

Inherits:
Object
  • Object
show all
Defined in:
lib/crm_connector/system.rb

Overview

Note:

Implementation and naming may change

Class Method Summary collapse

Class Method Details

.templatesHash

Reads the definition of all WebCRM templates.

Returns:

  • (Hash)

WebCRM Rest Url:

  • GET /api/templates



11
12
13
14
# File 'lib/crm_connector/system.rb', line 11

def self.templates
  response = base.connection.get(path, base.headers)
  base.format.decode(response.body)
end

.templates=(hash) ⇒ Object

Sets the definition of all WebCRM templates

Parameters:

  • hash (Hash)

    the new definition of all WebCRM templates



19
20
21
22
# File 'lib/crm_connector/system.rb', line 19

def self.templates=(hash)
  data = {'templates' => hash}
  base.connection.put(path, base.format.encode(data), base.headers)
end