Module: Freshly::Client::Tickets

Included in:
Freshly::Client
Defined in:
lib/freshly/client/tickets.rb

Instance Method Summary collapse

Instance Method Details

#create_ticket(options = {}) ⇒ Object



13
14
15
# File 'lib/freshly/client/tickets.rb', line 13

def create_ticket options={}
  post "tickets", options
end

#delete_ticket(id, options = {}) ⇒ Object



22
23
24
25
# File 'lib/freshly/client/tickets.rb', line 22

def delete_ticket id, options={}
  ticket = Ticket.new(id)
  destroy ticket.path, options
end

#edit_ticket(id, options = {}) ⇒ Object



17
18
19
20
# File 'lib/freshly/client/tickets.rb', line 17

def edit_ticket id, options={}
  ticket = Ticket.new(id)
  put ticket.path, options
end

#reply_to_ticket(id, options = {}) ⇒ Object



32
33
34
35
# File 'lib/freshly/client/tickets.rb', line 32

def reply_to_ticket id, options={}
  ticket = Ticket.new(id)
  post "#{ticket.path}/reply", options
end

#restore_ticket(id, options = {}) ⇒ Object



27
28
29
30
# File 'lib/freshly/client/tickets.rb', line 27

def restore_ticket id, options={}
  ticket = Ticket.new(id)
  put "#{ticket.path}/restore", options
end

#ticket(options = {}) ⇒ Object



9
10
11
# File 'lib/freshly/client/tickets.rb', line 9

def ticket options={}
  get "ticket", options
end

#ticket_notes(id, options = {}) ⇒ Object



37
38
39
40
# File 'lib/freshly/client/tickets.rb', line 37

def ticket_notes id, options={}
  ticket = Ticket.new(id)
  paginate "#{ticket.path}/notes", options
end

#ticket_time_entries(id, options = {}) ⇒ Object



42
43
44
45
# File 'lib/freshly/client/tickets.rb', line 42

def ticket_time_entries id, options={}
  ticket = Ticket.new(id)
  paginate "#{ticket.path}/time_entries", options
end

#tickets(options = {}) ⇒ Object



5
6
7
# File 'lib/freshly/client/tickets.rb', line 5

def tickets options={}
  paginate "tickets", options
end