lib/zendesk2/get_ticket_comments.rb in zendesk2-1.9.0 vs lib/zendesk2/get_ticket_comments.rb in zendesk2-1.10.0

- old
+ new

@@ -1,16 +1,17 @@ +# frozen_string_literal: true class Zendesk2::GetTicketComments include Zendesk2::Request request_method :get - request_path { |r| "/tickets/#{r.ticket_id}/comments.json" } + request_path { |r| "/tickets/#{r.ticket_id}/comments.json" } def ticket_id - params.fetch("ticket_id").to_i + params.fetch('ticket_id').to_i end - def mock(params={}) - comments = self.data[:ticket_comments].values.select { |comment| comment["ticket_id"] == ticket_id } + def mock(_params = {}) + comments = data[:ticket_comments].values.select { |comment| comment['ticket_id'] == ticket_id } - page(comments, root: "comments") + page(comments, root: 'comments') end end