Sha256: c467b2a5b9eac6ee30800f60006fc740e7b6fea7dccc7b5ade0f48df8a99c0eb
Contents?: true
Size: 704 Bytes
Versions: 56
Compression:
Stored size: 704 Bytes
Contents
class Zendesk2::Client class Real def get_organization_tickets(params={}) id = params["id"] page_params = Zendesk2.paging_parameters(params) request( :params => page_params, :method => :get, :path => "/organizations/#{id}/tickets.json", ) end end # Real class Mock def get_organization_tickets(params={}) id = params["id"] requesters = self.data[:users].values.select{|u| u["organization_id"] == id}.map{|s| s["organization_id"]} page(params, :tickets, "/organizations/#{id}/tickets.json", "tickets", filter: lambda{|c| c.select{|u| requesters.include?(u["organization_id"])}}) end end # Mock end
Version data entries
56 entries across 56 versions & 1 rubygems