Class: Freshdesk::Tickets

Inherits:
Base
  • Object
show all
Defined in:
lib/freshdesk/api/v2/tickets.rb

Constant Summary collapse

TICKETS_PROPERTIES =
[
  :attachments, :cc_emails, :company_id, :custom_fields, :deleted,
  :description, :description_text, :due_by, :email, :email_config_id,
  :facebook_id, :fr_due_by, :fr_escalated, :fwd_emails, :group_id, :id,
  :is_escalated,:name,:phone,:priority,:product_id,:reply_cc_emails,
  :requester_id,:responder_id,:source,:spam,:status,:subject,:tags,
  :to_emails,:twitter_id,:type,:created_at, :updated_at
]

Instance Attribute Summary

Attributes inherited from Base

#apikey, #domain

Instance Method Summary collapse

Methods inherited from Base

#all, #connected?, #create, #delete, #delete_all, #find, #initialize, #update

Constructor Details

This class inherits a constructor from Freshdesk::Base

Instance Method Details

#search(options) ⇒ Object



14
15
16
17
# File 'lib/freshdesk/api/v2/tickets.rb', line 14

def search(options)
  response = client.get("/search/#{resource_name}?query=\"#{options[:query]}\"",options.except!(:query))
  response.parsed_response["results"].map { |source| self.class.new(source) } if response.success?
end