Module: ZohoHub::WithConnection

Included in:
BaseRecord, Notifications, Settings::Field, Settings::Module
Defined in:
lib/zoho_hub/with_connection.rb

Overview

Adds the ability to do API requests (GET / PUT and POST requests) when included in a class.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



6
7
8
# File 'lib/zoho_hub/with_connection.rb', line 6

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#delete(path, params = {}) ⇒ Object



40
41
42
# File 'lib/zoho_hub/with_connection.rb', line 40

def delete(path, params = {})
  self.class.delete(path, params)
end

#get(path, params = {}) ⇒ Object



28
29
30
# File 'lib/zoho_hub/with_connection.rb', line 28

def get(path, params = {})
  self.class.get(path, params)
end

#post(path, params = {}) ⇒ Object



32
33
34
# File 'lib/zoho_hub/with_connection.rb', line 32

def post(path, params = {})
  self.class.post(path, params)
end

#put(path, params = {}) ⇒ Object



36
37
38
# File 'lib/zoho_hub/with_connection.rb', line 36

def put(path, params = {})
  self.class.put(path, params)
end