class Infopark::Crm::System

@note Implementation and naming may change

Public Class Methods

templates() click to toggle source

Reads the definition of all WebCRM templates. @return [Hash] @webcrm_rest_url GET /api/templates

# 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) click to toggle source

Sets the definition of all WebCRM templates @param hash [Hash] the new definition of all WebCRM templates

# 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

Private Class Methods

base() click to toggle source
# File lib/crm_connector/system.rb, line 26
def self.base
  Infopark::Crm::Core::Resource
end
path() click to toggle source
# File lib/crm_connector/system.rb, line 30
def self.path
  base.prefix + 'templates'
end