class ZohoHub::Settings::Field
Constants
- REQUEST_PATH
Public Class Methods
all_for(module_name)
click to toggle source
# File lib/zoho_hub/settings/field.rb, line 18 def self.all_for(module_name) fields = all_json_for(module_name) fields.map { |json| new(json) } end
all_json_for(module_name)
click to toggle source
# File lib/zoho_hub/settings/field.rb, line 23 def self.all_json_for(module_name) response = get(REQUEST_PATH, module: module_name) response[:fields] end
new(json = {})
click to toggle source
# File lib/zoho_hub/settings/field.rb, line 28 def initialize(json = {}) attributes.each { |attr| send("#{attr}=", json[attr]) } end