lib/zendesk2/client/requests/get_requested_tickets.rb in zendesk2-1.5.6 vs lib/zendesk2/client/requests/get_requested_tickets.rb in zendesk2-1.5.7
- old
+ new
@@ -1,16 +1,16 @@
class Zendesk2::Client::GetRequestedTickets < Zendesk2::Client::Request
request_method :get
- request_path { |r| "/users/#{r.user_id}/tickets/requested.json" }
+ request_path { |r| "/users/#{r.requester_id}/tickets/requested.json" }
page_params!
- def user_id
- params.fetch("user_id").to_i
+ def requester_id
+ params.fetch("requester_id").to_i
end
def mock(params={})
- tickets = self.data[:tickets].values.select { |u| u["requester_id"] == user_id }
+ tickets = self.data[:tickets].values.select { |u| u["requester_id"] == requester_id }
page(tickets, root: "tickets")
end
end