Sha256: 38c2cfb057a650ec540d4f88bd6d89fca198efcc2fee5ece02402d66108fd184

Contents?: true

Size: 553 Bytes

Versions: 17

Compression:

Stored size: 553 Bytes

Contents

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

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

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

      page(params, :tickets, "/ccds/#{id}/tickets.json", "tickets", filter: lambda{|c| c.select{|u| u["collaborator_ids"].include?(id)}})
    end
  end # Mock
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
zendesk2-0.0.23 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.22 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.20 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.19 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.18 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.17 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.16 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.15 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.14 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.13 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.12 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.11 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.10 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.9 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.8 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.7 lib/zendesk2/client/requests/get_ccd_tickets.rb
zendesk2-0.0.6 lib/zendesk2/client/requests/get_ccd_tickets.rb