Class: ZohoHub::Settings::Module
- Inherits:
-
Object
- Object
- ZohoHub::Settings::Module
- Includes:
- WithAttributes, WithConnection
- Defined in:
- lib/zoho_hub/settings/module.rb
Overview
Zoho CRM has standard modules such as, Leads, Accounts, Contacts, Deals, Forecasts, Activities, etc,. Using Zoho CRM REST API, you can retrieve the list of available modules.
convertable: Describes if the user can convert the record into another type of record.
For example: Convert Leads in to Deals.
creatable: Checks if the user can create a record in the current module. generated_type: Describes the type of module which would be generated by the user. There are
4 types: default, web, custom, linking.
api_supported: The modules which are currently not accessible by APIs have value as “false”.
If the modules are supported in the future, the value automatically changes
to "true".
modified_time: The date and time of changes made by the user.
More details: www.zoho.com/crm/help/api/v2/#Modules-APIs
Constant Summary collapse
- REQUEST_PATH =
'settings/modules'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json = {}) ⇒ Module
constructor
A new instance of Module.
Methods included from WithAttributes
#assign_attributes, #attributes, included
Methods included from WithConnection
#delete, #get, included, #post, #put
Constructor Details
#initialize(json = {}) ⇒ Module
Returns a new instance of Module.
44 45 46 |
# File 'lib/zoho_hub/settings/module.rb', line 44 def initialize(json = {}) attributes.each { |attr| send("#{attr}=", json[attr]) } end |
Class Method Details
.all ⇒ Object
34 35 36 37 |
# File 'lib/zoho_hub/settings/module.rb', line 34 def self.all modules = all_json modules.map { |json| new(json) } end |
.all_json ⇒ Object
39 40 41 42 |
# File 'lib/zoho_hub/settings/module.rb', line 39 def self.all_json response = get(REQUEST_PATH) response[:modules] end |