module Frontapp::Client::ContactGroups

Public Instance Methods

add_contacts_to_contact_group!(group_id, params = {}) click to toggle source

Parameters Name Type Description


group_id string Id of the requested group


Allowed attributes: Name Type Description


contact_ids array List of ids or aliases of the contacts to add in the requested group


# File lib/frontapp/client/contact_groups.rb, line 49
def add_contacts_to_contact_group!(group_id, params = {})
  cleaned = params.permit(:contact_ids)
  create_without_response("contact_groups/#{group_id}/contacts", cleaned)
end
contact_groups(params = {}) click to toggle source
# File lib/frontapp/client/contact_groups.rb, line 5
def contact_groups(params = {})
  list("contact_groups", params)
end
create_contact_group!(params = {}) click to toggle source

Allowed attributes: Name Type Description


name string Name of the group


# File lib/frontapp/client/contact_groups.rb, line 14
def create_contact_group!(params = {})
  cleaned = params.permit(:name)
  create("contact_groups", cleaned)
end
delete_contact_group!(group_id) click to toggle source

Parameters Name Type Description


group_id string Id of the requested group


# File lib/frontapp/client/contact_groups.rb, line 24
def delete_contact_group!(group_id)
  delete("contact_groups/#{group_id}")
end
get_contact_group_contacts(group_id) click to toggle source

Parameters Name Type Description


group_id string Id of the requested group


# File lib/frontapp/client/contact_groups.rb, line 34
def get_contact_group_contacts(group_id)
  get("contact_groups/#{group_id}/contacts")
end