Class: ActiveCampaignWrapper::Client

Inherits:
Object
  • Object
show all
Includes:
Core
Defined in:
lib/active_campaign_wrapper/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint_url: nil, api_token: nil) ⇒ Client

Returns a new instance of Client.



32
33
34
35
36
37
# File 'lib/active_campaign_wrapper/client.rb', line 32

def initialize(endpoint_url: nil, api_token: nil)
  @config = Configuration.new(
    endpoint_url: endpoint_url,
    api_token: api_token
  )
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



30
31
32
# File 'lib/active_campaign_wrapper/client.rb', line 30

def config
  @config
end

Instance Method Details

#contact_automationsObject



59
60
61
# File 'lib/active_campaign_wrapper/client.rb', line 59

def contact_automations
  @contact_automations ||= ContactAutomationGateway.new(self)
end

#contact_score_valuesObject



55
56
57
# File 'lib/active_campaign_wrapper/client.rb', line 55

def contact_score_values
  @contact_score_values ||= ContactScoreValueGateway.new(self)
end

#contact_tagsObject



51
52
53
# File 'lib/active_campaign_wrapper/client.rb', line 51

def contact_tags
  @contact_tags ||= ContactTagGateway.new(self)
end

#contactsObject



43
44
45
# File 'lib/active_campaign_wrapper/client.rb', line 43

def contacts
  @contacts ||= ContactGateway.new(self)
end

#custom_field_optionsObject



67
68
69
# File 'lib/active_campaign_wrapper/client.rb', line 67

def custom_field_options
  @custom_field_options ||= CustomFieldOptionGateway.new(self)
end

#custom_field_valuesObject



71
72
73
# File 'lib/active_campaign_wrapper/client.rb', line 71

def custom_field_values
  @custom_field_values ||= CustomFieldValueGateway.new(self)
end

#custom_fieldsObject



63
64
65
# File 'lib/active_campaign_wrapper/client.rb', line 63

def custom_fields
  @custom_fields ||= CustomFieldGateway.new(self)
end

#email_activitiesObject



47
48
49
# File 'lib/active_campaign_wrapper/client.rb', line 47

def email_activities
  @email_activities ||= EmailActivityGateway.new(self)
end

#groupsObject



79
80
81
# File 'lib/active_campaign_wrapper/client.rb', line 79

def groups
  @groups ||= GroupGateway.new(self)
end

#list_groupsObject



83
84
85
# File 'lib/active_campaign_wrapper/client.rb', line 83

def list_groups
  @list_groups ||= ListGroupGateway.new(self)
end

#listsObject



75
76
77
# File 'lib/active_campaign_wrapper/client.rb', line 75

def lists
  @lists ||= ListGateway.new(self)
end

#tagsObject



39
40
41
# File 'lib/active_campaign_wrapper/client.rb', line 39

def tags
  @tags ||= TagGateway.new(self)
end

#task_typesObject



95
96
97
# File 'lib/active_campaign_wrapper/client.rb', line 95

def task_types
  @task_types ||= TaskTypeGateway.new(self)
end

#templatesObject



91
92
93
# File 'lib/active_campaign_wrapper/client.rb', line 91

def templates
  @templates ||= TemplateGateway.new(self)
end

#usersObject



87
88
89
# File 'lib/active_campaign_wrapper/client.rb', line 87

def users
  @users ||= UserGateway.new(self)
end