Class: Freshdesk::Ticket
Instance Attribute Summary
#endpoint
Class Method Summary
collapse
#initialize, #resource
Class Method Details
.create_a_ticket(params: {}) ⇒ Object
4
5
6
|
# File 'lib/freshdesk/ticket.rb', line 4
def create_a_ticket(params: {})
new("/tickets").resource(params: params).post
end
|
.create_an_outbound_email(params: {}) ⇒ Object
8
9
10
|
# File 'lib/freshdesk/ticket.rb', line 8
def create_an_outbound_email(params: {})
new("/tickets/outbound_email").resource(params: params).post
end
|
.delete_a_ticket(id:) ⇒ Object
24
25
26
|
# File 'lib/freshdesk/ticket.rb', line 24
def delete_a_ticket(id:)
new("/tickets/#{id}").resource(id: id).delete
end
|
.list_all_conversations_of_a_ticket(id:) ⇒ Object
36
37
38
|
# File 'lib/freshdesk/ticket.rb', line 36
def list_all_conversations_of_a_ticket(id:)
new("/tickets/#{id}/conversations").resource(id: id).get
end
|
.list_all_satisfaction_ratings_of_a_ticket(ticket_id:) ⇒ Object
44
45
46
|
# File 'lib/freshdesk/ticket.rb', line 44
def list_all_satisfaction_ratings_of_a_ticket(ticket_id:)
new("/tickets/#{ticket_id}/satisfaction_ratings").resource.get
end
|
.list_all_ticket_fields ⇒ Object
32
33
34
|
# File 'lib/freshdesk/ticket.rb', line 32
def list_all_ticket_fields
new("/ticket_fields").resource.get
end
|
.list_all_tickets(query: "") ⇒ Object
16
17
18
|
# File 'lib/freshdesk/ticket.rb', line 16
def list_all_tickets(query: "")
new("/tickets#{query}").resource.get
end
|
.list_all_time_entries_of_a_ticket(id:) ⇒ Object
40
41
42
|
# File 'lib/freshdesk/ticket.rb', line 40
def list_all_time_entries_of_a_ticket(id:)
new("/tickets/#{id}/time_entries").resource(id: id).get
end
|
.restore_a_ticket(id:) ⇒ Object
28
29
30
|
# File 'lib/freshdesk/ticket.rb', line 28
def restore_a_ticket(id:)
new("/tickets/#{id}/restore").resource(id: id).put
end
|
.update_a_ticket(id:, params: {}) ⇒ Object
20
21
22
|
# File 'lib/freshdesk/ticket.rb', line 20
def update_a_ticket(id:, params: {})
new("/tickets/#{id}").resource(id: id, params: params).put
end
|
.view_a_ticket(id:, query: "") ⇒ Object
12
13
14
|
# File 'lib/freshdesk/ticket.rb', line 12
def view_a_ticket(id:, query: "")
new("/tickets/#{id}#{query}").resource(id: id).get
end
|