Class: ActiveCampaignWrapper::Core::TemplateGateway

Inherits:
Object
  • Object
show all
Defined in:
lib/active_campaign_wrapper/core/template_gateway.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TemplateGateway

Returns a new instance of TemplateGateway.



6
7
8
9
# File 'lib/active_campaign_wrapper/core/template_gateway.rb', line 6

def initialize(client)
  @client = client
  @config = client.config
end

Instance Method Details

#all(**params) ⇒ Object



11
12
13
# File 'lib/active_campaign_wrapper/core/template_gateway.rb', line 11

def all(**params)
  @config.get('/templates', query: params)
end

#delete(template_id) ⇒ Object



15
16
17
# File 'lib/active_campaign_wrapper/core/template_gateway.rb', line 15

def delete(template_id)
  @config.delete("/templates/#{template_id}")
end

#find(template_id) ⇒ Object



19
20
21
# File 'lib/active_campaign_wrapper/core/template_gateway.rb', line 19

def find(template_id)
  @config.get("/templates/#{template_id}")
end