Sha256: 36dc80e0d6fb3ffc3534a952fb0bda88846e0ef2f8513240a88c3b7d27fe804c
Contents?: true
Size: 448 Bytes
Versions: 14
Compression:
Stored size: 448 Bytes
Contents
class Zendesk2::Client::GetOrganizationByExternalId < Zendesk2::Client::Request request_method :get request_params { |r| { "external_id" => r.external_id } } request_path { |_| "/organizations/search.json" } def external_id params.fetch("external_id") end def mock results = self.data[:organizations].select { |k,v| v["external_id"].to_s == external_id.to_s }.values mock_response("organizations" => results) end end
Version data entries
14 entries across 14 versions & 1 rubygems