Module: Zendesk::Ticket

Included in:
Main
Defined in:
lib/zendesk/ticket.rb

Instance Method Summary collapse

Instance Method Details

#create_ticket(input, options = {}) ⇒ Object



12
13
14
# File 'lib/zendesk/ticket.rb', line 12

def create_ticket(input, options = {})
  make_request("tickets", {:create => Zendesk::Main.to_xml('ticket', input)}, options)
end

#delete_ticket(id) ⇒ Object



20
21
22
# File 'lib/zendesk/ticket.rb', line 20

def delete_ticket(id)
  make_request("tickets/#{id}", :destroy => true)
end

#get_ticket(id) ⇒ Object



8
9
10
# File 'lib/zendesk/ticket.rb', line 8

def get_ticket(id)
  make_request("tickets/#{id}")
end

#get_tickets(rule_id) ⇒ Object



4
5
6
# File 'lib/zendesk/ticket.rb', line 4

def get_tickets(rule_id)
  make_request("rules/#{rule_id}")
end

#update_ticket(id, input, options = {}) ⇒ Object



16
17
18
# File 'lib/zendesk/ticket.rb', line 16

def update_ticket(id, input, options = {})
  make_request("tickets/#{id}", {:update => Zendesk::Main.to_xml('ticket', input)}, options)
end