Sha256: f528404f226189a2a3642b191d7f6d3644b35745b0f1d2cb82792319aabcf6bd
Contents?: true
Size: 859 Bytes
Versions: 15
Compression:
Stored size: 859 Bytes
Contents
require 'intercom/service/base_service' require 'intercom/api_operations/save' require 'intercom/api_operations/list' require 'intercom/api_operations/find_all' module Intercom module Service class Tag < BaseService include ApiOperations::Save include ApiOperations::List include ApiOperations::FindAll include ApiOperations::Archive def collection_class Intercom::Tag end def tag(params) params['tag_or_untag'] = 'tag' create(params) end def untag(params) params['tag_or_untag'] = 'untag' users_or_companies(params).each do |user_or_company| user_or_company[:untag] = true end create(params) end private def users_or_companies(params) params[:users] || params[:companies] end end end end
Version data entries
15 entries across 15 versions & 1 rubygems