Class: Hubspot::Client

Inherits:
Object
  • Object
show all
Includes:
Discovery::BaseModuleClient
Defined in:
lib/hubspot/client.rb

Instance Attribute Summary

Attributes included from Discovery::BaseModuleClient

#params

Instance Method Summary collapse

Methods included from Discovery::BaseModuleClient

#api_classes

Constructor Details

#initialize(params) ⇒ Client

Returns a new instance of Client.



7
8
9
10
# File 'lib/hubspot/client.rb', line 7

def initialize(params)
  raise 'Please, pass :api_key or :access_token' if params[:api_key].nil? && params[:developer_api_key].nil? && params[:access_token].nil?
  super
end

Instance Method Details

#api_modulesObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/hubspot/client.rb', line 12

def api_modules
  %i[
    automation
    cms
    communication_preferences
    conversations
    crm
    events
    files
    marketing
    oauth
    settings
    webhooks
  ].freeze
end

#base_moduleObject



28
29
30
# File 'lib/hubspot/client.rb', line 28

def base_module
  'Hubspot::Discovery'
end