class ActiveCampaignWrapper::Core::TagGateway
Public Class Methods
new(client)
click to toggle source
# File lib/active_campaign_wrapper/core/tag_gateway.rb, line 6 def initialize(client) @client = client @config = client.config end
Public Instance Methods
all(**params)
click to toggle source
# File lib/active_campaign_wrapper/core/tag_gateway.rb, line 11 def all(**params) @config.get('/tags', query: params) end
create(params)
click to toggle source
# File lib/active_campaign_wrapper/core/tag_gateway.rb, line 15 def create(params) params = { tag: params } @config.post( '/tags', body: ActiveCampaignWrapper::Helpers.normalize_body(params) ) end
delete(tag_id)
click to toggle source
# File lib/active_campaign_wrapper/core/tag_gateway.rb, line 23 def delete(tag_id) @config.delete("/tags/#{tag_id}") end
find(tag_id)
click to toggle source
# File lib/active_campaign_wrapper/core/tag_gateway.rb, line 35 def find(tag_id) @config.get("/tags/#{tag_id}") end
update(tag_id, params)
click to toggle source
# File lib/active_campaign_wrapper/core/tag_gateway.rb, line 27 def update(tag_id, params) params = { tag: params } @config.put( "/tags/#{tag_id}", body: ActiveCampaignWrapper::Helpers.normalize_body(params) ) end