Class: RubyRedtail::TagGroups

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-redtail/contact/tag_groups.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_hash) ⇒ TagGroups



3
4
5
# File 'lib/ruby-redtail/contact/tag_groups.rb', line 3

def initialize api_hash
  @api_hash = api_hash
end

Instance Method Details

#fetch(tag_id) ⇒ Object



7
8
9
# File 'lib/ruby-redtail/contact/tag_groups.rb', line 7

def fetch(tag_id)
  RubyRedtail::Query.run("taggroups/#{tag_id}", @api_hash, "GET")
end

#fetch_by_contact(contact_id) ⇒ Object



15
16
17
# File 'lib/ruby-redtail/contact/tag_groups.rb', line 15

def fetch_by_contact(contact_id)
  RubyRedtail::Query.run("contacts/#{contact_id}/taggroups", @api_hash, "GET")
end

#fetch_contacts(tag_id) ⇒ Object



11
12
13
# File 'lib/ruby-redtail/contact/tag_groups.rb', line 11

def fetch_contacts(tag_id)
  RubyRedtail::Query.run("taggroups/#{tag_id}/contacts", @api_hash, "GET")
end