Module: Freshly::Client::Tickets
- Included in:
- Freshly::Client
- Defined in:
- lib/freshly/client/tickets.rb
Instance Method Summary collapse
- #create_ticket(options = {}) ⇒ Object
- #delete_ticket(id, options = {}) ⇒ Object
- #edit_ticket(id, options = {}) ⇒ Object
- #reply_to_ticket(id, options = {}) ⇒ Object
- #restore_ticket(id, options = {}) ⇒ Object
- #ticket(options = {}) ⇒ Object
- #ticket_notes(id, options = {}) ⇒ Object
- #ticket_time_entries(id, options = {}) ⇒ Object
- #tickets(options = {}) ⇒ Object
Instance Method Details
#create_ticket(options = {}) ⇒ Object
13 14 15 |
# File 'lib/freshly/client/tickets.rb', line 13 def create_ticket ={} post "tickets", end |
#delete_ticket(id, options = {}) ⇒ Object
22 23 24 25 |
# File 'lib/freshly/client/tickets.rb', line 22 def delete_ticket id, ={} ticket = Ticket.new(id) destroy ticket.path, end |
#edit_ticket(id, options = {}) ⇒ Object
17 18 19 20 |
# File 'lib/freshly/client/tickets.rb', line 17 def edit_ticket id, ={} ticket = Ticket.new(id) put ticket.path, end |
#reply_to_ticket(id, options = {}) ⇒ Object
32 33 34 35 |
# File 'lib/freshly/client/tickets.rb', line 32 def reply_to_ticket id, ={} ticket = Ticket.new(id) post "#{ticket.path}/reply", end |
#restore_ticket(id, options = {}) ⇒ Object
27 28 29 30 |
# File 'lib/freshly/client/tickets.rb', line 27 def restore_ticket id, ={} ticket = Ticket.new(id) put "#{ticket.path}/restore", end |
#ticket(options = {}) ⇒ Object
9 10 11 |
# File 'lib/freshly/client/tickets.rb', line 9 def ticket ={} get "ticket", end |
#ticket_notes(id, options = {}) ⇒ Object
37 38 39 40 |
# File 'lib/freshly/client/tickets.rb', line 37 def ticket_notes id, ={} ticket = Ticket.new(id) paginate "#{ticket.path}/notes", end |
#ticket_time_entries(id, options = {}) ⇒ Object
42 43 44 45 |
# File 'lib/freshly/client/tickets.rb', line 42 def ticket_time_entries id, ={} ticket = Ticket.new(id) paginate "#{ticket.path}/time_entries", end |
#tickets(options = {}) ⇒ Object
5 6 7 |
# File 'lib/freshly/client/tickets.rb', line 5 def tickets ={} paginate "tickets", end |