Sha256: 8d844d59693311632b03dbc3ca0e66e069344ffb3e06db9670e0a2831a8f084a

Contents?: true

Size: 566 Bytes

Versions: 54

Compression:

Stored size: 566 Bytes

Contents

class Zendesk2::Client
  class Real
    def get_requested_tickets(params={})
      id          = params["id"]
      page_params = Zendesk2.paging_parameters(params)

      request(
        :params  => page_params,
        :method  => :get,
        :path    => "/users/#{id}/tickets/requested.json",
      )
    end
  end # Real

  class Mock
    def get_requested_tickets(params={})
      id = params["id"]

      page(params, :tickets, "/requesteds/#{id}/tickets.json", "tickets", filter: lambda{|c| c.select{|u| u["requester_id"] == id}})
    end
  end # Mock
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
zendesk2-0.4.1 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.4.0 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.3.2 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.3.1 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.3.0 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.2.7 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.2.6 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.2.5 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.2.4 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.2.3 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.2.2 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.2.1 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.2.0 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.1.3 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.1.2 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.1.1 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.1.0 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.0.23 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.0.22 lib/zendesk2/client/requests/get_requested_tickets.rb
zendesk2-0.0.20 lib/zendesk2/client/requests/get_requested_tickets.rb