Class: Intercom::Service::Tag
Instance Attribute Summary
Attributes inherited from BaseService
#client
Instance Method Summary
collapse
#find_all
#find
#all
#create, #identity_hash, #save
Methods inherited from BaseService
#from_api, #initialize
Instance Method Details
#collection_class ⇒ Object
15
16
17
|
# File 'lib/intercom/service/tag.rb', line 15
def collection_class
Intercom::Tag
end
|
#tag(params) ⇒ Object
19
20
21
22
|
# File 'lib/intercom/service/tag.rb', line 19
def tag(params)
params['tag_or_untag'] = 'tag'
create(params)
end
|
#untag(params) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/intercom/service/tag.rb', line 24
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
|